Cooldown -STRING-
The Honest Way to Rate-Limit a ComfyUI Workflow
- STRING
Cooldown -STRING- is the text-flavored passthrough in the Cooldown pack: a string goes in, the node waits, and the same string comes out. The implementation is five lines of Python around time.sleep(). And while that sounds like nothing, it's actually the most genuinely useful member of the trio - because strings are what your workflow uses to talk to the outside world.
ComfyUI workflows increasingly call out to remote services: an LLM that rewrites your prompt, a captioner labeling your images, a remote upscaler or tagging API. Those services rate-limit you, and a graph that fires ten requests in a second is a fast way to collect a wall of 429 errors. Drop a cooldown into the string path upstream of the API node and each request arrives with a beat between them - a dumb, dependency-free rate limiter that actually works.
How it works - from the source, all of it:
def main(self, STRING, sleep):
time.sleep(sleep)
return (STRING,)
The string is never touched; the node just delays before handing it back. No API calls, no keys, no state. The "cooldown" in the name is literally time.sleep().
The inputs (both required):
STRING- the text to hold, flaggedforceInputso it must be wired in from another node (a text box, an LLM response, a filename generator).sleep- the delay in seconds. Default 1, min 0, max 300.
The output is one STRING, identical, just late. The node is marked as an output node, so ComfyUI reports the value that came through - but you'll normally wire it onward into the node that actually consumes the string.
Placement matters, and it's worth spelling out because it's the one knob you actually control. If you want a pause before each external call, put the cooldown upstream of the API node - the workflow reaches it, sleeps, then fires the request. Put it after the call instead, and the pause happens between iterations of a loop, which is the pattern that stops you from hammering a service on every pass. Both are legitimate; just know which one you've built.
Gotchas. Same blocking behavior as the whole pack: while the node sleeps, it holds its queue slot, so it paces a workflow rather than scheduling it. The cap is 300 seconds; need a longer wait, chain two nodes. The good news relative to the image variant is memory - a string is tiny, so there's no VRAM sitting idle while you sleep. And remember, it doesn't track history: every execution waits sleep seconds, no matter how recently the last one ran. If you need "no more often than once a minute," set sleep to 60 and keep the calls on that path.
Install. ComfyUI Manager is the easy route - search for "ComfyUI Cooldown Node", install, restart. Or clone it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/tuki0918/ComfyUI_Cooldown_Node
Restart, and Cooldown -STRING- shows up under the Cooldown category. No requirements.txt, no model downloads, no dependency conflicts waiting to happen - rare in the custom-node world, where one pack's pinned version routinely breaks another's. Nobody's writing threads about this node, and that's the tell: it's a quiet utility you install when you need it, not a thing you brag about. When a service starts rate-limiting your workflow, it's exactly what you want in the graph.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| STRING | STRING | — | |
| sleep | INT | 10–300 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |