APNext Gemini Prompt Enhancer
Cinematic term injection plus an optional Gemini rewrite
- enhanced_prompt
- random_enhanced
- llm_enhanced
This is the hybrid of the whole pack, and it's cleverer than it first looks. Give it a base prompt and it does two things: it injects cinematic terminology from a big set of dropdowns (lighting, camera angle, shot size, lens, color tone, and a dozen more), and it can run the result through Gemini for a polished rewrite. Then it hands you both versions plus the combination, so you can A/B them and keep whichever reads best. If you want the concrete-photographic-language boost the KB says actually works, delivered semi-automatically, this is the node.
The best part: the random-injection half needs no API key. Leave the LLM toggle off and it's a pure, offline cinematic-term enhancer - free, instant, works anywhere. Flip the toggle on and Gemini smooths the injected terms into natural language. That optionality is unusual and genuinely useful; most "enhancer" nodes force the API call.
How it works
The node takes base_prompt and, according to enhancement_mode, pulls elements from its cinematic dropdowns - each defaults to random, so it rolls a coherent set of camera/lighting/style terms and appends them. intensity scales how much it adds. If use_llm is on, it then sends that enriched prompt to Gemini for a rewrite. You can pipe in a builder node's output through apnext_chain to combine this with the rest of the pack. Because those cinematic terms are concrete physical referents, they're the kind of prompt content that transfers across encoders - they help on SDXL and on the LLM-encoded 2026 models where quality-word spam does nothing.
The inputs and outputs that matter
base_prompt- your starting idea.enhancement_mode- how it enriches:Random Mix (4-6 elements), focused modes (Cinematic/Lighting/Camera/Motion/Style),Full Enhancement, orLLM Only.use_llm- the key switch. Off = free offline random injection; on = Gemini rewrite (needs a key).intensity(0.1–2.0) - how heavy the enhancement.- The optional dropdowns -
lighting_type,camera_angle,shot_size,lens_type,color_tone,visual_effects,compositionand more - pin a specific choice or leave onrandom.
Three outputs: enhanced_prompt (the final combined result), random_enhanced (just the term-injected version, no LLM), and llm_enhanced (just Gemini's rewrite). Wire whichever wins into your CLIP Text Encode.
How to install it
ComfyUI Manager: search comfyui_dagthomas, install, restart. Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/dagthomas/comfyui_dagthomas
cd comfyui_dagthomas && pip install -r requirements.txt
then restart. The offline path needs nothing but the install. For use_llm, set GEMINI_API_KEY in the environment before launching ComfyUI.
Where people get burned
use_llmon without a key. Turning on the LLM rewrite with noGEMINI_API_KEYset is the usual error. Either set the key before launch, or leaveuse_llmoff and use the freerandom_enhancedoutput.- Three outputs, pick one. People wire
enhanced_promptand wonder whyrandom_enhancedlooks different - they're supposed to. Compare all three, keep the best; don't feed all three into one encoder. - Cranking
intensity. Max intensity buries your subject under camera and lighting jargon. Keep it moderate so the base idea still leads. randomeverywhere = a slot machine. Every dropdown onrandomgives huge variety and low control. Pin the choices that matter (shot size, lighting) and randomize the rest.- Overlong output on LLM mode. Gemini can pad; the attention cap still applies. Trim before it hits the encoder.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| base_prompt | STRING | A knight fighting a dragon | — |
| enhancement_mode | COMBO | Random Mix (4-6 elements) | 8 options: Random Mix (4-6 elements), Cinematic Focus, Lighting Focus, Camera Focus, Motion Focus, Style Focus, +2 |
| use_llm | BOOLEAN | true | — |
| gemini_model | COMBO | gemini-flash-latest | 5 options: gemini-2.5-pro, gemini-flash-latest, gemini-2.5-flash, gemini-flash-lite-latest, gemini-2.5-flash-lite |
| seed | INT | 00–999999 | — |
| custom_llm_promptopt | STRING | — | |
| intensityopt | FLOAT | 1.00.1–2 | — |
| visual_styleopt | COMBO | random | 19 options: none, random, cinematic, dramatic, moody, atmospheric, +13 |
| lighting_typeopt | COMBO | random | 16 options: none, random, soft lighting, hard lighting, dramatic lighting, natural lighting, +10 |
| light_sourceopt | COMBO | random | 14 options: none, random, sunlight, moonlight, candlelight, firelight, +8 |
| camera_angleopt | COMBO | random | 11 options: none, random, low angle, high angle, eye level, bird's eye view, +5 |
| shot_sizeopt | COMBO | random | 10 options: none, random, extreme wide shot, wide shot, medium wide shot, medium shot, +4 |
| lens_typeopt | COMBO | random | 10 options: none, random, wide-angle lens, telephoto lens, macro lens, fisheye lens, +4 |
| color_toneopt | COMBO | random | 12 options: none, random, warm tones, cool tones, desaturated, vibrant, +6 |
| camera_movementopt | COMBO | random | 12 options: none, random, static shot, pan left, pan right, tilt up, +6 |
| time_of_dayopt | COMBO | random | 13 options: none, random, sunrise, morning, midday, afternoon, +7 |
| visual_effectsopt | COMBO | random | 12 options: none, random, depth of field, bokeh, lens flare, motion blur, +6 |
| compositionopt | COMBO | random | 10 options: none, random, rule of thirds, centered composition, symmetrical, asymmetrical, +4 |
| motionopt | COMBO | random | 12 options: none, random, static pose, walking, running, jumping, +6 |
| character_emotionopt | COMBO | random | 13 options: none, random, confident, mysterious, contemplative, joyful, +7 |
| apnext_chainopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |
| random_enhanced | STRING | — |
| llm_enhanced | STRING | — |