Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ base = "stabilityai/stable-diffusion-xl-base-1.0"
|
|
36 |
repo = "ByteDance/SDXL-Lightning"
|
37 |
ckpt = "sdxl_lightning_4step_unet.safetensors"
|
38 |
|
39 |
-
unet = UNet2DConditionModel.from_config(base, subfolder="unet")
|
40 |
-
unet.load_state_dict(load_file(hf_hub_download(repo, ckpt)
|
41 |
image_pipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float16, variant="fp16")
|
42 |
image_pipe.scheduler = EulerDiscreteScheduler.from_config(image_pipe.scheduler.config, timestep_spacing="trailing")
|
43 |
|
|
|
36 |
repo = "ByteDance/SDXL-Lightning"
|
37 |
ckpt = "sdxl_lightning_4step_unet.safetensors"
|
38 |
|
39 |
+
unet = UNet2DConditionModel.from_config(base, subfolder="unet")
|
40 |
+
unet.load_state_dict(load_file(hf_hub_download(repo, ckpt)))
|
41 |
image_pipe = StableDiffusionXLPipeline.from_pretrained(base, unet=unet, torch_dtype=torch.float16, variant="fp16")
|
42 |
image_pipe.scheduler = EulerDiscreteScheduler.from_config(image_pipe.scheduler.config, timestep_spacing="trailing")
|
43 |
|