Gemini 2.5
Gemini 2.5 as a ComfyUI text node, for prompt work that needs eyes and ears
- generated_output
The GeminiNode25 is the elder statesman of this pack's text nodes: a direct line to Gemini 2.5 on Vertex AI that returns plain text. If you've seen the 3.1 and 3.5 siblings and wondered what's different, the answer is "the model and the dropdown." The shape is identical, which is honestly the point - this is a mature, well-trodden wrapper for the workhorse generation, and there are workflows that have been running on it since before the newer models existed.
What it does
Prompt in, generated_output (a STRING) out. The useful part is multimodal input through file paths: image_file_path, video_file_path, and audio_file_path each take an absolute path (like output/file.png or output/file.mp3) plus a MIME type dropdown, so the node can describe, classify, or re-prompt from content your workflow already produced. The model dropdown gives you three flavors of Gemini 2.5: GEMINI_PRO, GEMINI_FLASH, and GEMINI_FLASH_LITE - big, fast, and cheapest, respectively. A caption-and-reprompt loop is the killer use: generate an image, point this node at the file, have it write a better prompt, feed that string back into your generator.
Inputs that matter
- prompt - the instruction (defaults to "Describe the content in detail.").
- system_instruction - optional, but this is the field that turns it into a reusable tool ("You are a prompt engineer. Output only comma-separated tags.").
- temperature / top_p / top_k / max_output_tokens - standard sampling controls.
- candidate_count - up to 8 alternative responses if you want variety.
- stop_sequences - comma-separated strings that cut generation short.
- response_mime_type - set to
application/jsonfor structured output. - The four safety-threshold dropdowns - Google's filters, medium-and-above default.
Installing it
Part of the shared Google GenMedia pack:
cd ComfyUI/custom_nodes
git clone https://github.com/GoogleCloudPlatform/comfyui-google-genmedia-custom-nodes
pip install -r comfyui-google-genmedia-custom-nodes/requirements.txt
Or ComfyUI Manager → search comfyui-google-genmedia-custom-nodes. Restart, find it under Google AI/Gemini. Set gcp_project_id and gcp_region, run gcloud auth application-default login, and every call bills to Vertex AI.
The honest take
If you're starting fresh today, the 3.1 node is the better default - newer model, same interface. But there's a real argument for this one: Gemini 2.5 is battle-tested in these workflows, its pricing is well understood, and if a saved workflow of yours references it, it just keeps working. For a text node whose whole job is prompt plumbing, "older but proven" is a feature, not a bug. Just don't expect any fancy extras - the file-path-only inputs and the string output are the whole story.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Describe the content in detail. | — |
| model | COMBO | GEMINI_PRO | 3 options: GEMINI_PRO, GEMINI_FLASH, GEMINI_FLASH_LITE |
| temperature | FLOAT | 0.700–1 | — |
| max_output_tokens | INT | 81921–8192 | — |
| top_p | FLOAT | 1.000–1 | — |
| top_k | INT | 321–64 | — |
| candidate_count | INT | 11–8 | — |
| stop_sequences | STRING | — | |
| response_mime_type | STRING | text/plain | — |
| harassment_threshold | COMBO | BLOCK_MEDIUM_AND_ABOVE | 4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE |
| hate_speech_threshold | COMBO | BLOCK_MEDIUM_AND_ABOVE | 4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE |
| sexually_explicit_threshold | COMBO | BLOCK_MEDIUM_AND_ABOVE | 4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE |
| dangerous_content_threshold | COMBO | BLOCK_MEDIUM_AND_ABOVE | 4 options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE |
| system_instructionopt | STRING | — | |
| image_file_pathopt | STRING | the absolute path of the image e.g output/file.png | |
| image_mime_typeopt | COMBO | image/png | 2 options: image/png, image/jpeg |
| video_file_pathopt | STRING | the absolute path of the video e.g output/file.mp4 | |
| video_mime_typeopt | COMBO | video/mp4 | 2 options: video/mp4, video/mpeg |
| audio_file_pathopt | STRING | the absolute path of the audio e.g output/file.mp3 | |
| audio_mime_typeopt | COMBO | audio/mp3 | 3 options: audio/mp3, audio/wav, audio/mpeg |
| gcp_project_idopt | STRING | GCP project id where Vertex AI API will query Gemini | |
| gcp_regionopt | STRING | GCP region for Vertex AI API |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| generated_output | STRING | — |