LatentDelay
The brake pedal for real-time ComfyUI loops
- latent
- LATENT
LatentDelay is the simplest node in this pack, and it's easy to dismiss for that reason. It sleeps. A latent goes in, the node waits a set amount of time, and the exact same latent comes out. Nothing else happens - no sampling, no math, no transformation.
So why would you put a nap in the middle of a generation pipeline? Because real-time loops are the one place in ComfyUI where things move too fast. When you're doing live webcam-to-image work with Auto Queue on - the kind of setup this pack is built around - the sampler will happily chew through frames as fast as your GPU allows. That can outrun your capture app, make an OBS recording stutter, hammer your VRAM for zero visible benefit, or spin the queue so fast you can't actually watch what's happening. A deliberate pause between steps paces the whole loop and keeps the framerate human.
How it works
The implementation is the whole story, from the source:
def LatentDelay(self, latent, delaytime):
time.sleep(delaytime)
return (latent,)
It's time.sleep() in a node wrapper. The latent tensor is untouched - this is a pure pass-through with a timer bolted on. You can drop it anywhere in the latent path (between KSampler and VAEDecode is the usual spot) and the only effect is timing.
Inputs and outputs
- latent - the
LATENTyou want to hold. - delaytime - a float in seconds, default 0.2, adjustable in 0.01 steps up to a max of 1.0.
The single output is the same LATENT, unchanged. If you're wiring it into a live loop, treat the delaytime as "time between frames" and tune it by feel - 0.1–0.3s is a common range for a paced mirror effect.
Installing it
It's part of toyxyz/ComfyUI_toyxyz_test_nodes, so you're not installing this one node in isolation. ComfyUI Manager: search for the pack title and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/toyxyz/ComfyUI_toyxyz_test_nodes
then restart. It has no special dependencies of its own - it's just time.sleep - though the pack itself pulls in heavier stuff (OpenCV, pywin32) for its other nodes.
Two honest caveats
First, the cap: delaytime maxes out at one second. If you want a longer pause, chain a couple of these together or put a different throttle in your loop. Second - and this is the trap to keep in mind - it's a delay, not a buffer. It does not hold the previous latent while a new one generates; it just makes each pass take a little longer. If you actually need to remember the last frame, that's a different node (or a workflow with a cached reference image). For pacing a live loop, though, this little nap node does exactly what it says.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| delaytime | FLOAT | 0.200–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |