Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -192,4 +192,12 @@ with gr.Blocks(title="SDXL Space (runs Diffusers directly)") as demo:
|
|
| 192 |
)
|
| 193 |
|
| 194 |
# Tune queue for Spaces (concurrency + backlog)
|
| 195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
)
|
| 193 |
|
| 194 |
# Tune queue for Spaces (concurrency + backlog)
|
| 195 |
+
btn.click(
|
| 196 |
+
txt2img,
|
| 197 |
+
inputs=[prompt, negative, width, height, steps, guidance, images, seed, scheduler, lora_names, lora_scale, fuse],
|
| 198 |
+
outputs=[gallery],
|
| 199 |
+
api_name="txt2img",
|
| 200 |
+
concurrency_limit=1, # keep 1 GPU job at a time
|
| 201 |
+
concurrency_id="gpu_queue" # share queue if you add more GPU events later
|
| 202 |
+
)
|
| 203 |
+
demo.queue(max_size=32, default_concurrency_limit=1).launch()
|