Nodes/comfyui-mixlab-nodes/DynamicDelayByText ♾️Mixlab
ComfyUI Node Runs on cloud

DynamicDelayByText ♾️Mixlab

Pace your workflow to how long text takes to speak

By MixLabPro·Created 3 years ago·Updated 2 months ago· 1,859
DynamicDelayByText ♾️Mixlab
  • any_input
  • output
delay_seconds1
delay_by_text
words_per_seconds1.50
replace_output
replace_value-1

The README describes this node plainly: it "allows delayed execution based on the length of the input text," and ships an example (audio-chatgpt-workflow.json) built around exactly that use case. If you're building something that talks - a chatbot avatar, a narrated slideshow, anything where a TTS clip needs to finish playing before the next step fires - you need a delay that scales with how much text there is, not a fixed guess. This node estimates that duration from the text itself instead of making you hardcode a number that's wrong for half your outputs.

How it works

Give it delay_by_text and a words_per_seconds rate (default 1.5), and it estimates how long that text would take to speak, then holds any_input for that duration before passing it through as output. Skip the text entirely and just set delay_seconds for a flat, fixed wait instead. There's also a replace mode: with replace_output set to enable, the node swaps in replace_value instead of forwarding any_input once the delay is over - useful if you want a placeholder or reset value to appear after the pause rather than the original input unchanged.

The inputs and outputs that matter

  • delay_seconds (INT, default 1, required) - the flat delay when you're not driving it off text length.
  • any_input (accepts anything, optional) - the value that gets held and then passed through.
  • delay_by_text (STRING, multiline, optional) - the text whose length determines the delay.
  • words_per_seconds (FLOAT, default 1.5, optional) - your pacing rate. Adjust it to roughly match your TTS voice's actual speaking speed.
  • replace_output (enum disable/enable, optional) and replace_value (INT, default -1, optional) - swap the passthrough for a fixed value once the delay completes.

The output is output, typed loosely to match whatever any_input was.

How to install it

Ships with the Mixlab pack.

  • ComfyUI Manager: search comfyui-mixlab-nodes, install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/shadowcz007/comfyui-mixlab-nodes.git, install requirements (install.bat on Windows, or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt), restart.

No model downloads for this specific node.

Common issues & troubleshooting

The timing doesn't line up with my actual audio. words_per_seconds is a rough average - real speech has pauses, punctuation, and varies by voice, so treat this as "close enough for sync," not frame-accurate. Tune the rate toward your specific TTS voice rather than trusting the default blindly.

Nothing seems to delay at all. Check that delay_by_text is actually filled in if you're relying on text-based pacing - with it empty, the node most likely falls back to the flat delay_seconds, which defaults to a bare 1.

Queue times balloon. A delay here is a real wall-clock wait, not a scheduling hint - chaining several of these, or using it on a long batch, adds up fast. Fine for pacing a handful of narrated steps; not something to sprinkle everywhere.

Category♾️Mixlab/Utils

Inputs (6)

NameTypeDefaultDescription
delay_secondsINT10–1000000
any_inputopt*
delay_by_textoptSTRING
words_per_secondsoptFLOAT1.500–1000
replace_outputoptCOMBO2 options: disable, enable
replace_valueoptINT-10–1000000

Outputs (1)

NameTypeDescription
output*