Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.comfy.org/llms.txt

Use this file to discover all available pages before exploring further.

This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
The GeminiNanoBanana2 node generates or edits images using Google’s Vertex AI Gemini model. It works by sending a text prompt, along with optional reference images or files, to the API and returns the generated image and any accompanying text.

Inputs

ParameterData TypeRequiredRangeDescription
promptSTRINGYesN/AText prompt describing the image to generate or the edits to apply. Include any constraints, styles, or details the model should follow.
modelCOMBOYes"Nano Banana 2 (Gemini 3.1 Flash Image)"The specific Gemini model to use for image generation.
seedINTYes0 to 18446744073709551615When 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)
aspect_ratioCOMBOYes"auto"
"1:1"
"2:3"
"3:2"
"3:4"
"4:3"
"4:5"
"5:4"
"9:16"
"16:9"
"21:9"
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”)
resolutionCOMBOYes"1K"
"2K"
"4K"
Target output resolution. For 2K/4K the native Gemini upscaler is used.
response_modalitiesCOMBOYes"IMAGE"
"IMAGE+TEXT"
Determines the type of content the model will return. (advanced)
thinking_levelCOMBOYes"MINIMAL"
"HIGH"
Controls the depth of the model’s reasoning process.
imagesIMAGENoN/AOptional reference image(s). To include multiple images, use the Batch Images node (up to 14).
filesCUSTOMNoN/AOptional file(s) to use as context for the model. Accepts inputs from the Gemini Generate Content Input Files node.
system_promptSTRINGNoN/AFoundational instructions that dictate an AI’s behavior. (advanced)
Note: The images input supports a maximum of 14 images. If more are provided, the node will raise an error.

Outputs

Output NameData TypeDescription
imageIMAGEThe primary image generated or edited by the model.
stringSTRINGAny text content returned by the model.
thought_imageIMAGEFirst image from the model’s thinking process. Only available with thinking_level HIGH and IMAGE+TEXT modality.

Source fingerprint (SHA-256): 6dae505011e2860cbf2ec6ccb5a32949d5daa3fe3546e85181050fd9ac92b9e5