Nodes/Muse Collective LTX Timeline/Muse Prompt Splitter
ComfyUI Node

Muse Prompt Splitter

From One LLM Wall of Text to Eight Clean Prompts

By muse-collective-26·Created 3 months ago·Updated about a month ago· 8
Muse Prompt Splitter
    • 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
    llm_output

    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 become prompt_N outputs - PROMPT_1: starts the text for segment 1, and parsing stops at the next PROMPT_N: or DURATION_N: marker.
    • DURATION_N: markers become duration_N outputs - 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 _N numbering - bare PROMPT: 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.

    CategoryMuse Collective

    Inputs (1)

    NameTypeDefaultDescription
    llm_outputSTRING

    Outputs (16)

    NameTypeDescription
    prompt_1STRING
    prompt_2STRING
    prompt_3STRING
    prompt_4STRING
    prompt_5STRING
    prompt_6STRING
    prompt_7STRING
    prompt_8STRING
    duration_1STRING
    duration_2STRING
    duration_3STRING
    duration_4STRING
    duration_5STRING
    duration_6STRING
    duration_7STRING
    duration_8STRING