Skip to content

Commit

Permalink
support sd
Browse files Browse the repository at this point in the history
  • Loading branch information
lmxyy committed Apr 24, 2024
1 parent 084aabe commit fd7cd21
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion distrifuser/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def prepare(self, **kwargs):
prompt_embeds=None,
negative_prompt_embeds=None,
lora_scale=None,
clip_skip=pipeline.clip_skip,
clip_skip=kwargs.get("clip_skip", None),
)

batch_size = 2 if distri_config.do_classifier_free_guidance else 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_sdxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_args() -> argparse.Namespace:
"--sync_mode",
type=str,
default="corrected_async_gn",
choices=["separate_gn", "async_gn", "corrected_async_gn", "sync_gn", "full_sync", "no_sync"],
choices=["separate_gn", "stale_gn", "corrected_async_gn", "sync_gn", "full_sync", "no_sync"],
help="Different GroupNorm synchronization modes",
)
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion scripts/sd_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from distrifuser.pipelines import DistriSDPipeline
from distrifuser.utils import DistriConfig

distri_config = DistriConfig(height=512, width=512, warmup_steps=4)
distri_config = DistriConfig(height=512, width=512, warmup_steps=4, mode="stale_gn")
pipeline = DistriSDPipeline.from_pretrained(
distri_config=distri_config,
pretrained_model_name_or_path="CompVis/stable-diffusion-v1-4",
Expand Down

0 comments on commit fd7cd21

Please sign in to comment.