FL Generate Text
Your text encoder can write your prompt — FL Generate Text
- clip
- generated_text
Everyone's first instinct for "rewrite my prompt with an LLM" is to install a node that calls an API or downloads a 4B chat model. Fine, but you may already be loading a perfectly good language model every time you generate - the text encoder. FL Generate Text just asks it a question instead of only using it to encode.
The catch is in the node's own description, and it's the whole reason this node exists: "Generate text locally with a complete Qwen3 or Qwen3-VL text encoder. H3's truncated conditioning encoder cannot generate text." Most encoders shipping today are deliberately chopped down - the conditioning half of a language model, with the generation head gone. If you load the full thing, this node reaches into it and runs a normal decoding loop. No API key, no extra download, no second model living in VRAM.
How it actually runs
It's not clever, which is a good sign. The node formats your system prompt and prompt into the Qwen chat template, tokenizes it, calls ComfyUI's clip.generate() with your sampling parameters, and decodes the result back to a string. The same model weights that turn your final prompt into conditioning are being asked to produce the words first.
Output is a single generated_text string. Wire it into any node with a STRING prompt input - a CLIPTextEncode text widget, a prompt selector, whatever. It's flagged as an output node too, so the text also shows up on the node itself.
The inputs that matter
clip wants a complete Qwen3 or Qwen3-VL encoder with its generation weights intact, loaded through the usual CLIPLoader. Load a truncated conditioning encoder and you get nothing useful, because there's nothing there to generate with.
system_prompt defaults to "You are a helpful assistant." That default is a trap, and it's the one thing to change on your first run. A chat-tuned model told it's a helpful assistant will happily reply with "Sure! Here's an enhanced prompt:" and that preamble lands in your conditioning. Rewrite it to something like "Reply with only the image prompt. No preamble, no quotes, no explanation." If you want structured output, ask for JSON in the system prompt and mean it. This is the same failure the local-LLM prompt nodes in the ecosystem all fight: uncaged decoding hands you the model's conversational habits as literal prompt tokens.
prompt is your rough idea, and it accepts ComfyUI's dynamic prompt syntax.
sampling is your on/off switch between sampled and greedy decoding. Turn it on when you want variety across seeds; turn it off to get the same answer every run. temperature, top_k, top_p, min_p, repetition_penalty and presence_penalty only do anything when sampling is on. max_length (default 512) caps the output length in tokens - if generation appears to stop mid-sentence, that's usually why. thinking toggles the model's reasoning pass; leave it off for prompt writing unless you enjoy reading the model's inner monologue showing up in your text.
Install
Same as the rest of the pack. Search ComfyUI_Fill-Nodes in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
Restart ComfyUI. Fill-Nodes pulls a long requirements list (librosa, kornia, PyOpenGL, reportlab, fal-client, google-genai, and friends), so give pip a minute on first install. This particular node needs nothing extra - it's the encoder you were already loading that does the work.
Where people get burned
The big one is expecting magic from the wrong CLIP. If your workflow loads an encoder meant for conditioning, generation returns junk or errors, and no amount of temperature tweaking fixes it. Check the model card for the encoder you're loading.
Second: this runs a full autoregressive decode on your GPU. A big Qwen3-VL is not free, and it sits in VRAM alongside your diffusion model. If you're tight, park an FL_UnloadAllModels downstream of the point where you no longer need it.
Third: since max_length truncates rather than stops, a 512-token budget is generous for one prompt but tight for the "give me ten variations" requests people try. Raise it, or ask for one thing at a time - a narrow question drifts less than a broad one anyway.
It's a genuinely useful little node once the system prompt is tamed: local prompt enhancement with zero extra moving parts, which is exactly what you want before you go shopping for a whole LLM stack.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | A complete Qwen3 or Qwen3-VL text encoder with generation weights. | |
| system_prompt | STRING | You are a helpful assistant. | — |
| prompt | STRING | — | |
| max_length | INT | 5121–32768 | — |
| sampling | COMBO | on | 2 options: on, off |
| temperature | FLOAT | 0.700.01–2 | — |
| top_k | INT | 640–1000 | — |
| top_p | FLOAT | 0.950–1 | — |
| min_p | FLOAT | 0.050–1 | — |
| repetition_penalty | FLOAT | 1.050–5 | — |
| presence_penalty | FLOAT | 0.000–5 | — |
| seed | INT | 00–18446744073709550000 | — |
| thinking | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| generated_text | STRING | — |