Spaces:
Runtime error
Runtime error
update
Browse files- app.py +2 -3
- inference.py +2 -1
app.py
CHANGED
|
@@ -158,7 +158,7 @@ def create_inference_demo(func: inference_fn) -> gr.Blocks:
|
|
| 158 |
prompt,
|
| 159 |
num_samples,
|
| 160 |
guidance_scale,
|
| 161 |
-
ddim_steps
|
| 162 |
],
|
| 163 |
outputs=result,
|
| 164 |
queue=False)
|
|
@@ -169,8 +169,7 @@ def create_inference_demo(func: inference_fn) -> gr.Blocks:
|
|
| 169 |
prompt,
|
| 170 |
num_samples,
|
| 171 |
guidance_scale,
|
| 172 |
-
ddim_steps
|
| 173 |
-
|
| 174 |
],
|
| 175 |
outputs=result,
|
| 176 |
queue=False)
|
|
|
|
| 158 |
prompt,
|
| 159 |
num_samples,
|
| 160 |
guidance_scale,
|
| 161 |
+
ddim_steps
|
| 162 |
],
|
| 163 |
outputs=result,
|
| 164 |
queue=False)
|
|
|
|
| 169 |
prompt,
|
| 170 |
num_samples,
|
| 171 |
guidance_scale,
|
| 172 |
+
ddim_steps
|
|
|
|
| 173 |
],
|
| 174 |
outputs=result,
|
| 175 |
queue=False)
|
inference.py
CHANGED
|
@@ -10,7 +10,7 @@ import numpy as np
|
|
| 10 |
|
| 11 |
import torch
|
| 12 |
from diffusers import StableDiffusionPipeline
|
| 13 |
-
sys.path.insert(0, './ReVersion')
|
| 14 |
|
| 15 |
# below are original
|
| 16 |
import os
|
|
@@ -92,6 +92,7 @@ def inference_fn(
|
|
| 92 |
|
| 93 |
# save a grid of images
|
| 94 |
image_grid = make_image_grid(images, rows=2, cols=math.ceil(num_samples/2))
|
|
|
|
| 95 |
# image_grid_path = os.path.join(image_root_folder, prompt, f'{prompt}.png')
|
| 96 |
|
| 97 |
return image_grid
|
|
|
|
| 10 |
|
| 11 |
import torch
|
| 12 |
from diffusers import StableDiffusionPipeline
|
| 13 |
+
# sys.path.insert(0, './ReVersion')
|
| 14 |
|
| 15 |
# below are original
|
| 16 |
import os
|
|
|
|
| 92 |
|
| 93 |
# save a grid of images
|
| 94 |
image_grid = make_image_grid(images, rows=2, cols=math.ceil(num_samples/2))
|
| 95 |
+
print(image_grid)
|
| 96 |
# image_grid_path = os.path.join(image_root_folder, prompt, f'{prompt}.png')
|
| 97 |
|
| 98 |
return image_grid
|