From 04c68022927478e9cc203d2ba6517d58c11d63ad Mon Sep 17 00:00:00 2001 From: chengzeyi Date: Sat, 4 Nov 2023 11:11:52 +0800 Subject: [PATCH] show how to load SDXL in README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f043754..e992b5d 100644 --- a/README.md +++ b/README.md @@ -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