Nodes/comfyui_LLM_party/☁️Mini FLUX Prompt Generator
ComfyUI Node

☁️Mini FLUX Prompt Generator

Turn a rough idea into a FLUX-shaped prompt

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
☁️Mini FLUX Prompt Generator
    • flux_prompt
    prompta girl
    model_namegpt-4o-mini
    base_url
    api_key
    is_enabletrue
    seed42

    FLUX doesn't read prompts the way SD1.5 or SDXL do. There's no CLIP tag soup happening under the hood - FLUX's text side leans on a T5 encoder reading full sentences, so a prompt written like 1girl, masterpiece, best quality, detailed is fighting the architecture instead of using it. Mini FLUX Prompt Generator exists to skip that mismatch entirely: give it a rough idea, it hands an LLM the job of writing an actual FLUX-shaped prompt, and you get back one clean paragraph instead of a keyword pile.

    It's part of comfyui_LLM_party's "mini-party" family - the pack's small, fixed-purpose nodes that trade the full LLM + loader combo's flexibility for a one-node, zero-setup shortcut. If you've seen its sibling Mini SD Prompt Generator, this is the same idea aimed at a different encoder.

    How it works

    Your prompt field is the seed idea - plain language, however rough. The node sends that to an LLM (configured via model_name), which has presumably been prompted internally to write in the register FLUX actually wants: descriptive prose, physical detail, natural sentence structure, rather than comma-separated tags. What comes back in flux_prompt is meant to be dropped straight into your CLIP Text Encode (or FLUX's dual-encoder text node) with no further editing.

    This is the same idea the wider community converged on independently - using one LLM to translate a loose idea into a prompt shaped for whatever encoder your checkpoint actually uses, rather than hand-writing it yourself. The reasoning holds up: if the encoder is itself reading your prompt as an instruction, having an LLM write that instruction is a translation between two things that already speak the same language.

    The inputs and outputs that matter

    • prompt (multiline, default "a girl") - your rough idea. A sentence fragment, a scene description, whatever you'd otherwise have spent five minutes hand-crafting.
    • model_name (default gpt-4o-mini) - cheap and fast, a sensible default for something you'll run many times while iterating.
    • base_url / api_key (optional) - leave blank to inherit whatever's set in the pack's config.ini; fill in to override per-node.
    • seed (default 42) - controls the LLM call's determinism-ish behavior; change it if you want a different phrasing of the same idea rather than the same one every run.
    • is_enable - the pack's standard bypass toggle.

    Single output: flux_prompt (STRING) - wire it straight into your text encoder.

    Notice it's a single output, unlike Mini SD Prompt Generator's positive/negative pair. That's not an oversight - on FLUX and other LLM-encoded checkpoints, the classic negative prompt box does essentially nothing, so there's no second output worth generating.

    How to install it

    Search comfyui_LLM_party in ComfyUI Manager and install, then restart. Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/heshengtao/comfyui_LLM_party.git
    

    Then run pip install -r requirements.txt from inside the pack's folder using ComfyUI's own Python (on a portable install: python_embeded\python.exe -m pip install -r requirements.txt), and restart. This node itself just makes an LLM API call - no local model, no GPU cost of its own - the heavier requirements in this pack's install belong to its other nodes (embeddings, OCR, TTS).

    Common issues & troubleshooting

    flux_prompt comes back empty or errors out. Almost always credentials, not the node - check config.ini first, then the node's own base_url/api_key fields if you set them directly. A base_url missing the trailing /v1/ is the classic OpenAI-format mistake.

    The output still reads like a tag list instead of a sentence. Some cheaper or smaller models don't reliably follow "write natural prose" instructions and default back to list-like output regardless of what they're told. If gpt-4o-mini keeps doing this, try a stronger model in model_name - prompt-writing quality scales with model quality here just like anywhere else.

    You're running an SDXL or Illustrious checkpoint, not FLUX. This node is tuned for FLUX-style natural-language prompting; feeding its output into a tag-based checkpoint will underperform compared to writing tags yourself. Use Mini SD Prompt Generator instead - it's built for exactly that case.

    Category大模型派对(llm_party)/迷你派对(mini-party)

    Inputs (6)

    NameTypeDefaultDescription
    promptSTRINGa girl
    model_nameSTRINGgpt-4o-mini
    base_urloptSTRING
    api_keyoptSTRING
    is_enableoptBOOLEANtrue
    seedoptINT42

    Outputs (1)

    NameTypeDescription
    flux_promptSTRING