Commentable Multiline Text
Commentable Multiline Text
- text
Every prompt builder ends up doing the same dance: you want to A/B test whether red hair or blonde hair is better, so you keep deleting one, regenerating, and retyping it. Commentable Multiline Text gives your prompts a comment syntax. Write # this is a comment or // this is also a comment on any line and it's stripped from the output - so you keep both candidates in the box and flip which one is active by adding or removing a single character.
It reads like a small QoL node, and it is. But if you're the kind of person who treats the prompt box like a scratchpad, it quietly changes how you work.
How it works
The node splits your multiline text into lines, drops any line whose first non-whitespace character is # or //, skips blank lines, and joins what's left with the separator (default ,). So this:
1girl
blue eyes
# red hair
blonde hair
// test tag
outputs 1girl, blue eyes, blonde hair.
Two details show the author thought about the CLIP world this lives in. First, it avoids duplicate separators when joining - a tag ending in , won't produce ,,. Second - and this is the subtle one - it escapes parentheses in plain tags so (red hair) becomes \(red hair\), meaning CLIP reads a literal tag instead of an attention weight. Genuine weighted tags like (red hair:1.2) are left alone. If you've ever had a tag vanish because its parentheses were interpreted as weights, you'll appreciate that this is handled for you.
Inputs and outputs that matter
text- multiline input. The comments go here.separator- what joins surviving lines.,is the sane default for CLIP-era tag prompts.
Output: text, a single string ready for CLIP Text Encode or to chain into this pack's Join Texts / Toggle Tags nodes.
Install
Search craftgear in ComfyUI Manager and install a numbered version (the nightly option fails on security restrictions, per the README), or:
cd ComfyUI/custom_nodes
git clone https://github.com/craftgear/comfyui-craftgear-nodes
Restart ComfyUI. No models, no dependencies beyond what ComfyUI already has.
Where people get burned
- You can't comment mid-line. Comments are line-based -
blonde hair # maybekeepsmaybein the output. Put the comment on its own line. - Empty separator falls back to
,. If you want lines joined with nothing, that's not this node's job. - It's not a wildcard engine. If your comments start with
{for dynamic prompts, this isn't the same feature - this is plain on/off toggling via the comment character. Keep expectations honest and it won't disappoint.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| separator | STRING | , | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |