Skip to content

Commit

Permalink
LCM model
Browse files Browse the repository at this point in the history
  • Loading branch information
dkackman committed Nov 6, 2023
1 parent 2736fc4 commit 9696e63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"cSpell.words": [
"aiohttp",
Expand All @@ -19,8 +18,5 @@
"upscaler",
"vram",
"xformers"
],
"[python]": {
"editor.defaultFormatter": "ms-python.python"
}
]
}
4 changes: 2 additions & 2 deletions swarm/diffusion/diffusion_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def diffusion_callback(device_identifier, model_name, **kwargs):
# put the control_image back upscaled to match the latent dimensions
if control_image is not None:
kwargs["control_image"] = center_crop_resize(control_image, (1024, 1024))

kwargs["image"] = upscaled_latents
load_pipeline_args["unet"] = prepipeline.unet

Expand Down Expand Up @@ -125,7 +125,7 @@ def diffusion_callback(device_identifier, model_name, **kwargs):
main_pipeline = main_pipeline.to(device_identifier)

# not all pipelines use a scheduler, so check first (UnCLIPPipeline)
if main_pipeline.scheduler is not None:
if hasattr(main_pipeline, "scheduler") and kwargs.pop("allow_user_scheduler", True):
main_pipeline.scheduler = scheduler_type.from_config(
main_pipeline.scheduler.config, use_karras_sigmas=True
)
Expand Down

0 comments on commit 9696e63

Please sign in to comment.