Nodes/ComfyUI_MieNodes/Flux2 Prompt Generator ๐Ÿ‘
ComfyUI Node

Flux2 Prompt Generator ๐Ÿ‘

Shape a rough idea into a Flux.2 prompt

By MieMieeeeeยทCreated 2 years agoยทUpdated 25 days agoยท 225
Flux2 Prompt Generator ๐Ÿ‘
  • llm_service_connector
  • flux2_prompt_json
โ—„input_textโ–บ
โ—„seed0โ–บ

Type a short idea, get back a full Flux.2-shaped prompt. That's the whole pitch. This node runs your rough input through an LLM primed to write the way Flux.2 wants - descriptive, structured, instruction-style - and returns a ready-to-use prompt string. It's for people who know what they want a picture of but don't want to keep hand-crafting the paragraph that gets Flux.2 there.

Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under Prompt Generator.

Why you'd use it

Flux.2 (and its Klein sibling) belongs to the modern LLM-encoded generation of models. The KB's prompt-engineering doc is clear about what that means for prompting: your text is wrapped in a chat template and fed to a general-purpose language model, so it's read "like an instruction/message," not like a bag of CLIP tags. Attention weights like (word:1.3) are silently discarded. BREAK does nothing. The 77-token limit is gone - but that's not license to write an essay, since these models start drifting past roughly 75-100 effective tokens.

All of which means good Flux.2 prompting is a real skill: clear, structured, a handful of strong concepts, subject first. This node hands that skill to an LLM. You give it the gist; it produces a prompt that follows the shape Flux.2 responds to. The output name - flux2_prompt_json - is a hint that it leans toward clean, structured phrasing rather than a loose run-on, which is exactly what the KB says LLM encoders reward.

The inputs and outputs that matter

This one's refreshingly simple. Three required inputs, nothing optional:

  • llm_service_connector - from any of the pack's Set...Connector nodes; the LLM that does the writing.
  • input_text - your idea. Can be a few words or a rough sentence; multiline if you want to give it more.
  • seed - change it for a different take on the same idea.

Output is flux2_prompt_json (STRING) - wire it into the text-encode/conditioning input of your Flux.2 workflow.

Installing it

ComfyUI Manager โ†’ search ComfyUI-MieNodes โ†’ install โ†’ restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes

then restart. The node downloads nothing itself. It does need a working LLM connector (and key), and of course it only writes the prompt - you load the actual Flux.2 model separately. Nodes show up under the ๐Ÿ‘ MieNodes menu.

Common issues

The output looks like structured/JSON-ish text. That's intended - the node is built for Flux.2's instruction-style encoder, which handles clean field separation well. If your downstream text-encode node chokes on it, make sure you're wiring it into a plain text/conditioning input, not something expecting bare tags.

Overlong prompts hurt. If you feed a paragraph in and the LLM balloons it into something huge, quality can actually drop - the KB's measured finding is that these models drift past ~75-100 effective tokens. Keep your input_text focused and the result stays focused.

Don't paste in weight syntax. If your input_text has (thing:1.4) or BREAK in it out of SDXL habit, strip it. On Flux.2 that punctuation is read literally and is worse than nothing; the LLM may or may not clean it up for you.

Errors before generation. That's the connector upstream (bad key/model/endpoint), not this node.

Category๐Ÿ‘ MieNodes/๐Ÿ‘ Prompt Generator

Inputs (3)

NameTypeDefaultDescription
llm_service_connectorLLMServiceConnectorโ€”
input_textSTRINGโ€”
seedINT00โ€“18446744073709550000โ€”

Outputs (1)

NameTypeDescription
flux2_prompt_jsonSTRINGโ€”