Nodes/ComfyUI-MultiClip-Text-Script/Multi-Clip Text Script: Main
ComfyUI Node

Multi-Clip Text Script: Main

All your shots' prompts, in one box

By TuonoMindCode·Created 10 months ago·Updated 8 months ago· 1
Multi-Clip Text Script: Main
    • pair_data
    • num_clips
    • multi_clip_negative
    prefix_text
    multi_clip_script(clip01) woman walks forward and waves to the camera (clip02) woman walks forward and gets angry (clip03) woman throws the phone
    suffix_text
    negative_text

    If you've tried to make a multi-shot video in ComfyUI - say a minute-long Wan 2.2 clip stitched together from 81-frame segments with crossfades - you know the real bottleneck isn't the sampler. It's the prompt. You're editing the same line in six different text boxes, tweaking "woman walks forward" for shot three and praying shot one doesn't break. Multi-Clip Text Script: Main is a one-box answer to that specific annoyance.

    It's a pure text-organizing node. No models, no API calls, no requirements.txt - the whole pack is a single Python file that imports only re, the standard library's regex module. Nothing to download, nothing to train, nothing that phones home. The author (TuonoMindCode, a hobbyist whose contact details end in a Swedish ISP) built it while making exactly the Wan 2.2 workflow described above, and it shows: small, honest, made for one job.

    How it works. You write one script with labeled sections:

    (clip01)
    woman walks forward and waves to the camera
    
    (clip02)
    woman walks forward and gets angry
    
    (clip03)
    woman throws the phone
    

    The node regex-parses the script, sorts clips numerically (so (clip1), (clip02), (clip10) come out as 1, 2, 10), and packs everything into a single encoded string it calls MULTICLIP_PAIR_DATA, using separator markers you never type and never see. The companion Clip Selector node unpacks it later. That's the whole mechanism - no state, no side effects, just text in, text out.

    The inputs that actually matter. You'll set three of them:

    • prefix_text - boilerplate you want in every shot: subject, style, lighting. cinematic, natural light, handheld.
    • multi_clip_script - the labeled per-shot script above. This is the heart of the node.
    • suffix_text - appended after every clip: camera movement, quality tags. soft bokeh, film grain.

    There's one optional input, negative_text, a shared negative prompt applied to all clips. It's optional for a reason: if you're on an LLM-encoded model at CFG 1, a negative box does little for you anyway.

    Outputs. Three: pair_data (feeds Clip Selector), num_clips (an INT sanity check - how many shots it found), and multi_clip_negative (the shared negative, passed along the chain). Wire pair_data → Clip Selector, and Clip Selector's clip_text → your text encoder.

    Install. The real way, straight from the README:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TuonoMindCode/ComfyUI-MultiClip-Text-Script
    

    Restart ComfyUI and search "Multi-Clip Text Script". ComfyUI Manager users can search the pack title instead. No model files, no heavy dependencies - the kind of install that makes you appreciate how rare it is.

    Where people get burned:

    • num_clips is 0 / nothing selects. Each section needs the (clipNN) label on its own line, case-insensitive but must match the (clip<number>) pattern. If nothing parses, pair_data still carries your prefix and suffix and num_clips is 0 - the node won't tell you it failed loudly.
    • Custom types. pair_data and multi_clip_negative are types invented by this pack. They only wire to this pack's nodes. If the wires don't connect, the pack isn't loaded.
    • One-based numbering. Clip 1 is the first clip. The selector clamps out-of-range values rather than erroring, which can quietly hide a bug.

    Honest take: this won't fix SVI drift, and it can't hold a face for you. But the SVI-era lesson is that consistency between shots is a prompt problem as much as a model problem - and this gives you one place to keep prefix and suffix locked while varying the action per shot. That's a real lever for the classic "why do her expressions change every half second" complaint.

    CategoryText / Multi-Clip

    Inputs (4)

    NameTypeDefaultDescription
    prefix_textSTRING
    multi_clip_scriptSTRING(clip01) woman walks forward and waves to the camera (clip02) woman walks forward and gets angry (clip03) woman throws the phone
    suffix_textSTRING
    negative_textoptSTRING

    Outputs (3)

    NameTypeDescription
    pair_dataMULTICLIP_PAIR_DATA
    num_clipsINT
    multi_clip_negativeMULTICLIP_NEGATIVE