Google AI - Text Generator:
The GoogleAI_TextNode is a powerful component within the ComfyUI framework designed to facilitate advanced text generation using Google's AI models. This node leverages the capabilities of Google's Gemini models to generate text based on a given prompt, making it an invaluable tool for AI artists and creators looking to incorporate sophisticated text outputs into their projects. The node supports multiple image inputs, allowing for a rich context to be provided alongside the text prompt, which can enhance the relevance and creativity of the generated text. By integrating seamlessly with Google's AI infrastructure, the GoogleAI_TextNode offers a robust solution for generating high-quality text outputs, tailored to the specific needs of your creative endeavors.
Google AI - Text Generator Input Parameters:
image_1, image_2, image_3, image_4, image_5
These parameters allow you to input up to five images that can be used to provide additional context for the text generation process. Each image is converted to a base64 format and included in the request to the AI model. This can significantly impact the relevance and creativity of the generated text, as the model can draw inspiration from the visual content. There are no specific minimum or maximum values for these parameters, but they should be valid image files.
prompt
The prompt is a crucial input parameter that defines the initial text or idea you want the AI to expand upon. It serves as the starting point for the text generation process, guiding the AI in producing relevant and coherent outputs. The prompt should be clear and concise to ensure the generated text aligns with your expectations.
model
This parameter specifies the AI model to be used for text generation. Options include various versions of the Gemini models, such as gemini-3.1-pro-preview and gemini-2.5-pro. Each model has its own strengths and capabilities, so selecting the appropriate model can influence the quality and style of the generated text.
api_key
The API key is a security credential required to authenticate your requests to Google's AI services. It ensures that only authorized users can access the text generation capabilities. While there is no default value, you must provide a valid API key to use the node.
system_prompt
The system prompt is an optional parameter that allows you to provide additional instructions or context to the AI model. This can help refine the text generation process by setting specific guidelines or constraints for the output. If not provided, the system prompt defaults to None.
Google AI - Text Generator Output Parameters:
text
The output parameter text represents the generated text result from the AI model. This output is the culmination of the input prompt, images, and any additional context provided through the system prompt. The generated text can be used in various creative applications, offering a blend of coherence, creativity, and relevance based on the inputs provided.
Google AI - Text Generator Usage Tips:
- To optimize text generation, provide a clear and concise prompt that accurately reflects the desired outcome.
- Experiment with different models to find the one that best suits your creative needs, as each model may produce varying styles and qualities of text.
- Utilize the image inputs to provide rich context, enhancing the relevance and creativity of the generated text.
Google AI - Text Generator Common Errors and Solutions:
❌ Error: Invalid API Key
- Explanation: This error occurs when the provided API key is incorrect or expired.
- Solution: Verify that you have entered a valid and active API key. If necessary, obtain a new key from your Google Cloud account.
❌ Error: Image Conversion Failed
- Explanation: This error indicates a problem with converting an image to base64 format.
- Solution: Ensure that the images provided are in a supported format and are not corrupted. Try re-uploading the images or using different image files.
❌ Error: Model Not Supported
- Explanation: This error arises when an unsupported model name is specified.
- Solution: Check the list of supported models and ensure that you are using a valid model name, such as
gemini-3.1-pro-previeworgemini-2.5-pro.
