Muse Prompt Splitter
From One LLM Wall of Text to Eight Clean Prompts
- prompt_1
- prompt_2
- prompt_3
- prompt_4
- prompt_5
- prompt_6
- prompt_7
- prompt_8
- duration_1
- duration_2
- duration_3
- duration_4
- duration_5
- duration_6
- duration_7
- duration_8
This is the glue node for the "let an LLM direct your timeline" pipeline. You feed it one block of LLM-generated text and it splits it into up to eight separate segment prompts and eight separate per-segment durations, using labeled markers in the text. It exists to solve the specific awkwardness of wiring an LLM's multi-part output into MuseDirectorSamplerV10's segment_override_1..8 inputs without copy-pasting or hand-splitting.
It's a pure text utility - no models, no GPU, no dependencies beyond Python's regex module. That makes it one of the friendliest nodes in this pack to get working.
How it works
Two independent regex passes over the input:
PROMPT_N:markers becomeprompt_Noutputs -PROMPT_1:starts the text for segment 1, and parsing stops at the nextPROMPT_N:orDURATION_N:marker.DURATION_N:markers becomeduration_Noutputs - parsed by a separate regex so duration text can never leak into the prompt outputs.
That separation is the whole design point. A DURATION_2: line sitting directly under PROMPT_2: is captured as a duration, not appended to the prompt text, because the prompt regex explicitly stops at DURATION_N: markers too. If you've ever watched a model's duration estimate get mangled into the prompt it was supposed to describe, you know why this matters.
The workflow it pairs with: an LLM node (Ollama, LM Studio, QwenVL - anything that returns text) with a system prompt instructing it to expand a scene description into labeled LTX 2.3 segment prompts, then:
PROMPT_1: A woman walks into a cafe, [SOUNDS] door chime, coffee machine hiss
DURATION_1: 12
PROMPT_2: She sits down, [SPEECH] I'll have the usual, please
DURATION_2: 8
Wire prompt_1..8 into V10's segment_override_1..8 inputs. The duration_N outputs are informational only - the node won't apply them to the timeline for you; read them and type them into the timeline by hand (or wire to a Show Text node).
Inputs and outputs
One input: llm_output (multiline STRING, forced as an input connection). Sixteen outputs: prompt_1..8 and duration_1..8, all STRING. Empty slots return empty strings, so downstream nodes always get the full set.
Installing it
Part of the same pack:
cd ComfyUI/custom_nodes
git clone https://github.com/muse-collective-26/muse-ltx-timeline
Restart. That's it - it shares the pack's av/torchaudio/soundfile requirements by virtue of living in the same folder, but the node itself uses only re.
Gotchas
- The LLM has to follow the format. No
PROMPT_N:markers found → the node logs a warning and returns all empty strings. If your LLM drifts from the label format, fix the system prompt, not the node. - Marker matching is case-insensitive (
prompt_1:works), but the input needs the_Nnumbering - barePROMPT:with no index is ignored. - It's capped at 8; segments past that are silently dropped.
If you've already got an LLM writing your LTX prompts, this node is the missing seam between "model wrote me a whole script" and "the director needs per-segment text." Ten minutes to set up, and it removes the fiddliest manual step in the pipeline.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_output | STRING | — |
Outputs (16)
| Name | Type | Description |
|---|---|---|
| prompt_1 | STRING | — |
| prompt_2 | STRING | — |
| prompt_3 | STRING | — |
| prompt_4 | STRING | — |
| prompt_5 | STRING | — |
| prompt_6 | STRING | — |
| prompt_7 | STRING | — |
| prompt_8 | STRING | — |
| duration_1 | STRING | — |
| duration_2 | STRING | — |
| duration_3 | STRING | — |
| duration_4 | STRING | — |
| duration_5 | STRING | — |
| duration_6 | STRING | — |
| duration_7 | STRING | — |
| duration_8 | STRING | — |