Compare commits

...

2 Commits

Author SHA1 Message Date
Daichi Nagashima
8acc24052f Merge d65f46c297 into 1dae34b0af 2026-04-01 14:16:21 +00:00
長嶋大地
d65f46c297 diffusers形式のbf16のモデルをロードできるようにする 2024-03-14 21:10:20 +09:00

View File

@@ -83,7 +83,7 @@ def _load_target_model(
# Diffusers model is loaded to CPU
from diffusers import StableDiffusionXLPipeline
variant = "fp16" if weight_dtype == torch.float16 else None
variant = "fp16" if weight_dtype == torch.float16 else "bf16" if weight_dtype == torch.bfloat16 else None
logger.info(f"load Diffusers pretrained models: {name_or_path}, variant={variant}")
try:
try: