Nodes/MW-ComfyUI_MegaTTS3/Multi Line Text
ComfyUI Node

Multi Line Text

The boring node this TTS pack quietly depends on

By billwuhao·Created about a year ago·Updated about a year ago· 211
Multi Line Text
    • text
    multi_line_prompt

    Every TTS pack ships one of these and nobody talks about it. Multi Line Text is a big text box with exactly one job: let you type or paste a script and hand it to the cloning node as a STRING. That sounds like nothing, until you realize the whole MegaTTS3 pack quietly depends on it.

    Why it exists

    MegaTTS3 Run's text input is marked forceInput, which is ComfyUI-speak for "you must wire a value into this - no typing inline." So you need some node that outputs a STRING. And here's the trap that makes this boring node matter: newlines are semantically meaningful to this pack. In single-speaker mode, a blank line separates one utterance from the next - that's how you get the reference clip to say a whole script in one pass instead of one run per sentence. In dialogue mode, [S1] and [S2] tags pick which cloned voice speaks each line. If your text node strips, folds, or reformats whitespace, your carefully structured script silently turns into one run-on blob.

    This node preserves everything. Feed it:

    [S1] MegaTTS 真开源版本来了,效果666
    [S2] 晕 xuan4 是一种 gan3 觉
    [S1] I love you!
    

    ...and what comes out the text output is exactly that, newlines and tags intact, with only leading/trailing whitespace trimmed (the whole implementation is literally a strip() on the input). The author's own example workflows use it in both the single-speaker and two-person setups.

    Using it

    Wire the text output into MegaTTS3 Run's text input, done. Want to actually hear what you typed before committing? ComfyUI's built-in text widget can't drive a forced-input port, so this node - or any equivalent that preserves newlines - is the standard workaround.

    Install and honesty

    Same pack install as its siblings: ComfyUI Manager (search "MW-ComfyUI_MegaTTS3") or clone https://github.com/billwuhao/ComfyUI_MegaTTS3.git into custom_nodes and pip install -r requirements.txt. It has no dependencies of its own and loads nothing heavy - this node is pure UI.

    To be fair, it's also the least special node here. It isn't TTS-specific; a bunch of other multiline-text nodes in other packs will do the same job as long as they pass newlines through untouched. But if you're already in this pack, it's zero extra installs, it's already wired into the author's reference workflows, and it won't mangle your scripts - which is more than you can say for whatever random text node you were about to grab instead. Sometimes the boring node is the right node.

    Category🎤MW/MW-MegaTTS3

    Inputs (1)

    NameTypeDefaultDescription
    multi_line_promptSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING