Text Line Prompt (Text-Driven)
Tweak one line of a long prompt without spelunking through 300 characters
- string_out
Text Line Prompt (Text-Driven) is the most genuinely clever node in this pack, and the one I'd steal if I were only taking one. Long prompts are a pain to edit because the thing you want to change is buried - you've got 300 characters of tags and one weight is wrong, and you're squinting at a textarea trying to find it. This node splits your prompt into lines, turns each line into an entry in a dropdown, and lets you pick a line, adjust its weight, or mute it entirely - while it rewrites the raw text for you. Select, slide, done. No spelunking.
How it works
You type (or paste) a prompt into the text box, one fragment per line. The selected_line dropdown is generated live from those lines - the JS numbers them as 1:, 2:, 3:. Pick a line and the multiplier and active controls sync to show that line's current state. Change the multiplier and the node rewrites that line in the text box as standard CLIP attention syntax - (abstract background:1.5) - and tick active off and it prefixes the line with // to comment it out. There's also an optional_text_in pin if you want to merge in an upstream fragment.
At execution, the backend reads the text box, skips //-commented lines, strips trailing commas, and joins the survivors into a single string_out. It's smart about parentheses too: a line that's already a clean (prompt:weight) gets its weight recognized and re-emitted (trailing zeros stripped), while a line with multiple unescaped parens - like ((emphasis)) - is treated as is with the multiplier forced to 1.0, so it won't mangle nested syntax you wrote deliberately.
The bi-directional part is the trick: edit the raw text and the dropdown and controls re-derive from it; touch the controls and the raw text updates. The author calls it "bi-directional editing," and for once the marketing matches the mechanism.
Where people get burned
The default text is a sample anime prompt (complete with escaped parens for emilia (re:zero)), which is cute until you forget it's there and wonder why your output says "blonde hair, speed lines." Replace it. Also remember the // mute is a comment convention, not a true bypass - fine for a prompt fragment, but don't expect it to behave like rgthree-style bypass on the node itself. And all this weight logic is CLIP-era: on Flux or LLM-encoded models the (prompt:1.5) syntax is discarded, so the multiplier is theater there. This node is built for SD 1.5/SDXL/Illustrious-lineage checkpoints.
Install
It ships in ComfyUI Text-Driven Workflows. ComfyUI Manager → search "ComfyUI Text-Driven Workflows" → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/kanryu/ComfyUI-Text-Driven-Workflows.git
Restart. No pip dependencies, no model downloads. One requirement to remember: the pack needs a current ComfyUI with the V3 extension API - on an older install you'll see "Failed to load nodes" and nothing under Text-Driven Workflows until you update.
Bottom line
If you spend your life tuning long prompts on SDXL-lineage checkpoints, this is the node that pays for the pack on its own. The line-based editing genuinely changes how you work with prompt assets, and it composes perfectly with Join Strings downstream. Reach for this one first.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | 1girl, solo, emilia \(re:zero\), blonde hair, (abstract background:1.5), three quarter view, speed lines, (by carnelian:0.6), | — |
| selected_line | COMBO | 1: 1girl, solo, emilia \(re:zero\), blonde hair | 4 options: 1: 1girl, solo, emilia \(re:zero\), blonde hair, 2: (abstract background:1.5), 3: three quarter view, speed lines, 4: (by carnelian:0.6) |
| multiplier | FLOAT | 1.00–10 | — |
| active | BOOLEAN | true | — |
| optional_text_inopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string_out | STRING | — |