Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ ckpt = "sdxl_lightning_4step_unet.safetensors"
|
|
16 |
def load_sdxl_pipeline():
|
17 |
unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cpu", torch.float32)
|
18 |
unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device="cpu"))
|
19 |
-
pipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float32, variant="
|
20 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
21 |
return pipe
|
22 |
|
|
|
16 |
def load_sdxl_pipeline():
|
17 |
unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cpu", torch.float32)
|
18 |
unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device="cpu"))
|
19 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float32, variant="fp16").to("cpu")
|
20 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
21 |
return pipe
|
22 |
|