Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|
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]
|