Nodes/ComfyUI_LayerStyle_Advance/LayerUtility: UserPrompt Generator Txt2Img(Advance)
ComfyUI Node Runs on cloud

LayerUtility: UserPrompt Generator Txt2Img(Advance)

Turn a one-line idea into a proper user_prompt for the pack's LLM nodes

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerUtility: UserPrompt Generator Txt2Img(Advance)
    • user_prompt
    template
    describe1 girl
    limit_words200

    This node's job is narrower than the name suggests, and worth being clear about upfront: it's a prompt template, not another image describer. You give it a short idea - the README's own example is literally "1 girl" - and it expands that into a fuller instruction string sized to a word limit. What comes out is called user_prompt, which is exactly the field name the pack's other LLM nodes (Gemini, GeminiV2, ZhipuGLM4, DeepSeekAPI) expect as their own user_prompt input. That's the intended wiring: this node builds the instruction, one of the API nodes actually generates from it.

    Notice it has no api field of its own, unlike PromptTagger or the ObjectDetector-Gemini nodes elsewhere in the pack - so there's no key to configure here and nothing calling out to the network from this node specifically. Whatever generation happens, happens downstream.

    The inputs and outputs that matter

    • template - currently a single option, "SD txt2img prompt". It's a dropdown with room to grow; right now there's nothing to actually choose between.
    • describe (default "1 girl", multiline) - this is the field you actually edit. A short, plain description of what you want. Don't try to write a full SD-style tag list here - that's the point of the node, it does that expansion for you (once fed to a downstream LLM node).
    • limit_words (default 200, range 2–999) - caps how long the resulting prompt can be. Tighten this if downstream nodes choke on very long prompts, loosen it if 200 words isn't giving the model enough to work with.

    Output is a single user_prompt string.

    How it fits in a workflow

    The practical pattern: describe → this node → user_prompt output → into the user_prompt input of a Gemini, GeminiV2, ZhipuGLM4, or DeepSeekAPI node → their text output becomes your actual SD prompt. It's a two-node handoff by design, and the split exists so you can swap which backend does the generation (free Zhipu GLM-4-Flash vs. Gemini vs. DeepSeek) without rewriting the instruction each time.

    If you want a version of this that also takes a style reference instead of just a bare description, the pack has a sibling node, UserPromptGeneratorTxt2ImgPromptWithReference, that adds a reference_text field for exactly that.

    Installing it

    Same pack as everything else here - ComfyUI Manager: search "ComfyUI Layer Style Advance". Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git
    

    Run install_requirements.bat (or the manual whl/pip steps for a portable ComfyUI install) and restart. This particular node needs nothing beyond the base pack install - no model download, no API key of its own.

    Common issues

    Nothing seems to happen / output looks identical to the input. This node alone doesn't generate a fuller prompt out of thin air - it structures your describe text for a downstream model to expand. If you've got the user_prompt output going nowhere, or into a node that isn't actually one of the LLM nodes, you won't see any expansion.

    Confusing this with an image captioner. There's no image input on this node - if you're trying to get a prompt from a picture, you want PromptTagger, ZhipuGLM4V, or one of the Gemini vision nodes instead. This one only ever starts from text.

    describe too vague, downstream output too generic. Since the actual creative expansion happens in whichever LLM node consumes user_prompt, garbage in still means garbage out - a one-word describe gives the downstream model very little to work with regardless of limit_words.

    Category😺dzNodes/LayerUtility/Prompt

    Inputs (3)

    NameTypeDefaultDescription
    templateCOMBO1 options: SD txt2img prompt
    describeSTRING1 girl
    limit_wordsINT2002–999

    Outputs (1)

    NameTypeDescription
    user_promptSTRING