Spaces:
vilarin
/
Running on Zero

vilarin commited on
Commit
67399b5
1 Parent(s): 3494613

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,10 +40,10 @@ def generate_image(prompt, ckpt):
40
  pipe.unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint), map_location="cuda"))
41
  loaded = num_inference_steps
42
 
43
- if num_inference_steps == 1:
44
  results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0, timesteps=[399])
45
  else:
46
- results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0)
47
 
48
 
49
  return results.images[0]
 
40
  pipe.unet.load_state_dict(torch.load(hf_hub_download(repo, checkpoint), map_location="cuda"))
41
  loaded = num_inference_steps
42
 
43
+ if loaded == 1:
44
  results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0, timesteps=[399])
45
  else:
46
+ results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0, timesteps=[999, 749, 499, 249])
47
 
48
 
49
  return results.images[0]