Spaces:
Runtime error
Runtime error
Commit
·
5ecf930
1
Parent(s):
fb43c7f
Fix the queue
Browse files
app.py
CHANGED
|
@@ -146,16 +146,15 @@ with gr.Blocks(css=css) as demo:
|
|
| 146 |
|
| 147 |
# metric.put_scalars()
|
| 148 |
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
}
|
| 159 |
|
| 160 |
# TODO: Output pane, img and depth to Gradio
|
| 161 |
|
|
|
|
| 146 |
|
| 147 |
# metric.put_scalars()
|
| 148 |
|
| 149 |
+
with torch.no_grad():
|
| 150 |
+
if isinstance(model, StableDiffusion):
|
| 151 |
+
y = model.decode(y)
|
| 152 |
+
pane, img, depth = vis_routine(y, depth)
|
| 153 |
+
yield {
|
| 154 |
+
image: gr.update(value=img, visible=True),
|
| 155 |
+
video: gr.update(visible=False),
|
| 156 |
+
logs: f"Steps: {i}/{n_steps}: \n" + str(tsr_stats(y)),
|
| 157 |
+
}
|
|
|
|
| 158 |
|
| 159 |
# TODO: Output pane, img and depth to Gradio
|
| 160 |
|