ComfyDeploy API Retrieve Cached Run IDs (Soze)
Read back a queued run later
- run_id
- status
The read side of a queue. If you've fired off a batch of jobs with ComfyDeploy API Node and don't want to sit there waiting for each one to finish before starting the next, something needs to keep track of the run_ids you've queued so you can come back and collect them later - potentially in a completely separate ComfyUI session. This node is that retrieval step: point it at a folder, and it hands you back one cached run ID at a time.
How it works
You give it a folder path, and it reads a queued run ID out of whatever's cached there, returning it along with a status. By default it also removes that entry once retrieved (remove_after_retrieval), so the folder behaves like a proper queue - each ID comes out once, not repeatedly, and a second call (or the next graph run) moves on to the next queued job rather than handing you the same one again.
The schema doesn't say which node writes into that cache folder in the first place - nothing in this pack's node list is explicitly labeled "cache a run ID" - so the natural pairing is to queue a run with ComfyDeploy API Node and persist its run_id yourself (a CSV Writer or a plain text-file write, both elsewhere in this pack, would do the job) into the same folder this node reads from.
The inputs and outputs that matter
cache_save_folder- the folder to read cached run IDs from.remove_after_retrieval(BOOLEAN, default true) - deletes the cache entry once read. Turn it off if you want to re-read the same queue without consuming it, for example while debugging.- Outputs:
run_idandstatus- feedrun_idstraight intoComfyDeploy API Download Filesto poll and collect that job's results.
How to install it
Via ComfyUI Manager: search "Quality of Life Nodes for ComfyUI", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
No API key needed for this node specifically - it's reading from local disk, not calling ComfyDeploy. You'll still need CD_API_KEY elsewhere in the pipeline (queueing and downloading).
Common issues & troubleshooting
Empty result, nothing to retrieve. Either the folder genuinely has no cached run IDs left (they've all been consumed, if remove_after_retrieval was on), or nothing ever wrote to it. Since this node only reads, check whatever step in your pipeline is responsible for writing run IDs there actually ran.
You keep getting the same run ID back. That means remove_after_retrieval is off - flip it on if you're deliberately working through a queue and don't want repeats.
You need a persistent, resumable batch job. This is the reason this node exists over just keeping run_ids in a Primitive node's memory - disk survives a ComfyUI restart, a node's internal state doesn't. If you're farming out a large batch to ComfyDeploy, writing run IDs to disk as you queue them (rather than trying to hold dozens of them in the live graph) is the pattern this node is built for.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| cache_save_folder | STRING | — | |
| remove_after_retrieval | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| run_id | STRING | — |
| status | STRING | — |