amankishore commited on
Commit
5ecf930
·
1 Parent(s): fb43c7f

Fix the queue

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -146,16 +146,15 @@ with gr.Blocks(css=css) as demo:
146
 
147
  # metric.put_scalars()
148
 
149
- if every(pbar, percent=1):
150
- with torch.no_grad():
151
- if isinstance(model, StableDiffusion):
152
- y = model.decode(y)
153
- pane, img, depth = vis_routine(y, depth)
154
- yield {
155
- image: gr.update(value=img, visible=True),
156
- video: gr.update(visible=False),
157
- logs: f"Steps: {i}/{n_steps}: \n" + str(tsr_stats(y)),
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