CosmoAI commited on
Commit
31ed165
·
verified ·
1 Parent(s): 2d3ce56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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="fp32").to("cpu")
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