Nodes/comfyui-flower-tools/🌸Flower Split Sentences
ComfyUI Node

🌸Flower Split Sentences

One sentence per line, so your TTS stops rushing the long ones

By weichenglin0215·Created 8 months ago·Updated 2 months ago· 0
🌸Flower Split Sentences
    • split_text
    ◄text►
    ◄split_symbols,.?!;:,。?!;:►

    Here's a TTS quirk most people hit before they understand it: feed a Qwen-TTS node a wall of text with no line breaks and it'll start rushing - the longer a single unbroken "sentence" is, the flatter and faster the read comes out. Flower Split Sentences exists to fix exactly that. It takes one big prompt, screenplay paragraph, or novel chunk and re-emits it with one sentence per line, which is precisely the format line-based TTS models read at a natural pace.

    It's also just a nice prompt-hygiene tool: one idea per line is far easier to eyeball than a run-on paragraph, and it makes a text output you can diff against previous runs.

    How it works

    Dead simple, which is a feature. The node takes your text plus a split_symbols string (default ,.?!;:,。?!;: - both Latin and full-width CJK punctuation), walks the text, and inserts a line break after every symbol it finds. Then it trims whitespace off each line and drops the empties. Punctuation stays glued to the end of its sentence, so "Hello, world." becomes Hello, / world. - wait, no: it splits after every listed symbol, including commas. Feed it 你好,世界。 and you get:

    你好,
    世界。
    

    That's the thing to internalize: split_symbols is a full character set, not just sentence-enders. If you only want breaks at true sentence boundaries (periods, question marks, exclamation marks), narrow the field to 。!?.!? and leave the commas out. This is the single most common mismatch between what beginners expect and what the node does.

    Output is one STRING, split_text, with \n between lines - it's an output node with a UI preview, so you can see the result without wiring it anywhere.

    Where it fits

    The pack author built this for AI voiceover pipelines (Qwen-TTS in particular): long unbroken sentences come out unnaturally fast, so chunking at punctuation keeps pacing and emotion intact. Slot it between a text loader - like the sibling Flower Load Text From Folder - and your TTS node, and the whole long-form-reading problem mostly disappears. For straight image prompts it's less essential; you're usually encoding one or two sentences anyway.

    Install

    Standard pack install, one clone, restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/weichenglin0215/comfyui-flower-tools.git
    

    Or ComfyUI Manager → search ComfyUI Flower Tools. No models, no heavy deps - this node is pure string handling.

    Gotchas

    • The split set is everything-or-nothing per run. Swap the split_symbols widget to the exact set you want; commas and periods can't be split differently in the same pass.
    • It only splits on the symbols you list, full stop. Newlines you already have are preserved (they're just lines that don't get further split if they contain no symbols).
    • Because it strips leading/trailing spaces, indentation you cared about is gone. For prose that's fine; for code-like prompt structures it's not - another reason this node belongs in TTS and text pipelines, not in anything that needs exact whitespace.
    Categoryflower-tools

    Inputs (2)

    NameTypeDefaultDescription
    textSTRING—
    split_symbolsSTRING,.?!;:,。?!;:—

    Outputs (1)

    NameTypeDescription
    split_textSTRING—