IAMCCS Speech1 Prompt Compiler
Turn dialogue rows into LTX speech prompts with one token swap
- cine_linx
- cine_linx
- global_prompt
- local_prompts
- segment_lengths
- dialogue_script
- foley_prompt
- report
LTX-2.3 does speech, but getting spoken lines into the prompt is fussy - the model wants the dialogue embedded in the conditioning in a specific way, and doing it by hand across a whole scene is exactly the kind of busywork that breeds typos. Cine Speech1 Prompt Compiler exists to remove that step. It takes your shotboard plan, finds the dialogue rows, and replaces a placeholder token - <speech1> by default - inside each local prompt with the actual spoken line, optionally appending scene context and voice style so the model knows who's speaking and how.
The docstring is refreshingly plain: "Compile BoardMaker dialogue rows by replacing <speech1> inside local prompts." That's the whole job, and it's a real one.
How it works. You feed it a cine_linx from a planner that carries dialogue rows. The node walks the local prompts, swaps in the speech_token (default <speech1>) for the row's dialogue text, and - with append_scene_context and append_voice_style both defaulting to on - tacks on scene context and the voice-direction line so the prompt reads like a line reading, not a transcription. Then it hands the enriched plan back out.
The outputs. The modified cine_linx (so you can keep chaining), plus a spread of strings that are handy to inspect or wire elsewhere: global_prompt, local_prompts (the compiled ones), segment_lengths, dialogue_script (the extracted dialogue as a script), foley_prompt (a prompt for the sound-design/foley side), and report. If you've ever wanted to see what your speech prompts actually look like before you commit to a long generation, dialogue_script and local_prompts are exactly that.
The inputs. Only three beyond the cine_linx: speech_token (which placeholder to replace, <speech1> by default), append_scene_context (bool, on), and append_voice_style (bool, on). If your templates use a different token, change it here - no code.
Install. Pack-wide: ComfyUI Manager (search "IAMCCS"), or git clone https://github.com/IAMCCS/IAMCCS-nodes into custom_nodes, restart. Pure text composition - no models, no VRAM.
Gotchas. The token must actually appear in your local prompts, or nothing gets substituted and you'll wonder why the model ignores the dialogue. Check your planner's prompt templates use <speech1> (or set speech_token to whatever they use). Also note this compiles prompts for the generation; it doesn't validate the speech itself, and LTX speech output still has the usual quirks - mouth shapes land best on close-ups, and background characters occasionally start mouthing along. That's the model, not the compiler.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| cine_linx | IAMCCS_SUPERNODE_LINX | — | |
| speech_token | STRING | <speech1> | — |
| append_scene_context | BOOLEAN | true | — |
| append_voice_style | BOOLEAN | true | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| cine_linx | IAMCCS_SUPERNODE_LINX | — |
| global_prompt | STRING | — |
| local_prompts | STRING | — |
| segment_lengths | STRING | — |
| dialogue_script | STRING | — |
| foley_prompt | STRING | — |
| report | STRING | — |