vilarin commited on
Commit
3494613
1 Parent(s): fee8445

Update app.py

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