Spaces:
Sleeping
Sleeping
Commit
·
8ca5a6f
1
Parent(s):
3c08f8e
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def show_images_save(x):
|
|
| 32 |
return grid_im
|
| 33 |
|
| 34 |
def generate():
|
| 35 |
-
x = torch.randn(
|
| 36 |
# Minimal sampling loop
|
| 37 |
for i, t in tqdm(enumerate(scheduler.timesteps)):
|
| 38 |
model_input = scheduler.scale_model_input(x, t)
|
|
@@ -43,7 +43,7 @@ def generate():
|
|
| 43 |
return show_images_save(x).resize((64, 64), resample=Image.NEAREST)
|
| 44 |
|
| 45 |
|
| 46 |
-
outputs = gr.Image(label="result")
|
| 47 |
|
| 48 |
# Setting up a minimal interface to our function:
|
| 49 |
demo = gr.Interface(
|
|
|
|
| 32 |
return grid_im
|
| 33 |
|
| 34 |
def generate():
|
| 35 |
+
x = torch.randn(1, 4, 64, 64).to(device)
|
| 36 |
# Minimal sampling loop
|
| 37 |
for i, t in tqdm(enumerate(scheduler.timesteps)):
|
| 38 |
model_input = scheduler.scale_model_input(x, t)
|
|
|
|
| 43 |
return show_images_save(x).resize((64, 64), resample=Image.NEAREST)
|
| 44 |
|
| 45 |
|
| 46 |
+
outputs = (gr.Image(label="result"), gr.Image(label="result"))
|
| 47 |
|
| 48 |
# Setting up a minimal interface to our function:
|
| 49 |
demo = gr.Interface(
|