Gemma Image Prompt
Show Gemma an image, get a prompt that recreates it — right down to an LTX video
- clip
- image
- video
- positive
- negative
Gemma Image Prompt is the pack's most ambitious node and the one to temper your expectations about. You feed it an image, it "looks" at it with a vision-capable Gemma4 model, and it writes a text-to-image prompt that would generate something visually similar. Then it layers on your free-form edit instructions and tailors the output to the model you're actually generating with. It's the "reverse-interrogate an image I like" workflow, done locally on your own GPU.
Let's be clear about the tier it sits in: the README calls it experimental, and the author is blunt that Gemma-4-E4B has limited instruction-following. It won't always nail the Danbooru-tag format or the POSITIVE/NEGATIVE contract; the node has a parser that recovers what it can. This is a test node and a really interesting toy, not a polished replacement for a carefully-written prompt.
The mechanism
Like GemmaTranslate, this runs the clip.tokenize → clip.generate → clip.decode pipeline against a Gemma4 encoder loaded via CLIPLoader - but here the image is fed into the tokenizer as a vision input so the model actually sees it. It runs at queue time, not on a button click, and can't run standalone. Same version floor as the translate node: ComfyUI v0.21.0+, and you need a vision-capable Gemma4 build (the confirmed one is gemma4_e4b_it_fp8_scaled.safetensors in models/text_encoders/). On v0.26.0+ you can substitute Qwen3-VL, which is natively vision-capable - a natural choice since it's already the community's go-to open VLM for local captioning.
The genuinely clever part is the video path. Wire a video in - either the VIDEO output of ComfyUI's core Load Video, or an IMAGE frame batch from a VHS-style loader - set prompt_mode to Video description (LTXV), and it writes a text-to-video prompt for LTX-2/LTXV. Two implementation details stand out: the frames sent to the model are picked by how much changed, not evenly spaced (first frame, last frame, then the biggest changes - cuts, motion starts, camera moves), and Gemma4's tokenizer has a native video= path that processes frames as a sequence, so the model gets the timing. Qwen3-VL has no video= kwarg, so it falls back to treating each frame as a separate still - use max_frames (default 8) to cap context there.
The inputs that matter
clip- vision-capable Gemma4 or Qwen3-VL from aCLIPLoader. Required.image(optional) - the image to analyze. Leave it unwired and the node builds a prompt frominstructionalone. Both empty → empty outputs.instruction- free-form edits likemake it night, add rain, applied on top of the image analysis.video(optional) - for the LTXV path described above.
The settings row is where the tailoring happens:
output_format-Natural languageorDanbooru tags(the tag lineage the anime checkpoints were trained on). Always natural language in LTXV mode.target_model-FLUXorSDXL. FLUX gets a natural-language positive and an empty negative; SDXL also gets a negative prompt. Ignored in LTXV mode.detail_mode-Keep as instructed(change only what you asked, add no objects) orExpand detail(richer scene; in LTXV mode adds background action and secondary motion).prompt_mode-Generate (recreate image)for a similar-image prompt,Edit instructionfor image-edit models (states both "X" and "becomes Y", not just the result), orVideo description (LTXV).
Outputs: positive and negative - wire them straight into a dual CLIP Text Encode. negative will often be empty, which is correct for FLUX.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/id-fa/ComfyUI-PromptPalette-F prompt-palette-f
cd prompt-palette-f
pip install -r requirements.txt
Restart, drop the model into models/text_encoders/, and look under Prompt Palette-F. Manager: search "Prompt Palette-F."
The honest take
The image→prompt path is genuinely useful for recreating a look or style you found elsewhere, and the LTXV video-description mode is a thoughtful piece of work - the change-based frame selection shows someone who actually used the node. Just don't expect a magic prompt generator. E4B is a small model with a real ceiling; treat the output as a strong draft you refine. If you want this shape of workflow with more muscle, Qwen3-VL on v0.26.0+ is the upgrade path the author built in.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| instruction | STRING | — | |
| output_format | COMBO | Natural language | 2 options: Natural language, Danbooru tags |
| target_model | COMBO | FLUX | 2 options: FLUX, SDXL |
| detail_mode | COMBO | Keep as instructed | 2 options: Keep as instructed, Expand detail |
| max_length | INT | 5121–2048 | — |
| unload_after | BOOLEAN | false | — |
| prompt_mode | COMBO | Generate (recreate image) | 3 options: Generate (recreate image), Edit instruction (change description), Video description (LTXV) |
| max_frames | INT | 81–64 | — |
| imageopt | IMAGE | — | |
| videoopt | IMAGE,VIDEO | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | STRING | — |
| negative | STRING | — |