Nodes/ComfyUI-JDCN/LogicUtil_SleepNode
ComfyUI Node

LogicUtil_SleepNode

The 'wait a second' node that lets any value ride through

By daxcay·Created 2 years ago·Updated about a year ago· 159
LogicUtil_SleepNode
  • inputs
  • *
interval0.00

Sometimes the correct thing to do in a workflow is nothing - for a few seconds, on purpose. That's the entire job of LogicUtil_SleepNode (class name LogicUtil_SleepNodeAny), one of the quiet little utility nodes in the LogicUtil subpack of ComfyUI-JDCN. It pauses the queue for however many seconds you tell it, then hands its input right back out, unchanged. It's the ComfyUI equivalent of time.sleep() and it exists because real pipelines occasionally need a beat.

Why you'd actually use this

The honest answer is: not often, but when you need it, nothing else does the job. The use cases that make people reach for a sleep node:

  • Rate limiting. If your workflow calls an API (an LLM prompt expander, an image service), hammering it on every batch run is a great way to get a 429. A couple of seconds of sleep before the call node keeps you under the radar.
  • Waiting on external work. Render farms, file watchers, another process writing a file your graph will read next - you're waiting on the clock, not on ComfyUI.
  • Pacing. If you're debugging a long batch and want to watch output trickle in instead of blasting through, a sleep gives your eyes a chance to keep up.

How it works

The mechanism is blessedly boring. It takes interval (a FLOAT, in seconds, default 0) and sleeps for that long via Python's time.sleep(). The optional inputs socket is the wildcard * type, which is the clever bit: it accepts any data type - string, image, latent, model, conditioning, a number. Whatever you feed it comes out the * output socket exactly as it went in, so you can drop this node anywhere in a graph just to insert the delay without worrying about types.

The one input that matters

Just interval. Everything else is plumbing. A few honest notes on using it:

  • It's blocking. This pauses the entire queue run, not just one branch. A 30-second interval makes every run take 30 seconds longer, so use the smallest value that works.
  • Fractional seconds work fine - 0.5 is half a second, and that's usually enough to dodge a rate limiter.
  • Since it passes * through, you can chain it inline with the value you actually care about: the node the value is feeding won't run until the sleep finishes.

Installing it

It ships with the ComfyUI-JDCN pack, so one install gets you all the LogicUtil nodes. Via ComfyUI Manager: Install Custom Nodes → search "JDCN" → install, restart, done. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-JDCN.git
cd ComfyUI-JDCN
pip install -r requirements.txt

The pack's only dependency is piexif - no models, no GPU requirements, nothing to download. It's a small two-person hobbyist pack (Daxton Caylor and Jerry Davos) and it's mostly known for its file-handling nodes, but the LogicUtil corner is a solid grab-bag of exactly these little quality-of-life tools. This one won't impress anyone on a screenshot, but it's the node you reach for when your workflow needs to breathe.

CategoryLogicUtil

Inputs (2)

NameTypeDefaultDescription
intervalFLOAT0.00
inputsopt*0

Outputs (1)

NameTypeDescription
**