vilarin commited on
Commit
6380dba
1 Parent(s): 19e461a

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
 
37
  if loaded != num_inference_steps:
38
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
39
- pipe.unet.load_state_dict(torch.load(hf_hub_download(repo_name, ckpt_name), map_location="cuda"))
40
  loaded = num_inference_steps
41
 
42
  results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0)
 
36
 
37
  if loaded != num_inference_steps:
38
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", prediction_type="sample" if num_inference_steps==1 else "epsilon")
39
+ pipe.unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint), map_location="cuda"))
40
  loaded = num_inference_steps
41
 
42
  results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0)