Spaces:
Running
Running
Commit
·
5b3b7c8
1
Parent(s):
05b6aa8
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ def generate():
|
|
| 49 |
scheduler.set_timesteps(num_inference_steps=20)
|
| 50 |
x = torch.randn(1, 4, 64, 64).to(device)
|
| 51 |
# Minimal sampling loop
|
| 52 |
-
for i, t in
|
| 53 |
model_input = scheduler.scale_model_input(x, t)
|
| 54 |
with torch.no_grad():
|
| 55 |
noise_pred = image_pipe.unet(model_input, t)["sample"]
|
|
|
|
| 49 |
scheduler.set_timesteps(num_inference_steps=20)
|
| 50 |
x = torch.randn(1, 4, 64, 64).to(device)
|
| 51 |
# Minimal sampling loop
|
| 52 |
+
for i, t in enumerate(scheduler.timesteps):
|
| 53 |
model_input = scheduler.scale_model_input(x, t)
|
| 54 |
with torch.no_grad():
|
| 55 |
noise_pred = image_pipe.unet(model_input, t)["sample"]
|