Nodes/ComfyUI-TypeAux/PromptTextNodeFunction
ComfyUI Node

PromptTextNodeFunction

The five-second fix when your prompt won't plug into OmniGen

By sleechengn·Created 2 years ago·Updated about a year ago· 0
PromptTextNodeFunction
    • TEXT
    text

    You're building an OmniGen workflow and your prompt wire snaps back like a rubber band every time you drag it toward the text input. That's not a glitch, and it's not the plugin being broken - it's a type mismatch. OmniGen-family nodes declare their text input as TEXT, and a normal ComfyUI text node hands you STRING. ComfyUI treats those as different socket types, so the wire simply won't seat, even though both are "some text."

    PromptTextNodeFunction exists to bridge exactly that gap. It's a one-input, one-output passthrough: it takes your STRING and hands it back typed as TEXT. The entire logic is a single line - the encode function just returns the text you gave it. Nothing is transformed, trimmed, or interpreted. It's a compatibility shim, pure and simple, and that's the whole job. The author says as much in the README: the OmniGen plugin has a TEXT input that's incompatible with STRING, so they made a node that's compatible.

    There is one small behavior worth knowing while you're in there: the input is flagged dynamicPrompts, so placeholders like {seed} or {width} still get expanded on the way through. Handy if your OmniGen prompt wants numbers swapped in at queue time.

    Inputs and outputs are as boring as they get:

    • text - STRING, multiline. Your prompt, typed into the box or wired in from another text node.
    • TEXT (output) - plug this into whatever node declared a TEXT socket, meaning OmniGen's text encoder or any of the small handful of other nodes that use that type.

    To install it, clone the pack into your custom nodes folder and restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sleechengn/ComfyUI-TypeAux
    

    Or search "ComfyUI-TypeAux" in ComfyUI Manager's Install Custom Nodes and let it do the same thing. The pack ships with an empty dependency list - no pip installs, no model downloads - so there's basically nothing to go wrong. The node lands under the "ComfyUI-TypeAux" category in the menu.

    When should you reach for it? Only when you actually hit a TEXT socket. If you never touch OmniGen, you will never need this node, and that's fine - it's not a tool, it's an adapter. But if you do, it's the difference between a workflow that works and an afternoon of googling "why won't my text connect."

    If the wire still won't seat after the adapter, double-check the target node really wants TEXT and not STRING - some OmniGen integrations expose a normal string input, and in that case you don't need this node at all. And since it's a pure passthrough, "nothing changed" is the expected outcome. If your prompt comes out identical, that means it worked.

    CategoryComfyUI-TypeAux

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    TEXTTEXT