Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > comfy-gemini

ComfyUI Extension: comfy-gemini

Repo Name

comfy-gemini

Author
abdelrahman-habib (Account age: 0 days)
Nodes
View all nodes(1)
Latest Updated
2025-05-10
Github Stars
0.0K

How to Install comfy-gemini

Install this extension via the ComfyUI Manager by searching for comfy-gemini
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfy-gemini in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

comfy-gemini Description

comfy-gemini adds two ComfyUI nodes powered by Google Gemini: one converts reference images into descriptive prompts, while the other expands written prompts for use in image-generation workflows.

comfy-gemini Introduction

comfy-gemini adds two custom nodes to ComfyUI that use the Google Gemini API to help you write prompts for image generation. One node turns an image into a descriptive prompt; the other expands a prompt you have already written.

These nodes can help when you have a visual reference but cannot quite describe it, or when a short idea needs more detail before you send it to a text-to-image node. They produce text prompts, not finished images, so you can review and edit their suggestions before using them in the rest of your workflow.

How comfy-gemini Works

Think of Gemini as a writing assistant within your ComfyUI workflow:

  1. You give a node either an image or a text prompt.
  2. You provide a Gemini API key and choose a model.
  3. You can adjust the instructions that tell Gemini what kind of description to write.
  4. The node returns text that you can connect to another node or refine yourself.

For example, you could give Gemini Image To Prompt an illustration and ask for a description suitable for recreating it. Or you could give Gemini Enhance Prompt the phrase “a lantern-lit garden at night” and ask it to develop the subject, scene, and style.

The instructions you provide guide the response; they do not guarantee an exact description or a particular generated image. Check the resulting prompt for details you want to keep, change, or remove.

comfy-gemini Features

Gemini Image To Prompt (Gemini/Image)

This node examines an image and writes a descriptive prompt based on what it sees.

Input or outputWhat it does
imageThe image you want Gemini to describe.
modelThe Gemini vision model used to analyze the image.
api_keyYour Google AI API key.
prompt_templateOptional instructions for how to describe the image. The default focuses on a detailed description for regenerating an illustration.
promptThe text description produced by the node.

Example workflow: Connect an image source, such as a LoadImage node, to image. Set the model and API key, then connect the resulting prompt to a text-to-image node that accepts text input.

You can change prompt_template to steer what the description emphasizes. For instance, instructions that focus on composition may be more useful when you want to preserve where subjects appear in the frame, while instructions focused on style may help you explore a reference image’s visual character. Review the output before treating it as an accurate account of every detail in the image.

Gemini Enhance Prompt (Gemini/Text)

This node takes a prompt you have written and asks Gemini to make it more detailed.

Input or outputWhat it does
promptThe starting text you want to develop.
api_keyYour Google AI API key.
modelThe Gemini text model used to expand the prompt.
system_promptOptional instructions for the enhancement. The default focuses on scene, subject, style, and technical details.
enhanced_promptThe expanded text produced by the node.

Example workflow: Connect text from a Primitive node or another prompt source to prompt. Set the model and API key, then pass enhanced_prompt to a node that uses text to generate an image.

Use system_prompt to guide the kind of expansion you need. You might ask for more detail about the setting while keeping your original subject, or ask for stronger attention to visual style. A longer prompt is not automatically a better one: remove additions that change your intended idea.

API Key Options

You can enter your Gemini API key in the node or set the GEMINI_API_KEY environment variable. The environment-variable option is generally more secure than placing the key directly in a workflow. Take care before sharing a workflow that contains a key entered into a node.

comfy-gemini Models

Both nodes accept a model name as text. The original documentation gives these examples:

  • gemini-2.0-pro-latest is an example vision-model name for Gemini Image To Prompt, which needs to analyze an image.
  • gemini-2.5-pro-latest is an example text-model name for Gemini Enhance Prompt, which works from an existing prompt.

These are examples, not a complete list of supported models. The provided documentation does not compare model quality, speed, or availability. Choose a model suited to the node’s task, and check the current Gemini API model documentation for model names and capabilities before using one.

Troubleshooting comfy-gemini

The node does not produce a prompt.

  1. Check that your Google AI API key has been supplied in the node or through GEMINI_API_KEY.
  2. Check that the model name is entered correctly and is appropriate for the task: image analysis for Gemini Image To Prompt, or text processing for Gemini Enhance Prompt.
  3. Confirm that the image or starting prompt is connected to the relevant input.
  4. Read any error shown by ComfyUI or the node; it may identify which input or API request needs attention.

The image description misses something important.

  1. Check that the intended image is connected to image.
  2. Make the prompt_template more specific about what matters to you, such as the subject, composition, or style.
  3. Review and edit the returned prompt before using it to generate an image.

The enhanced prompt changes my idea too much.

  1. Add clearer instructions to system_prompt about which parts of your original prompt to preserve.
  2. Run the node again and compare its output with your starting prompt.
  3. Remove details that do not fit your intended image.

I want to share my workflow. Is my API key included?

If you typed the key directly into a node, check the workflow before sharing it. Using the GEMINI_API_KEY environment variable is generally the more secure option described in the original documentation.

Frequently Asked Questions

Does comfy-gemini generate images?
No. Its two documented nodes generate text: a prompt from an image or an enhanced version of an existing prompt. You can use that text with other ComfyUI nodes for image generation.

Do I have to use the default prompt instructions?
No. prompt_template and system_prompt are optional inputs you can customize to suit your artistic goal.

Which node should I choose?
Use Gemini Image To Prompt when your starting point is a reference image. Use Gemini Enhance Prompt when your starting point is a written idea.

Learn More about comfy-gemini

  • ComfyUI documentation explains the workflow concepts behind connecting nodes and passing images or text between them.
  • Gemini API documentation provides information about the API used by these nodes, including model documentation.

The supplied extension documentation does not identify an official comfy-gemini tutorial, community forum, version history, or verified repository link.

comfy-gemini Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

comfy-gemini detailed guide | ComfyUI