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

Multi-Clip Text Script: Clip Selector

Pick one shot out of your script

By TuonoMindCode·Created 10 months ago·Updated 8 months ago· 1
Multi-Clip Text Script: Clip Selector
  • pair_data
  • negative
  • clip_text
  • negative_text
clip_number1
auto_formatfalse
log_to_consolefalse

The Multi-Clip Text Script: Main node parses your whole multi-shot script into one encoded blob. This node is the other half of the pair: it takes that blob and hands back exactly one clip's prompt, formatted for your text encoder. Nothing more. It's the selector in a jukebox - you dial the track number and you get the song.

How it works. pair_data arrives from Main as a single string with internal separator markers. The node splits it apart, grabs the clip at your chosen index, and reassembles prefix + clip + suffix into a plain string. Ask for clip 99 of a 3-clip script and it clamps to the last valid index instead of erroring - a small kindness that can also quietly hide a typo, so don't assume the clamp means your number was right.

The inputs you actually set:

  • pair_data - required, straight from Main (or Main Simple). This node does nothing without it.
  • clip_number - 1-based index, 1 = first clip. This is the one you'll touch constantly. Drive it in a loop and you render every shot in sequence without touching the graph.
  • auto_format - False (default) joins parts with blank lines. True collapses everything into one comma-joined line - prefix, clip, suffix. - and adds a trailing period if there's no punctuation. It's opinionated; if your encoder prefers raw text, leave it off.
  • log_to_console - prints the exact prompt to your terminal. Genuinely useful the first time you're unsure what text the encoder actually received.
  • negative - optional passthrough. Wire Main's multi_clip_negative here so your shared negative rides along.

Outputs. Two: clip_text (a STRING, the finished prompt for the selected clip - feed it to your text encoder's positive input) and negative_text (the negative passthrough, for the encoder's negative input, if your model still reads one).

Typical wiring:

Main.pair_data             → Clip Selector.pair_data
Main.multi_clip_negative   → Clip Selector.negative
Clip Selector.clip_text    → text encode (positive)
Clip Selector.negative_text → text encode (negative)

Then render per-clip by changing clip_number, or automate it. That's the entire loop.

Gotchas. The pair_data and negative socket types exist only inside this pack - they won't connect to anything else, and they mean nothing if the pack isn't loaded. And again: one-based indexing. Clip 1 is the first clip, not clip 2. The node's own out-of-range clamp means you can feed it garbage all day and it'll silently pick an edge clip.

Install is the pack install: cd ComfyUI/custom_nodes && git clone https://github.com/TuonoMindCode/ComfyUI-MultiClip-Text-Script, restart, done. No models, no dependencies - pure text plumbing. It's a thin utility, but it's the piece that makes the whole script system usable, and once you've built a multi-shot workflow around it you'll miss it in any graph that doesn't have it.

CategoryText / Multi-Clip

Inputs (5)

NameTypeDefaultDescription
pair_dataMULTICLIP_PAIR_DATA
clip_numberINT11–999
auto_formatoptBOOLEANfalse
log_to_consoleoptBOOLEANfalse
negativeoptMULTICLIP_NEGATIVE

Outputs (2)

NameTypeDescription
clip_textSTRING
negative_textSTRING