Wauplin HF staff commited on
Commit
ea633c9
1 Parent(s): dc7aed1

Deactivate queue for user history retrieval

Browse files

Retrieving the user history is currently counted as a "heavy task" that is queued in the queue as the image-generation. Adding `queue=False` allows users to retrieve their history without waiting in the queue. This should not impact the Space performances as retrieving the history is just a matter of reading a file on the disk (+ there is also a filelock in the history to prevent concurrency).

cc

@AP123



@osanseviero

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -134,7 +134,7 @@ with gr.Blocks(css=css) as app:
134
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, seed, sampler],
135
  outputs=[result_image, share_group]
136
  ).then(
137
- fn=fetch_gallery_history, inputs=[prompt, result_image], outputs=history
138
  )
139
  share_button.click(None, [], [], _js=share_js)
140
  app.queue(max_size=20)
 
134
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, seed, sampler],
135
  outputs=[result_image, share_group]
136
  ).then(
137
+ fn=fetch_gallery_history, inputs=[prompt, result_image], outputs=history, queue=False
138
  )
139
  share_button.click(None, [], [], _js=share_js)
140
  app.queue(max_size=20)