Spaces:
Running
on
A10G
Running
on
A10G
rynmurdock
commited on
Commit
•
7df355f
1
Parent(s):
23702ab
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ sdxl_lightening = "ByteDance/SDXL-Lightning"
|
|
36 |
ckpt = "sdxl_lightning_2step_unet.safetensors"
|
37 |
unet = UNet2DConditionModel.from_config(model_id, subfolder="unet").to("cuda", torch.float16)
|
38 |
unet.load_state_dict(load_file(hf_hub_download(sdxl_lightening, ckpt), device="cuda"))
|
39 |
-
pipe =
|
40 |
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesdxl", torch_dtype=torch.float16)
|
41 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
42 |
pipe.to(device='cuda')
|
|
|
36 |
ckpt = "sdxl_lightning_2step_unet.safetensors"
|
37 |
unet = UNet2DConditionModel.from_config(model_id, subfolder="unet").to("cuda", torch.float16)
|
38 |
unet.load_state_dict(load_file(hf_hub_download(sdxl_lightening, ckpt), device="cuda"))
|
39 |
+
pipe = StableDiffusionXLPipeline.from_pretrained(model_id, unet=unet, torch_dtype=torch.float16, variant="fp16").to("cuda")
|
40 |
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taesdxl", torch_dtype=torch.float16)
|
41 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
|
42 |
pipe.to(device='cuda')
|