ComfyUI > Nodes > ComfyUI > Google Gemini

ComfyUI Node: Google Gemini

Class Name

GeminiNode

Category
api node/text/Gemini
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 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

Google Gemini Description

Facilitates interaction with Google's Gemini AI models for generating text responses from various input types.

Google Gemini:

The GeminiNode is designed to facilitate interaction with Google's Gemini AI models, enabling you to generate text responses by providing a variety of input types such as text, images, audio, and video. This node is particularly beneficial for creating coherent and contextually relevant text outputs by leveraging the advanced capabilities of the Gemini AI. It seamlessly handles API communication and response parsing, making it an essential tool for those looking to integrate AI-driven text generation into their workflows. The primary goal of the GeminiNode is to offer a versatile and user-friendly interface for generating meaningful text responses, enhancing your creative projects with the power of AI.

Google Gemini Input Parameters:

maxOutputTokens

This parameter defines the maximum number of tokens that the Gemini AI model can generate in response to your input. Tokens are the building blocks of the generated text, and setting this parameter helps control the length of the output. The minimum value is 16, and the maximum is 8192, allowing you to tailor the response length to your specific needs. A higher value can produce more detailed responses, while a lower value may result in more concise outputs.

temperature

The temperature parameter influences the randomness of the text generation process. It accepts values between 0.0 and 2.0, where lower values make the output more deterministic and focused, while higher values introduce more randomness and creativity. Adjusting this parameter can help you achieve the desired balance between creativity and coherence in the generated text.

topK

This parameter determines the number of highest probability vocabulary tokens to consider during text generation. A higher topK value allows the model to explore a broader range of possible outputs, while a lower value restricts it to the most likely options. The minimum value is 1, and there is no explicit maximum, but it should be set according to your specific requirements for diversity in the output.

topP

The topP parameter, also known as nucleus sampling, controls the cumulative probability threshold for token selection. It ranges from 0.0 to 1.0, where lower values limit the model to the most probable tokens, and higher values allow for more diverse outputs. This parameter is useful for fine-tuning the balance between creativity and precision in the generated text.

Google Gemini Output Parameters:

textResponse

The textResponse parameter provides the generated text output from the Gemini AI model. This output is the result of processing the input parameters and context provided to the node. It is essential for interpreting the AI's response and integrating it into your projects, offering insights or creative content based on the input data.

Google Gemini Usage Tips:

  • Experiment with the temperature and topP parameters to find the right balance between creativity and coherence for your specific use case.
  • Use the maxOutputTokens parameter to control the length of the generated text, ensuring it fits within your project's requirements.

Google Gemini Common Errors and Solutions:

"Invalid token count"

  • Explanation: This error occurs when the maxOutputTokens parameter is set outside the allowed range of 16 to 8192. - Solution: Adjust the maxOutputTokens value to be within the specified range to resolve this issue.

"Temperature out of range"

  • Explanation: The temperature parameter is set to a value outside the acceptable range of 0.0 to 2.0.
  • Solution: Ensure that the temperature value is within the specified range to avoid this error.

"Invalid topK value"

  • Explanation: The topK parameter is set to a non-positive value, which is not allowed.
  • Solution: Set the topK parameter to a positive integer to correct this error.

Google Gemini Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
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.

Google Gemini