Spaces:
Running
Running
Commit
·
df2c452
1
Parent(s):
7e82443
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def show_images_save(x):
|
|
| 35 |
def generate():
|
| 36 |
x = torch.randn(1, 4, 64, 64).to(device)
|
| 37 |
# Minimal sampling loop
|
| 38 |
-
for i, t in
|
| 39 |
model_input = scheduler.scale_model_input(x, t)
|
| 40 |
with torch.no_grad():
|
| 41 |
noise_pred = image_pipe.unet(model_input, t)["sample"]
|
|
|
|
| 35 |
def generate():
|
| 36 |
x = torch.randn(1, 4, 64, 64).to(device)
|
| 37 |
# Minimal sampling loop
|
| 38 |
+
for i, t in enumerate(scheduler.timesteps):
|
| 39 |
model_input = scheduler.scale_model_input(x, t)
|
| 40 |
with torch.no_grad():
|
| 41 |
noise_pred = image_pipe.unet(model_input, t)["sample"]
|