> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-custom-nodes-sdk-v2-frontend.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GeminiImage2Node - ComfyUI Built-in Node Documentation

> The GeminiImage2Node generates or edits images using the Google Vertex AI Gemini model.

The GeminiImage2Node generates or edits images using the Google Vertex AI Gemini model. You provide a text prompt and optionally reference images or files; the node sends them to the API and returns the generated image, plus a text response when requested.

## Inputs

| Parameter             | Description                                                                                                                                                                                                                                                                                                                                                                     | Data Type            | Required | Range                                                                                                                                         |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `prompt`              | Text prompt describing the image to generate or the edits to apply. Include any constraints, styles, or details the model should follow. The prompt must contain at least one character after removing whitespace.                                                                                                                                                              | STRING               | Yes      | N/A                                                                                                                                           |
| `model`               | The specific Gemini model to use for generation. The "Nano Banana 2 (Gemini 3.1 Flash Image)" option maps to the `gemini-3.1-flash-image` model internally, and "gemini-3-pro-image-preview" maps to `gemini-3-pro-image`.                                                                                                                                                      | COMBO                | Yes      | `"gemini-3-pro-image-preview"`<br />`"Nano Banana 2 (Gemini 3.1 Flash Image)"`                                                                |
| `seed`                | When the seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn't guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used. Default: 42. | INT                  | Yes      | 0 to 18446744073709551615                                                                                                                     |
| `aspect_ratio`        | If set to 'auto', matches your input image's aspect ratio; if no image is provided, a 16:9 square is usually generated. Default: "auto".                                                                                                                                                                                                                                        | COMBO                | Yes      | `"auto"`<br />`"1:1"`<br />`"2:3"`<br />`"3:2"`<br />`"3:4"`<br />`"4:3"`<br />`"4:5"`<br />`"5:4"`<br />`"9:16"`<br />`"16:9"`<br />`"21:9"` |
| `resolution`          | Target output resolution. For 2K/4K the native Gemini upscaler is used.                                                                                                                                                                                                                                                                                                         | COMBO                | Yes      | `"1K"`<br />`"2K"`<br />`"4K"`                                                                                                                |
| `response_modalities` | Choose 'IMAGE' for image-only output, or 'IMAGE+TEXT' to return both the generated image and a text response.                                                                                                                                                                                                                                                                   | COMBO                | Yes      | `"IMAGE+TEXT"`<br />`"IMAGE"`                                                                                                                 |
| `images`              | Optional reference image(s). To include multiple images, use the Batch Images node (up to 14).                                                                                                                                                                                                                                                                                  | IMAGE                | No       | N/A                                                                                                                                           |
| `files`               | Optional file(s) to use as context for the model. Accepts inputs from the Gemini Generate Content Input Files node.                                                                                                                                                                                                                                                             | GEMINI\_INPUT\_FILES | No       | N/A                                                                                                                                           |
| `system_prompt`       | Foundational instructions that dictate an AI's behavior. Default: A pre-defined system prompt for image generation.                                                                                                                                                                                                                                                             | STRING               | No       | N/A                                                                                                                                           |

**Constraints:**

* The `images` input supports a maximum of 14 images. If more are provided, an error is raised.
* When more than 10 images are provided, the first 10 are uploaded as URL references and the remaining images are sent inline in the request.
* The `files` input must be connected to a node that outputs the `GEMINI_INPUT_FILES` data type.
* When `response_modalities` is set to "IMAGE", only the image is returned and the text output is empty.

## Outputs

| Output Name | Description                                                                                             | Data Type |
| ----------- | ------------------------------------------------------------------------------------------------------- | --------- |
| `image`     | The image generated or edited by the Gemini model.                                                      | IMAGE     |
| `string`    | The text response from the model. This output will be empty if `response_modalities` is set to "IMAGE". | STRING    |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/GeminiImage2Node/en.md)

***

**Source fingerprint (SHA-256):** `02293dad786d4b441da3174fa76f6c5847f122d294bd7e1f765ffd72420034a4`
