Nodes/IAMCCS-nodes/IAMCCS Dialogue Duration Planner
ComfyUI Node

IAMCCS Dialogue Duration Planner

Turn a script into a lip-sync timeline before you generate a single frame

By IAMCCS·Created 11 months ago·Updated 8 days ago· 113
IAMCCS Dialogue Duration Planner
  • cine_linx
  • cine_linx
  • dialogue_cues_json
  • tts_text_a
  • tts_text_b
  • panel_plan_json
  • segment_lengths
  • report
fps24.00
speech_speedaverage_130_wpm
custom_wpm130
additional_time_s0.00
panel_padding_s0.25
min_panel_s0.50
max_panel_s25.0
speaker_split_modedetect_a_b_prefix
timeline_update_modewrite_audio_cues_to_cine_linx
dialogue_text
timeline_data

The single most common way a dialogue-driven LTX video goes wrong is timing: the audio you generated is 6.4 seconds but the shot is locked to 192 frames at 24fps, and the lipsync is off by a mile. IAMCCS Dialogue Duration Planner exists to stop that before it starts. Feed it your script and it estimates how long each line takes to say, pads each panel, splits speaker A/B tracks, and writes the whole timing plan back into the cine_linx state so your TTS, audio, and video length all agree.

It's part of the IAMCCS Cine toolkit - the LTX-focused director's-interface layer inside IAMCCS-nodes. The whole Cine system threads a shared cine_linx blob between nodes, and this node is one of the main places dialogue timing gets baked in.

How it works

It takes either a dialogue_text string or a timeline_data/cine_linx board, walks line by line, and estimates speech length from words per minute. Each line becomes a dialogue cue with a speaker, start time, estimated duration, and frame count. It's smarter than a naive word count: it respects A|0.0|text style prefixes, extracts quoted speech, and can detect A: / B: speaker prefixes, alternate speakers, or dump everything to speaker A.

The two knobs that control the feel are speech_speed (average 130 wpm, slow 100, fast 160, or custom_wpm) and additional_time_s for deliberate pauses. panel_padding_s adds breathing room around each line, clamped by min_panel_s and max_panel_s.

timeline_update_mode decides what happens to the result: report_only just shows you the plan, write_audio_cues_to_cine_linx stores the cues (the default - this is what makes downstream nodes agree), and extend_visual_segments_in_cine_linx also stretches the visual timeline so panels are long enough for their dialogue.

Inputs and outputs that matter

Set fps to match your pipeline, pick a speech_speed, and paste the script into dialogue_text (or connect a board). That's genuinely it for a first pass.

Outputs worth knowing:

  • cine_linx - the updated state; keep this connected to whatever consumes the plan.
  • dialogue_cues_json - the full timing plan if you want to inspect or store it.
  • tts_text_a / tts_text_b - per-speaker text ready to drop into your TTS node of choice.
  • panel_plan_json and segment_lengths - the per-panel durations, which feed video length/segment nodes.
  • report - a JSON rundown of what got planned.

Installing it

It ships inside IAMCCS-nodes, so install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git

Restart ComfyUI (or install via Manager by searching "IAMCCS"). Requirements are the modern stack: ComfyUI ≥ 0.3.0, Python ≥ 3.12, Torch ≥ 2.8. No model files - the planning is pure text math.

Where people get burned

The estimates are just estimates. A 130 wpm average is a decent default, but emotional delivery, pauses, and your TTS voice all shift real duration. Use the companion Dialogue Timing Reconciler with your actual rendered audio - it compares the real duration against this plan's target and reports the delta. And remember this node writes into cine_linx; if you wire it up but leave timeline_update_mode on report_only, nothing downstream will see the plan and your sync will silently drift. Check the report if the timing looks off.

CategoryIAMCCS/Cine/Audio

Inputs (12)

NameTypeDefaultDescription
cine_linxIAMCCS_SUPERNODE_LINX
fpsFLOAT24.001–120
speech_speedCOMBOaverage_130_wpm4 options: average_130_wpm, slow_100_wpm, fast_160_wpm, custom_wpm
custom_wpmFLOAT13040–320
additional_time_sFLOAT0.000–30
panel_padding_sFLOAT0.250–10
min_panel_sFLOAT0.500–60
max_panel_sFLOAT25.00.5–600
speaker_split_modeCOMBOdetect_a_b_prefix3 options: detect_a_b_prefix, alternate, all_to_a
timeline_update_modeCOMBOwrite_audio_cues_to_cine_linx3 options: report_only, write_audio_cues_to_cine_linx, extend_visual_segments_in_cine_linx
dialogue_textoptSTRING
timeline_dataoptSTRING

Outputs (7)

NameTypeDescription
cine_linxIAMCCS_SUPERNODE_LINX
dialogue_cues_jsonSTRING
tts_text_aSTRING
tts_text_bSTRING
panel_plan_jsonSTRING
segment_lengthsSTRING
reportSTRING