Spaces:
vilarin
/
Running on Zero

vilarin commited on
Commit
6e61ba6
1 Parent(s): 3eaeeea

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
  num_inference_steps = checkpoints[ckpt][1]
38
 
39
  if loaded != num_inference_steps:
40
- unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint)), 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
  num_inference_steps = checkpoints[ckpt][1]
38
 
39
  if loaded != num_inference_steps:
40
+ unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint), 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