vilarin commited on
Commit
98488ef
1 Parent(s): 556fb50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ def generate_image(prompt, ckpt):
37
 
38
  if loaded != num_inference_steps:
39
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
40
- unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoints)), map_location="cuda"))
41
  pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
42
  loaded = num_inference_steps
43
 
 
37
 
38
  if loaded != num_inference_steps:
39
  unet = UNet2DConditionModel.from_config(base, subfolder="unet").to("cuda", torch.float16)
40
+ unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoints)), map_location="cuda")
41
  pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
42
  loaded = num_inference_steps
43