Image Ledger · Recovery
Unsticking sources that a crashed batch left running
- result
Every no-repeat queue has a failure mode you only meet on hour six of a batch: ComfyUI gets killed, the 4-hour render gets interrupted, or you hit cancel and walk away - and the source image that was mid-flight is neither done nor available. It's reserved. Image Ledger · Recovery (the class is ImageLedger_Control, the display name is Recovery) is the node that hands those images back to the queue.
What it's for
Image Ledger's loader reserves a source before rendering and only releases it on commit. That's what stops two concurrent jobs from grabbing the same image. The cost is that any run that ends without a commit leaves a dangling reservation, and the reservation has a lease (default 1440 minutes - a full day in the Tracked Image Loader, 24h in the Visual Queue), so waiting it out is technically an option and practically not.
Recovery is the manual lever: three actions, one string output, no state of its own.
How it works
It's a maintenance node - it runs against the ledger database, not pixels. Three actions:
- status_only - reads the ledger and reports. Releases nothing. Use this first to see how many tasks are stuck.
- release_previous_session - returns reservations left running by earlier ComfyUI sessions to pending. Sessions are tracked by a per-process id, so this is the safe one to run after a crash or a restart; it can't touch anything currently rendering.
- release_all_running_for_retry - everything, including tasks reserved in the session you're sitting in. This is the one with a guardrail.
The output is a single result string, and the same text goes to the node's UI panel, e.g. Released 3 task(s); Pending 44 | Running 0 | Done 308 | Unique 352 | Duplicates 7. The counts are the ledger's own status line: pending, running, done, unique sources by content hash, and how many paths are duplicates of the same image.
The node's IS_CHANGED returns NaN on purpose, so ComfyUI re-executes it every time you hit Queue instead of caching it as "unchanged". A maintenance node that silently no-ops because the widgets didn't move would be worse than useless.
Inputs and outputs
- campaign - the ledger name. Default
image-ledger-default, which is what both loaders use out of the box. It has to match, or you'll be reading - and releasing - a ledger nobody is writing to. - action - the three choices above.
- confirmation - the author's tooltip says it plainly: "Enter RETRY before releasing tasks from the current session." For
release_all_running_for_retrythe string must be exactlyRETRY; anything else raises and nothing is released. - result (output) - the release count plus the status line.
Wire the output into a text display node if you want to keep the last report visible, or just leave the node dangling - it's an output node, so it runs either way.
Install
Same pack, same install as everything else here. Manager → search Image Ledger, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Rona1do/ComfyUI-Image-Ledger.git
Restart, then drop the node in, set the ledger name to match your loader, and queue.
Common issues
"Enter RETRY to release images running in this session." Working as designed. The confirmation is there because the current-session release is the dangerous one: if a run is genuinely still rendering and you release its reservation, that job's later commit is rejected - the ledger won't accept a commit from a task it no longer considers running, and the reservation fails instead. Don't fire this one while something is actually sampling.
"Released 0 task(s)" and the image is still missing. Either nothing was in a running state, or the campaign name doesn't match the loader's. Both loaders default to image-ledger-default, so if you've edited the ledger name anywhere (the widget ships hidden in the loaders, but it's still a value you can change in a saved graph), make it match here.
It keeps spamming the console every run. Expected - IS_CHANGED is always-invalidated so the readout is current. Mute the node if the noise bothers you; the state change still happened the last time you queued it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| campaign | STRING | image-ledger-default | — |
| action | COMBO | 3 options: status_only, release_previous_session, release_all_running_for_retry | |
| confirmation | STRING | Enter RETRY before releasing tasks from the current session. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | STRING | — |