ComfyUI Node

Sleep

ComfyUI's most honest delay

By Duanyll·Created 11 months ago·Updated 4 months ago· 2
Sleep
  • signal
  • *
seconds1.0

Sleep pauses execution. That's the entire job: two inputs, a delay, and the signal passes through when the timer's up. It sounds useless, and in most workflows it is - which is exactly why you should know the one scenario where it's the right tool: debugging.

The inputs

  • signal - any value that gets passed through untouched after the delay.
  • seconds - how long to sleep, default 1.0, range 0–60, in 0.1 steps.
  • output - the same signal, after the wait.

No magic beyond a time.sleep(seconds) in the node's run method. The signal input exists so the sleep is anchored to the graph - the node only sleeps once the thing feeding signal has actually produced a value.

The actual use case: reading Inspect output

This pack includes an Inspect node that taps intermediate values for debugging. The catch: in a fast loop, the inspect output can blink by too quickly to read in the UI. That's the README's stated reason Sleep exists - "Pair with Sleep if the output blinks too fast in the viewer." Drop a Sleep after the inspect, set a second or two, and you buy yourself time to actually look at what the loop produced before it gets overwritten.

It's also useful as a crude pacing device: if you're watching a workflow run to verify execution order (did stage A actually finish before B?), a visible pause makes the sequence legible. That's a debugging trick, not a production technique.

The honest take

For anything beyond debugging, Sleep is a hack, and you should say so out loud. It doesn't make a model load faster, doesn't pace a sampler, doesn't rate-limit anything useful - it just burns wall-clock time. If you find yourself reaching for it "so the UI looks nicer," question the workflow underneath. The pack's own docs frame it as a helper for studying Inspect output, and that's where it earns its keep.

Where people get burned

  • Sleeping a whole pipeline. A Sleep on the main path delays everything downstream. Anchor it to the branch you actually want to slow down.
  • Seconds wired from a surprise source. It's a FLOAT up to 60; if it's wired to an unbounded value the run just crawls.
  • Expecting it to run when nothing consumes its output. Like all side-effect-ish nodes here, if nothing depends on the output, the branch may not execute at all - chain it where it matters.

Installing it

Part of Duanyll/comfyui_functional (side_effects category). ComfyUI Manager: search "Duanyll/comfyui_functional", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/comfyui_functional
# restart ComfyUI

No models, no pip deps. Keep it for debugging sessions, pair it with Inspect, and take it out before you share the workflow - nobody wants to wait two seconds a run because of a leftover Sleep.

Categoryduanyll/functional/side_effects

Inputs (2)

NameTypeDefaultDescription
signal*
secondsFLOAT1.00–60

Outputs (1)

NameTypeDescription
**