Nodes/ComfyUI Prompt Enhance Nodes/Prompt Magic Empty String
ComfyUI Node

Prompt Magic Empty String

It outputs an empty string. That's it. Here's why you'd wire one in.

By ArtemKo7v·Created 4 months ago·Updated 4 months ago· 0
Prompt Magic Empty String
    • string

    The whole node is one line

    Yes, really. Prompt Magic Empty String takes nothing in and hands you exactly one thing: an empty string. No hidden API, no LLM, no key, nothing to tune. If that sounds useless, you haven't hit the workflow yet where some custom node demands a STRING input you want to keep blank.

    The pack that ships it, ComfyUI Prompt Enhance Nodes, is named like it's about to rewrite your prompts for you. Right now it's early days - this is the only node in the pack, and it's a string utility, not an enhancer. Think of it as the scaffolding: useful on its own, and a decent hint of where the author is headed.

    Why you'd reach for it

    ComfyUI has a hard rule that bites people constantly: if a node declares a required STRING input and you leave that socket unconnected, the workflow errors out - you can't just "not wire it." So when a third-party node insists on text and you genuinely want no text there, you need something that produces the empty string on demand.

    The classic spot is prompt experiments. An XY plot comparing "with negative prompt" against "with no negative prompt" wants an explicit empty string for the blank arm, because an unplugged input is an error and a stray space is not an empty string. Same deal if you're chaining text nodes - concat, prompt builders, seed-in-text boxes - and one segment should contribute nothing.

    That blank arm matters more than it looks: in the CFG-era models (SD 1.5, SDXL, Illustrious), the negative prompt literally replaces an empty string in the unconditioned pass. "No negative" and "empty string" are the same condition, so this is the honest way to build it.

    How it works

    The entire node is about ten lines of Python. INPUT_TYPES returns {"required": {}} - no inputs at all - and its one function, get_empty_string, returns ("",). That's the mechanism: a hard-coded constant with a STRING output named string. No state, no randomness, nothing to go stale.

    One quirk worth knowing: importing the pack also writes a config file to ComfyUI/user/default/ComfyUI-Prompt-Magic/config.json, and it resolves that path from the current working directory. Launch ComfyUI from its own root (the normal case) and it lands exactly where the README says. Launch from somewhere else and it gets created relative to that cwd instead - harmless, but if you ever spot that file in an odd place, that's why. The config isn't read by this node at all; it's clearly meant for the prompt-enhance nodes that haven't shipped yet.

    The only input and output

    • Inputs: none. That's the point of the node.
    • Output string (STRING): always "". Wire it into any STRING input you want blank.

    That's the entire surface. If you need a non-empty constant, use ComfyUI's built-in text node instead - this one only knows how to be empty.

    Install

    This is the easiest install you'll do this month: the pack declares zero dependencies and downloads no models, so nothing to babysit. Via ComfyUI Manager, search "Prompt Magic" (the pack publishes to the Comfy Registry, so Install Missing Custom Nodes can pick it up from a downloaded workflow too). Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ArtemKo7v/ComfyUI-Prompt-Magic
    

    Restart ComfyUI and it appears under the ArtemKo7v category in the node menu.

    Troubleshooting

    There's genuinely not much to break. The honest warnings: the output is "", not None - if some downstream node chokes on an empty string where it wanted at least one character, that's the receiving node's quirk, not this one's. And the pack is v0.0.1 with a single commit, so don't come looking for the prompt-enhance features yet; you're getting a utility node and some config scaffolding. If you showed up hoping for GPT-2-style "Prompt Magic" expansion like the A1111 Dynamic Prompts feature of the same name, this isn't that. Not yet, anyway.

    CategoryArtemKo7v

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    stringSTRING