ComfyUI-DeadMansQueue
Crash-safe queue persistence for ComfyUI: unfinished jobs come back after a power cut
Stack
Links
What it is
ComfyUI keeps its prompt queue entirely in RAM, so a power cut takes every waiting job with it. This extension mirrors the queue to a crash-safe database and pushes the unfinished jobs back in on the next start, in their original order and priority. Jobs you deleted stay gone and finished jobs are not re-run. It has no dependencies beyond Python's standard library, adds no nodes or settings, and changes nothing in the UI.
How it works
A power cut can stop the drive mid-write, so a plain JSON dump can be truncated in exactly the case it exists for. The queue goes to SQLite in WAL mode with synchronous=FULL, so each job is durable before it is acknowledged. API credentials are stripped before anything is written. On recovery, each job's full editor graph is also saved as a plain workflow file, and rows are deleted as jobs complete.
Limitations
A render that was halfway through is restarted from the start, not resumed; resuming would mean saving sampler state on every step. Jobs that use API nodes need re-authenticating after a recovery, because their credentials are never written to disk. It recovers from a power cut but does not prevent one.