Extensions/Queue Pause
ComfyUI Extension

Queue Pause

A Pause / Resume button for the ComfyUI queue: the current job finishes, nothing else starts until you resume. No workflow nodes, no queue hijacking, no database.

By grgisme·Created a day ago·Updated a day ago· 0
grgisme/comfyui-queue-pause
Nodes
On cloudLocal install
Stars0
Updateda day ago
Readme

ComfyUI Queue Pause

A Pause / Resume button for the ComfyUI queue.

  • Click Pause queue: whatever is generating right now finishes normally. Nothing queued starts.
  • Click Resume queue: the queue continues exactly where it left off.
  • Works for everything in the queue: UI runs, API submissions, batches.
  • Optional: free VRAM while paused (Settings > Queue Pause). Models are unloaded as soon as the running job finishes, so the GPU is free for something else; they reload on resume.

Pause queue button in the ComfyUI top bar Resume queue button while the queue is held

The other buttons and the CPU/RAM/GPU monitors in these screenshots come from separate extensions (ComfyUI-Manager, Crystools, ComfyUI-Custom-Scripts). None of them are required.

No workflow nodes to add. No queue hijacking. No database. One small Python file and a toolbar button.

Install

Clone into ComfyUI/custom_nodes/ (or install from ComfyUI-Manager once listed) and restart ComfyUI:

cd ComfyUI/custom_nodes
git clone https://github.com/grgisme/comfyui-queue-pause

Hard-refresh the browser tab after the restart. The button lives in the top bar.

API

POST /queue_pause/pause              (add ?unload=1 or JSON {"unload": true} to free VRAM)
POST /queue_pause/resume
GET  /queue_pause/status      -> {"paused": bool, "since": epoch|null, "unload": bool, "active": bool}

active is false (and pause/resume answer 503) only if the extension could not hook the queue, see the caveat below. Pause is global: with --multi-user, any user pausing holds the queue for everyone, exactly like the built-in queue clear / interrupt.

State changes are broadcast to connected clients as a queue_pause websocket event.

How it works

The extension wraps PromptQueue.get, the call the worker thread makes to pull the next job. While paused, the wrapper simply does not hand out a job. The running job is never touched, so pausing is always safe, and there is nothing to clean up on resume. A pause takes effect within 50 ms; a job submitted inside that window can still start.

Caveat

PromptQueue.get is not a public API. If a future ComfyUI changes it, the extension detects the mismatch, logs a warning, leaves the original untouched and reports active: false. There is an open request for a native pause button in the ComfyUI frontend (Comfy-Org/ComfyUI_frontend#6439); if core ships one, use that instead.

License

MIT