Skip to content

Commit

Permalink
feat: update ByteDance/SDXL-Lighting to default to 8step (#162)
Browse files Browse the repository at this point in the history
* update ByteDance/SDXL-Lightning to default to 8 step unet

* update I2I to 8step default for ByteDance/SDXL-Lightning model
  • Loading branch information
ad-astra-video committed Aug 17, 2024
1 parent 44a6eec commit 557631c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 557631c

Please sign in to comment.