Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ByteDance/SDXL-Lighting to default to 8step #162

Merged
merged 2 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions runner/app/pipelines/image_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def __init__(self, model_id: str):
elif "8step" in model_id:
unet_id = "sdxl_lightning_8step_unet"
else:
# Default to 2step
unet_id = "sdxl_lightning_2step_unet"
# Default to 8step
unet_id = "sdxl_lightning_8step_unet"

unet_config = UNet2DConditionModel.load_config(
pretrained_model_name_or_path=base,
Expand Down Expand Up @@ -219,8 +219,8 @@ def __call__(
elif "8step" in self.model_id:
kwargs["num_inference_steps"] = 8
else:
# Default to 2step
kwargs["num_inference_steps"] = 2
# Default to 8step
kwargs["num_inference_steps"] = 8

output = self.ldm(prompt, image=image, **kwargs)

Expand Down
4 changes: 2 additions & 2 deletions runner/app/pipelines/text_to_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def __init__(self, model_id: str):
elif "8step" in model_id:
unet_id = "sdxl_lightning_8step_unet"
else:
# Default to 2step
unet_id = "sdxl_lightning_2step_unet"
# Default to 8step
unet_id = "sdxl_lightning_8step_unet"

unet_config = UNet2DConditionModel.load_config(
pretrained_model_name_or_path=base,
Expand Down