Nodes/ComfyUI_to_webui/💧Gradio Positive Prompt
ComfyUI Node

💧Gradio Positive Prompt

The positive-prompt box in your packaged ComfyUI workflow

By kungful·Created 2 years ago·Updated 8 months ago· 25
💧Gradio Positive Prompt
    • STRING
    string
    nameGradioTextOk

    GradioTextOk (💧Gradio Positive Prompt) is the whole reason people reach for the ComfyUI_to_webui pack: it's the text box that appears in your Gradio frontend so whoever runs your workflow can type their own prompt without ever seeing a node. You put it between your prompt-writing and your CLIP encoder, and suddenly "wrap this workflow as a webui" means something real.

    Mechanically it's a boring passthrough. It takes a string, returns the same string, and does nothing else - the description claims it "encodes a text prompt using a CLIP model," which is a copy-paste lie; there's no encoding in the code. The encoding happens later, in your regular CLIPTextEncode, when you wire the STRING output into its text input. The clever part is the name input: the Gradio frontend finds every GradioTextOk in your saved workflow JSON and renders one prompt box per node, labeled with that name. Drop in three of them and you get three positive-prompt boxes.

    That's the "dynamic component" behavior the README advertises. Up to a configurable max (5 by default) of these, LoRA selectors, and float/int inputs will each spawn a matching control in the UI, and the values you type get written back into the right node when the run fires. For a beginner the honest summary: string is the actual prompt text, name is just the label, and the output plugs straight into CLIPTextEncode's text slot.

    Install comes with the pack: ComfyUI Manager → search "ComfyUI_to_webui", or

    cd ComfyUI/custom_nodes
    git clone https://github.com/kungful/ComfyUI_to_webui.git
    

    then restart. No models, no extra downloads. Remember the workflow needs to run once inside ComfyUI so the pack can auto-save the API JSON it serves from; that's how the UI knows which boxes to draw.

    The classic pairing: GradioTextOk → CLIPTextEncode → your sampler, with a 🔥Gradio Negative Prompt node (GradioTextBad) for the negative. There's no per-node trickery beyond that - this is one of those cases where the value is the plumbing around the node, not the node itself. If you're packaging a workflow for someone who wants to type prompts and hit go, this is the box they'll type into.

    Category❤️ 靓仔 ✨

    Inputs (2)

    NameTypeDefaultDescription
    stringSTRINGThe text to be encoded.
    nameSTRINGGradioTextOk节点名称

    Outputs (1)

    NameTypeDescription
    STRINGSTRING