ComfyUI Node

VRGDG_SmartSplitTextTwo

Split a block of text in half, without splitting a word

By vrgamegirl19·Created about a year ago·Updated about 7 hours ago· 718
VRGDG_SmartSplitTextTwo
    • part_1
    • part_2
    text

    VRGDG_SmartSplitTextTwo does exactly one thing: take a chunk of text, split it into two roughly equal halves, and hand you both. One text input (multiline), two string outputs: part_1 and part_2. No knobs, no settings, no modes. If you've ever tried to chop a wall of text in half manually and ended up with a split word, you know why this node exists - it's the word-boundary version of that cut.

    Why this pack has it

    Lyrics. The music-video workflow the pack is built around generates video from a track's lyrics, and the practical pattern that emerged in the LTX music-video community is a two-pass render: a full-quality first pass at more steps, then a cheaper final pass. (One widely-shared recipe was 16 steps on the first pass and 4 on the final.) Two passes need the content split in two - part 1 feeds the first pass, part 2 the second - and if the split lands mid-word, you get a prompt that's mangled at the seam. This node exists so the LLM can hand over one big prompt block and the workflow can reliably bisect it.

    How to use it

    Feed it any text you want halved. The node picks a split point near the middle that falls on a word boundary, then outputs both pieces. That's the entire interface. If you've got more than two chunks to split, you can chain it - feed part_2 of one into a second node - though at that point you're probably better off with a list-oriented tool. For the "two roughly even halves" job, this is the one.

    If you're not running the music-video pipeline, it's still a perfectly serviceable utility: splitting a long prompt into a clean two-part structure for prompt-blend nodes, dividing a story text into two scenes, splitting a caption so two different nodes each get a chunk. It's dumb, but dumb in the way that makes it dependable.

    Install

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
    

    or ComfyUI Manager → "vrgamedev", restart. Requirements kornia, librosa, imageio install with it.

    The honest take: this node's value is tied to the workflow it serves. On its own it's a five-second job you could do in any text editor. In the middle of an automated pipeline - where there's no human to make the split and the split has to be reproducible run after run - it's the difference between "the pipeline works" and "the pipeline needs babysitting." That's the whole personality of this pack in one node: small, purpose-built pieces that only make sense together.

    CategoryText

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (2)

    NameTypeDescription
    part_1STRING
    part_2STRING