ComfyUI Node

Add Delay

The node that just waits, so you don't have to

By Merserk·Created 9 months ago·Updated about a month ago· 6
Add Delay
  • input
  • output
delay6.0

Add Delay does one thing: it holds onto whatever you feed it for a set number of seconds, then passes it through unchanged. That sounds useless until you've built an interactive workflow - something that watches a folder, waits for a file to finish writing, or throttles a network call - and discovered ComfyUI will happily race ahead into data that isn't ready yet. This node is the "give it a second" you bolt into the data path when a step needs the previous one to actually finish on its own schedule.

How it works

The delay is asynchronous, which is the detail that makes it safe to use: instead of blocking the whole Python execution thread while it counts down, it awaits an asyncio.sleep. ComfyUI's V3 runtime can keep doing other work in the meantime, so a 30-second delay here doesn't freeze the rest of the queue. It's also a true type-preserving passthrough - the input uses ComfyUI's match-type template, so the output wire keeps whatever type you connected (IMAGE, LATENT, MODEL, anything), which is why it slots into the middle of a pipeline without breaking downstream connections.

The two inputs:

  • input - anything at all. It comes out the other end identical.
  • delay - seconds, as a float with 0.1 step, default 6, max 3600 (an hour). Zero is allowed, and it makes the node a no-op passthrough. Values are clamped at zero, and a garbage value falls back to the 6-second default rather than crashing.

Output is output, the unchanged value.

Realistic uses: pacing an interactive marquee flow so a crop selector has time to appear before the pipeline continues, letting an external process (an API call, a file copy) land before the next node reads it, or just throttling a fast batch loop that's hammering something. For debugging timing issues it's also genuinely handy - insert one to see what a workflow looks like when a specific stage is forced to wait.

Installing

This is one of the 26 nodes in ComfyUI-Flow-Assistor - ComfyUI Manager (search "Flow Assistor") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Merserk/ComfyUI-Flow-Assistor.git

Restart after cloning. Current ComfyUI required (the pack is V3-only); no extra dependencies.

Where people get burned

The main trap is expecting it to pause the whole workflow. It doesn't - it only delays its own branch. Everything downstream of it waits (it's in the data path), but parallel branches keep running, so don't use it as a global "start everything later" switch. Also, because the node is stateful about execution (not_idempotent), re-running a graph in ComfyUI's "always run" preview mode will make you wait the full delay every time something upstream changes - set the delay to 0 while you're editing, then dial it in for the real run. And remember it's a passthrough with zero transformation: if the thing you're waiting for needs the delay to be on the other side of a node, put it where the data actually stops flowing.

Categoryflow-assistor/flow

Inputs (2)

NameTypeDefaultDescription
inputCOMFY_MATCHTYPE_V3
delayFLOAT6.00–3600

Outputs (1)

NameTypeDescription
outputCOMFY_MATCHTYPE_V3