Flux 提示词扩展
A dedicated local model that turns 'cat' into a full Flux prompt
- STRING
Flux 提示词扩展 - "Flux prompt expansion" - is a local, model-specific prompt expander, and it's one of the pack's most sensible additions. Where the pack's Gemini nodes lean on a cloud LLM to write prompts, this one runs a purpose-built sequence-to-sequence model, gokaygokay/Flux-Prompt-Enhance, entirely on your machine. You type a rough idea, it returns a longer, more detailed Flux-style prompt. No API key, no rate limits, and it's tuned specifically for Flux's natural-language style rather than SDXL tag soup - which matters, because the KB's own guidance is that on T5/LLM-encoded models, short keyword prompts underperform and detailed prose wins.
The mechanism is about as clean as local prompting gets: the node loads the model with HuggingFace transformers and runs it as a text2text-generation pipeline with repetition_penalty=1.2, prefixing your input with the literal phrase enhance prompt: - which is the exact instruction format the model was trained on. max_length (default 256, up to 1024) controls the output ceiling. It picks cuda if available, otherwise CPU.
Inputs: input_prompt (multiline) and max_length. Output: one STRING - the expanded prompt, ready for Flux's text encoder.
Installing it - the model is manual
cd ComfyUI/custom_nodes
git clone https://github.com/yiwangsimple/ComfyUI_GroqChat
Then the README (updated Sept 2024, when this node shipped) is explicit that you must download and place the model yourself:
mkdir -p ComfyUI/models/prompt_generator/Flux-Prompt-Enhance
# download https://huggingface.co/gokaygokay/Flux-Prompt-Enhance into that folder
transformers, torch, and friends come from requirements.txt. If the folder is missing, the node raises "Could not find the Flux-Prompt-Enhance model" - loud, not silent.
Honest assessment
This is the pack's most "fire and forget" local prompt node: tiny input, no temperature knobs, no system prompt to fight, and the output format is always Flux-appropriate. That's both the strength and the ceiling - you can't steer it much, and the 2024-era enhance model won't blow your mind on creativity. Compared to the Gemma2PromptNode's Flux mode, this one is faster and simpler but less controllable. For the common case - "I have a rough theme, I want a passable detailed Flux prompt without thinking" - it's genuinely the least-friction option in this pack. Just remember the manual model download; that's where every install goes wrong.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input_prompt | STRING | — | |
| max_length | INT | 2561–1024 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |