VanguardAI commited on
Commit
2b4eaa1
·
verified ·
1 Parent(s): 1197e50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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").to("cuda", torch.float16)
40
- unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device="cuda"))
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