Skip to content

Commit

Permalink
show how to load SDXL in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chengzeyi committed Nov 4, 2023
1 parent 746db79 commit 04c6802
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ from sfast.compilers.stable_diffusion_pipeline_compiler import (compile,
)

def load_model():
# you can change to StableDiffusionXLPipeline to load SDXL model
model = StableDiffusionPipeline.from_pretrained(
'runwayml/stable-diffusion-v1-5', torch_dtype=torch.float16)

model.scheduler = EulerAncestralDiscreteScheduler.from_config(
model.scheduler.config)
model.safety_checker = None
Expand Down

0 comments on commit 04c6802

Please sign in to comment.