Commit 5d441300 authored by Patrick von Platen's avatar Patrick von Platen
Browse files

make style

parent 863e7416
......@@ -1387,7 +1387,7 @@ def download_from_original_stable_diffusion_ckpt(
unet = UNet2DConditionModel(**unet_config)
if is_accelerate_available():
if model_type not in ["SDXL", "SDXL-Refiner"]: # SBM Delay this.
if model_type not in ["SDXL", "SDXL-Refiner"]: # SBM Delay this.
for param_name, param in converted_unet_checkpoint.items():
set_module_tensor_to_device(unet, param_name, "cpu", value=param)
else:
......@@ -1589,7 +1589,7 @@ def download_from_original_stable_diffusion_ckpt(
checkpoint, config_name, prefix="conditioner.embedders.1.model.", has_projection=True, **config_kwargs
)
if is_accelerate_available(): # SBM Now move model to cpu.
if is_accelerate_available(): # SBM Now move model to cpu.
if model_type in ["SDXL", "SDXL-Refiner"]:
for param_name, param in converted_unet_checkpoint.items():
set_module_tensor_to_device(unet, param_name, "cpu", value=param)
......@@ -1617,11 +1617,11 @@ def download_from_original_stable_diffusion_ckpt(
checkpoint, config_name, prefix="conditioner.embedders.0.model.", has_projection=True, **config_kwargs
)
if is_accelerate_available(): # SBM Now move model to cpu.
if is_accelerate_available(): # SBM Now move model to cpu.
if model_type in ["SDXL", "SDXL-Refiner"]:
for param_name, param in converted_unet_checkpoint.items():
set_module_tensor_to_device(unet, param_name, "cpu", value=param)
pipe = StableDiffusionXLImg2ImgPipeline(
vae=vae,
text_encoder=text_encoder,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment