Multiline Text
A multiline text box that eats your comments
- STRING
The name undersells it. ComfyUI already gives you multiline text fields all over the place, so "Multiline Text" alone isn't news. The thing that earns this node a spot in a workflow is hiding in the function name: get_text_without_comments. On every line, everything from a # to the end of the line gets stripped before the text goes anywhere downstream.
That turns one text box into a little prompt library. Put your active prompt on top, then a few commented-out alternatives underneath:
masterpiece, 1girl, outdoors, afternoon light
# alt: close-up, shallow depth of field
# alt: night scene, neon sign
To switch variants you just move the #, rerun, and the sampler only ever sees the line that isn't commented. On the SDXL-lineage models most people still run (Illustrious, Anima, Pony), where block-structured prompting has become the norm, this is also handy for keeping block labels as comments above each chunk - the label stays in the node for you, the model never sees it.
How it works
The whole mechanism is one regex: re.sub(r'#.*', '', text). Because . doesn't match a newline, the strip runs per line, so a comment on one line never swallows the line below. It's deterministic, stateless, and effectively free. There is no batch of inputs, no mode dropdown - just the text and the strip.
Inputs and output
The only input is text, a multiline STRING. The only output is a STRING, which you'd normally wire straight into a CLIP Text Encode. That's the entire schema.
One honest quirk: the strip happens wherever the # lands, not just at line starts. A literal hash in the middle of your prompt gets eaten too. That's rare in practice, but if you're prompting a model that expects a # character in the text, this node will quietly remove it.
Installing it
This pack has no README at all - the repo is just the code - so the real install path is the Comfy Registry entry baked into its pyproject.toml. Easiest route: ComfyUI Manager → Install Custom Nodes → search "ComfyUI Simply Nodes" and install, then restart ComfyUI. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Wicloz/ComfyUI-Simply-Nodes
Restart ComfyUI and the node shows up as Multiline Text under the prompt category. There's no requirements.txt and no extra model download - the pack only needs what a stock ComfyUI already has (torch, numpy, PIL), so nothing heavy is pulled in.
Common issues
- Comments don't disappear: remember the strip is
#to end of line, so#must actually be in the line. Also, since this is a stateless transform, the node re-runs on every queue - there's no caching weirdness to fight. - Literal
#in your prompt: avoid this node and use a plain text field, since#is unconditionally stripped. - Blank lines: they pass through as empty strings. Downstream CLIP encoding handles that fine, so no action needed.
If you're just comparing two prompt variants and hate touching wires, this is the node. If you want random variants instead of manual toggling, the same pack has Random Style Prompt - but that's a different job.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |