ComfyUI > Nodes > ComfyUI > Gemini Input Files

ComfyUI Node: Gemini Input Files

Class Name

GeminiInputFiles

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

Gemini Input Files Description

Facilitates integration of external text and PDF files into Gemini language model for enhanced context and response generation.

Gemini Input Files:

The GeminiInputFiles node is designed to facilitate the integration of external text and PDF files into the Gemini language model's processing pipeline. This node allows you to load and prepare input files, which are then used as context for generating responses with the Gemini model. By including these files, you can enrich the model's understanding and provide it with additional context, which can be particularly useful for tasks that require specific information or detailed background. The node supports chaining, meaning you can combine multiple input files to be processed in a single request, thereby maximizing the context available to the model. This feature is especially beneficial when dealing with complex queries that require comprehensive data input. The node ensures that the contents of the files are formatted correctly for the Gemini API, making it a seamless and efficient way to enhance the model's capabilities.

Gemini Input Files Input Parameters:

file

This parameter allows you to select a file from the available input files to be included as context for the Gemini model. It accepts text (.txt) and PDF (.pdf) files, which are then read and processed by the model. The selected file's content contributes to the token limit of the model's input. The default value is the first file in the list if available. This parameter is crucial for providing the model with the necessary context to generate accurate and relevant responses.

GEMINI_INPUT_FILES

This optional parameter allows you to batch additional files together with the file loaded from this node. It enables the chaining of input files, allowing a single message to include multiple files. This is particularly useful when you need to provide the model with a broader context or when dealing with complex queries that require multiple sources of information. By using this parameter, you can enhance the model's understanding and improve the quality of the generated responses.

Gemini Input Files Output Parameters:

GEMINI_INPUT_FILES

The output parameter GEMINI_INPUT_FILES provides a list of formatted file parts that are ready to be used as input for the Gemini API. This output is essential for ensuring that the files are correctly processed and included in the model's input context. The formatted files are encoded and prepared in a way that the Gemini model can efficiently utilize, thereby enhancing the model's ability to generate accurate and contextually relevant responses.

Gemini Input Files Usage Tips:

  • To maximize the context available to the Gemini model, consider chaining multiple input files using the GEMINI_INPUT_FILES parameter. This can be particularly useful for complex queries that require comprehensive data input.
  • Ensure that the files you select are within the supported size limits and formats (.txt and .pdf) to avoid processing errors and ensure smooth integration with the Gemini model.

Gemini Input Files Common Errors and Solutions:

FileNotFoundError

  • Explanation: This error occurs when the specified file cannot be found in the input directory.
  • Solution: Verify that the file exists in the specified directory and that the file name is correct. Ensure that the file is in the supported format (.txt or .pdf).

UnsupportedFileTypeError

  • Explanation: This error is raised when a file with an unsupported format is selected.
  • Solution: Ensure that only text (.txt) and PDF (.pdf) files are used as input. Convert any unsupported file types to a supported format before using them with the node.

FileSizeLimitExceededError

  • Explanation: This error occurs when a file exceeds the maximum allowed size for input files.
  • Solution: Check the file size and ensure it is within the allowed limit. If necessary, split the file into smaller parts or reduce its size before using it as input.

Gemini Input Files 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.

Gemini Input Files