Prompt Generator Options
Tune the local LLM that writes your prompts
- image2
- image3
- image4
- image5
- options
Prompt Generator Options (class PromptGenOptions) is the control surface for the pack's Prompt Generator. The generator itself is a node that talks to a local LLM and writes or enhances prompts for you; this node is where you pick the model, the sampling parameters, the system prompt, and optionally feed it images. The two wire together - options out, generator in - and without this node the generator runs on whatever defaults the pack baked in.
The fun origin story: the author added the generator because standalone llama.cpp was noticeably faster than ComfyUI's own LLM implementations, and borrowed the system-prompt template idea from Z-Image Turbo's demo. So it's genuinely a "run a real LLM locally" setup, not a toy.
How it works
The backend is llama.cpp (default) or Ollama, configured in ComfyUI Settings under Prompt Manager. On the llama.cpp path, the pack talks to a local llama-server process and can auto-download the Qwen3.5-9B GGUF models from HuggingFace into your models/gguf folder - no manual download dance. The model dropdown lists local GGUF files first, then the downloadables, with sizes right in the tooltip: the default UD-Q4_K_XL is ~6GB, Q8_0 ~9.5GB, UD-Q8_K_XL ~13GB. On the Ollama path, the dropdown lists whatever you've ollama pulled.
The settings that matter:
- system_prompt_mode and system_prompt -
appendadds your text after the built-in LLM instructions (which are tuned for detailed text-to-image prompts);replacethrows the defaults away entirely. Leave it empty to use defaults. - temperature, top_k, top_p, min_p, repeat_penalty - standard LLM sampling knobs. Temperature 0.7 is the default; crank it down toward 0.4 if the generator keeps writing purple prose.
- context_size - default 4096, and the pack picks a sensible default from your VRAM (bigger on 24GB+ cards). Bump it for vision models or long prompt sessions.
- image2 through image5 - connect up to four more images for the Analyze Image modes (the generator's first image slot handles the fifth). These are required if you're analyzing images.
- use_model_default_sampling - on by default, and it overrides all the sampling knobs. Turn it off before you start fiddling with temperature, or you'll wonder why nothing changes.
- show_everything_in_console - prints the system prompt, user prompt, thinking, and raw response to the console. The debugger's best friend.
The single output is options, which feeds the Prompt Generator's options input.
Installing
The pack is the easy part:
cd ComfyUI/custom_nodes
git clone https://github.com/FranckyB/ComfyUI-Prompt-Manager.git
cd ComfyUI-Prompt-Manager
pip install -r requirements.txt
The generator additionally needs llama-server on PATH (Windows: winget install llama.cpp; Linux/macOS: brew install llama.cpp), or an Ollama install with models pulled. If you're using Ollama, the pack doesn't download models for you - that's ollama pull's job.
Where people get burned
Most "it doesn't work" reports trace back to llama-server not being installed or not on PATH - the generator will sit there and then error. Check show_everything_in_console before anything else when debugging; it shows you exactly what the model got and returned. And remember the Qwen models are vision-capable, but the mmproj vision file downloads alongside the main model, so the first generation after install can take a while as ~6GB lands. On a machine with less than ~16GB VRAM, drop to the Q4 and consider the CPU path - a 9B model at Q4 is heavy but usable.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| modelopt | COMBO | Qwen3.5-9B-UD-Q4_K_XL.gguf | Select model to use (local models listed first, then HuggingFace models) Download sizes: UD-Q4_K_XL ~6GB | Q8_0 ~9.5GB | UD-Q8_K_XL ~13GB |
| image2opt | IMAGE | Connect an image (required for 'Analyze Image' and 'Analyze Image with Prompt' modes) | |
| image3opt | IMAGE | Connect an image (required for 'Analyze Image' and 'Analyze Image with Prompt' modes) | |
| image4opt | IMAGE | Connect an image (required for 'Analyze Image' and 'Analyze Image with Prompt' modes) | |
| image5opt | IMAGE | Connect an image (required for 'Analyze Image' and 'Analyze Image with Prompt' modes) | |
| system_prompt_modeopt | COMBO | append | replace: the text below fully replaces the default LLM instructions append: the text below is added after the default LLM instructions |
| system_promptopt | STRING | Custom LLM Instructions (leave empty to use default) The default instructions are designed for generating detailed and imaginative prompts for text-to-image generation. | |
| use_model_default_samplingopt | BOOLEAN | true | Use the model's default sampling parameters (overrides temperature, top_p, etc) |
| temperatureopt | FLOAT | 0.700–2 | Controls randomness (0.0 = deterministic, 2.0 = very random) |
| top_kopt | INT | 200–100 | Sample from top K most likely tokens (0 = disabled) |
| top_popt | FLOAT | 0.900–1 | Nucleus sampling: consider tokens with top_p probability mass |
| min_popt | FLOAT | 0.050–1 | Minimum probability threshold relative to top token |
| repeat_penaltyopt | FLOAT | 1.001–2 | Penalty for repeating tokens (1.0 = no penalty) |
| context_sizeopt | INT | 4096512–32768 | Context size (increase for vision models or large prompts) |
| show_everything_in_consoleopt | BOOLEAN | false | Print system prompt, user prompt, thinking process, and raw model response to console |
| max_lengthopt | INT | 5121–32768 | Maximum number of tokens to generate when the Prompt Generator is connected to a CLIP/text encoder. |
| gpu_deviceopt | STRING | GPU device index for llama.cpp (e.g. '0', '1'). Leave empty to use the system default GPU. Useful with multi-GPU setups to control which GPU loads LLM weights. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| options | OPTIONS | — |