Nodes/ComfyUI-GeminiImageToPrompt/Gemini Image to Prompt
ComfyUI Node

Gemini Image to Prompt

Turn a reference image into a shot-by-shot video prompt without typing a word

By santiagosamuel3455·Created about a year ago·Updated about a year ago· 1
Gemini Image to Prompt
  • image
  • STRING
api_key
modelo_select
prompt_baseAnalyze the provided image and generate a detailed 5-second cinematic video description based on it. Start with the main action in a single sentence. Describe visible movements, gestures, or dynamics (e.g., someone blinking, a door creaking shut). Detail the physical appearance of key characters or objects: clothing, expressions, colors, and textures. Include background elements such as weather, architecture, natural or artificial features. Specify the camera angle (low angle, close-up, wide shot) and any lens movement (smooth zoom, dolly, tracking shot). Describe the lighting type (golden-hour sunlight, cold neon, harsh indoor light) and dominant color palette. Mention any sudden visual changes (flickering lights, moving shadows, motion blur) in chronological order. Keep everything in a single fluid paragraph, technical and visually precise. Max 200 words.

Nobody wants to hand-write the prompt that turns a still frame into a video. You want to drag a reference image in and have a model describe it back the way a director would - camera angle, lens movement, lighting, the works. That's the whole job of GeminiImageToPromptNode ("Gemini Image to Prompt" in the node menu).

It's the flagship of santiagosamuel3455's small ComfyUI-GeminiImageToPrompt pack, and it does one thing: takes an IMAGE, sends it to Google's Gemini API, and returns a detailed, video-ready prompt as a STRING. Nothing runs locally - this is a call to Google's cloud, the same family as Nano Banana and friends. You're using the text model to describe, not to generate.

How it works

The node grabs the first frame of whatever tensor you feed it (image[0], so a batch only analyzes the first image), converts it to a PIL image, and hands it to Gemini along with prompt_base as the instruction. That prompt_base is the interesting part: it's a big editable multiline field, not a locked system prompt. The default is a solid spec for a 5-second cinematic clip - describe the main action in one sentence, note movement, character and background detail, camera angle, lens movement, lighting, color palette, sudden changes, all in a single fluid paragraph under 200 words.

The inputs that matter

Three things you'll actually touch:

  • api_key - your Google AI Studio key. No key, no dice; this node refuses to work offline.
  • modelo_select - a dropdown of 7 Gemini models (2.5 Flash down to 1.5 Flash-8B).
  • prompt_base - the instruction template. Change this to change the output style; it's the most underrated knob here.

The output is a single STRING, meant to feed a text-to-video or image-to-video pipeline. Most obviously that's this same pack's DeepseekR1KlingAINode, or you can route it through ShowGeneratedText to eyeball it before it costs credits elsewhere.

Where the dropdown lies

The model list is where this pack's unmaintained status shows. It's a single commit from May 2025, and the labels are stale: "Gemini 2.5 Flash" points at the preview id gemini-2.5-flash-preview-04-17, and both "Gemini" and "Gemini 1.5 Pro" silently map to the same gemini-exp-1206. If you get a "model not found" or 404 error, that's why - flip the dropdown, don't reinstall.

Installing it

ComfyUI Manager, search "ComfyUI-GeminiImageToPrompt", or:

cd ComfyUI/custom_nodes
git clone https://github.com/santiagosamuel3455/ComfyUI-GeminiImageToPrompt

Then restart ComfyUI. No model downloads, no heavy weights - the requirements are just google-generativeai, Pillow, and requests. The only real requirement is an API key from aistudio.google.com, and the free tier covers plenty of these calls. The failure modes are equally boring: a missing or bad key (you'll get a ValueError about configuring the Gemini API), a retired model id from that dropdown, or the occasional free-tier rate limit on the Flash models - retry after a few seconds and it clears.

CategoryGemini

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
api_keySTRING
modelo_selectCOMBO7 options: Gemini 2.5 Flash, Gemini 2.0 Flash, Gemini 2.0 Pro, Gemini 2.0 Flash Thinking, Gemini, Gemini 1.5 Pro, +1
prompt_baseSTRINGAnalyze the provided image and generate a detailed 5-second cinematic video description based on it. Start with the main action in a single sentence. Describe visible movements, gestures, or dynamics (e.g., someone blinking, a door creaking shut). Detail the physical appearance of key characters or objects: clothing, expressions, colors, and textures. Include background elements such as weather, architecture, natural or artificial features. Specify the camera angle (low angle, close-up, wide shot) and any lens movement (smooth zoom, dolly, tracking shot). Describe the lighting type (golden-hour sunlight, cold neon, harsh indoor light) and dominant color palette. Mention any sudden visual changes (flickering lights, moving shadows, motion blur) in chronological order. Keep everything in a single fluid paragraph, technical and visually precise. Max 200 words.

Outputs (1)

NameTypeDescription
STRINGSTRING