Nodes/Banana Gemini Image Generator/心宝❤提示词分割
ComfyUI Node

心宝❤提示词分割

Split a pile of prompts into a batch — with a pause button so you don't burn credits on a typo

By 98624017·Created 9 months ago·Updated 4 months ago· 2
心宝❤提示词分割
    • 提示词批次
    text
    移除空行true
    修剪首尾空白true
    暂停等待true
    等待秒数60
    分割上限16

    Batch prompt generation has a nasty failure mode: you paste in a list of prompts, hit run, and discover one of them was mangled - after the generator has already processed all of them. 心宝❤提示词分割 (XinbaoTextSplitter) exists to make that moment survivable. It splits a multi-line block of text into a batch of separate strings, and by default it pauses and makes you confirm before the batch proceeds.

    It's part of the comfyui-banana-li-linux pack by Li Xinbao (李心宝), whose main nodes wrap paid Gemini/Veo/Sora APIs. That context is the whole reason this node exists: when every generation is billed, a "check this before I fire off 16 requests" gate is not a nicety, it's a money-saving feature.

    How it works

    The node takes a text input (multiline) and outputs a batch - 提示词批次 - which is a list of STRINGs rather than a single string. Under the hood it splits the input into segments, and a web extension renders those segments as editable textareas on the node so you can see exactly what's about to be sent. It's an output node, meaning it's a terminal: it sits at the end of the line and hands the batch to whatever consumer you've wired downstream.

    The inputs that matter:

    • 暂停等待 (pause, default on) - with 等待秒数 (wait seconds, default 60, up to 600). When pause is on, the node waits and pops up a confirm button with a countdown. You get one last look at the split lines before anything fires.
    • 移除空行 (drop empty lines, default on) and 修剪首尾空白 (trim whitespace, default on) - the cleanup pass that stops stray blank lines from becoming empty generations.
    • 分割上限 (split cap, default 16, max 256) - a hard ceiling on how many segments get produced, so a pasted paragraph doesn't accidentally become a 200-item batch.

    A confirm route is registered into ComfyUI's local API (/banana/prompt_split/confirm), which is how the button reaches back into the node. If you switch pause off, it just splits and runs - the guard is opt-out, not opt-in, and that default choice is the right one for a paid-API workflow.

    What the batch output wires into

    Anything that accepts a batch of strings - most naturally the pack's own 心宝❤Banana image node, which processes a list of prompts into a batch of images. That's the workflow: paste your prompts, let the splitter segment them, check the preview, confirm, and the generator chews through the list. With the pause on, you can catch the prompt with the typo before it costs you.

    Installing

    Same as the rest of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/98624017/comfyui-banana-li-linux
    

    Restart ComfyUI, or use ComfyUI Manager and search "banana-li-linux" (Linux build; Windows uses comfyui-banana-li, macOS comfyui-banana-li-mac). The pack's dependencies - requests, opencv-contrib-python, Pillow, and friends - install with the pack.

    Where people get burned

    The two toggles that trip people up: if 移除空行 is on and your text is empty or all blank lines, you get an empty batch and nothing downstream runs - don't read that as a broken workflow. And if you're splitting more than 16 segments, the cap will silently truncate until you raise it. The labels are Chinese, so search "心宝" or "提示词" in the node menu. One honest caveat: this is a wrapper around a paid-API pack, so its value is tied to what you're feeding - if you're generating locally for free, the pause feature is nice but not essential. For paid generation, it's the difference between noticing a bad prompt and paying for it.

    Category心宝❤工具

    Inputs (6)

    NameTypeDefaultDescription
    textSTRING
    移除空行BOOLEANtrue
    修剪首尾空白BOOLEANtrue
    暂停等待BOOLEANtrue
    等待秒数INT601–600
    分割上限INT161–256

    Outputs (1)

    NameTypeDescription
    提示词批次STRING