Browse by type
This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.
This is a preview version of Google GenAI custom nodes for ComfyUI.
This repository contains ComfyUI custom nodes for the following Google GenMedia models: - Gemini (2.5, 3.1, 3.5) - Gemini 2.5 Flash Image (Nano Banana 🍌) - Gemini 3.1 Flash Image (Nano Banana 2 🍌) - Gemini 3 Pro Image (Nano Banana Pro 🍌) - Imagen3 - Imagen4 - Lyria2 - Veo2 - Veo3.1 - Virtual-try-on
All of these nodes need a Google Cloud project and region as input and uses the Vertex AI APIs to access Google GenMedia models. If you are running ComfyUI on GKE as described in ComfyUI on GKE guide, the Vertex AI APIs will be authenticated with GKE workload identity and no additional action is required form your end.
If you are running your own(local) ComfyUI installation, you will need to install the custom nodes and authenticate to Google Cloud as an user or a Service Account. See installation section for details.
All the custom nodes provided with this repo use Vertex AI APIs to generate content and hence, Vertex AI pricing is applied to each API call. See Vertex AI Pricing for the model that you want to use.
Note : If you store the content in Google Cloud Storage using these custom nodes, refer to Google Cloud Storage pricing.
If you want to run ComfyUI on GKE and use these custom nodes, follow the ComfyUI on GKE guide that will spin up ComfyUI on GKE with these custom nodes installed and ready to use.
If you are running ComfyUI locally or at a place other than GCP and want to use these custom nodes, you need to perform the following steps to install them:
Download these custom nodes in one of the following ways:
Go to ComfyUI Manager --> Custom Node Manager --> search for comfyui-google-genmedia-custom-nodes. Click Install.
Manual installation using git
Open the terminal on the machine that is running ComfyUI and change to the directory where ComfyUI is running from. ```sh cd
E.g if your ComfyUI is running from "/home/user/username/ComfyUI", replace <PATH_TO_COMFYUI_INSTALLATION> with "/home/user/username/"
```
- Change to the custom_nodes folder.
sh
cd ComfyUI/custom_nodes
Clone this repository in the custom_nodes folder:
sh
git clone https://github.com/GoogleCloudPlatform/comfyui-google-genmedia-custom-nodes
shREADME.md
source <PATH_TO_PYTHON_VIRTUAL_ENVIRONMENT>/bin/activatesh
pip install -r comfyui-google-genmedia-custom-nodes/requirements.txtNow that the custom nodes are installed, set up authentication with Google Cloud. This is needed because the custom nodes will use Vertex AI APIs in the given Google Cloud project and region. Choose one of the following authentication methods:
Re-start ComfyUI via ComfyUI manager or manually. Verify there are no failures in the logs and the log says that google-genmedia custom node has been loaded successfully, similar to the following message:
sh
Import times for custom nodes:
.....
.....
.....
2.8 seconds: /XXX/XXXX/ComfyUI/custom_nodes/comfyui-google-genmedia-custom-nodes
Google AI with custom nodes for Google’s genmedia models as shown in the image below. You will need to pass a GCP project id and GCP region as input parameter to every node if you are using the custom nodes from your local ComfyUI installation.

sh
gcloud auth application-default loginsh
gcloud auth loginSet shell variables
``sh
export PROJECT_ID="<YOUR_PROJECT_ID>"
export SERVICE_ACCOUNT_ID="<YOUR_SERVICE_ACCOUNT_ID>"
export USER_EMAIL=gcloud auth list --filter=status:ACTIVE --format="value(account)"`
Replace with the GCP project id you plan to use
Replace with the name of the service account you will use to access Google Cloud with ComfyUI. It will be created in the next step.
- Set Google Cloud project.sh
gcloud config set project $PROJECT_ID
- Create a new service account:sh
gcloud iam service-accounts create $SERVICE_ACCOUNT_ID \
--display-name="ComfyUI Service Account" \
--description="Service Account to use ComfyUI"
- Grant permissions to the service account:sh
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:${SERVICE_ACCOUNT_ID}@${PROJECT_ID}.iam.gserviceaccount.com" \
--role="roles/storage.objectUser" --condition=None
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:${SERVICE_ACCOUNT_ID}@${PROJECT_ID}.iam.gserviceaccount.com" \
--role="roles/aiplatform.user" --condition=None
- Grant the Service Account Token Creator role to your user on the service account. This role lets your user account to impersonate the Service Account created in previous steps:sh
gcloud iam service-accounts add-iam-policy-binding \
${SERVICE_ACCOUNT_ID}@${PROJECT_ID}.iam.gserviceaccount.com \
--member="user:${USER_EMAIL}" \
--role="roles/iam.serviceAccountTokenCreator"
- Now, set yourself to impersonate the service accountsh
gcloud auth application-default login --impersonate-service-account=${SERVICE_ACCOUNT_ID}@${PROJECT_ID}.iam.gserviceaccount.com
```
Category: Google AI/Gemini
This node integrates the Gemini 2.5 into ComfyUI, supporting text generation only with multimodal inputs (image, video, audio).
| Parameter | Type | Default | Description |
|---|---|---|---|
| prompt | STRING |
"Describe the content in detail." | Multiline string. The main text prompt for the model. |
| model | Dropdown |
GEMINI_PRO |
Selects the specific Gemini model to use. |
| temperature | FLOAT |
0.7 |
Controls randomness (0.0 to 1.0). Higher values are more creative; lower are more deterministic. |
| max_output_tokens | INT |
8192 |
The maximum number of tokens to generate in the response (Max: 8192). |
| top_p | FLOAT |
1.0 |
The maximum cumulative probability of tokens to consider (0.0 to 1.0). |
| top_k | INT |
32 |
The maximum number of tokens to consider when generating the next token (1 to 64). |
| candidate_count | INT |
1 |
Number of alternative responses to generate (1 to 8). |
| stop_sequences | STRING |
"" |
Comma-separated phrases that cause the model to stop generating text. |
| response_mime_type | String |
text/plain |
The desired format of the response. Options: text/plain, application/json. |
| harassment_thresholds | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings for Harassment Content. |
| hate_speech_thresholds | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings for Content. |
| sexually_explicit_thresholds | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings for Sexually Explicit Content. |
| dangerous_content_thresholds | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings Dangerous Content. |
| gcp_project_id | STRING |
"" |
Manually specify GCP Project ID. |
| gcp_region | STRING |
"" |
Manually specify GCP Region. |
| Parameter | Type | Default | Description |
|---|---|---|---|
| system_instruction | STRING |
"" |
Multiline string. System instructions to guide the model's behavior or persona. |
| image_file_path | STRING |
"" |
Absolute path to an image file (e.g., output/file.png). |
| image_mime_type | Dropdown |
image/png |
Helper to specify the MIME type for the image path provided. |
| video_file_path | STRING |
"" |
Absolute path to a video file (e.g., output/file.mp4). |
| video_mime_type | Dropdown |
video/mp4 |
Helper to specify the MIME type for the video path provided. |
| audio_file_path | STRING |
"" |
Absolute path to an audio file (e.g., output/file.mp3). |
| audio_mime_type | Dropdown |
audio/mp3 |
Helper to specify the MIME type for the audio path provided. |
| Name | Type | Description |
|---|---|---|
| generated_output | STRING |
The raw text content generated by the Gemini model. |

Category: Google AI/Gemini
This node integrates the Gemini 3.1 into ComfyUI, supporting text generation with multimodal inputs (image, video, audio).
| Parameter | Type | Default | Description |
|---|---|---|---|
| prompt | STRING |
"Describe the content in detail." | Multiline string. The main text prompt for the model. |
| model | Dropdown |
GEMINI_31_PRO |
Selects the specific Gemini model to use. Options: GEMINI_31_PRO, GEMINI_3_FLASH, GEMINI_31_FLASH_LITE. |
| temperature | FLOAT |
0.7 |
Controls randomness (0.0 to 1.0). Higher values are more creative; lower are more deterministic. |
| max_output_tokens | INT |
8192 |
The maximum number of tokens to generate in the response. |
| top_p | FLOAT |
1.0 |
The maximum cumulative probability of tokens to consider (0.0 to 1.0). |
| top_k | INT |
32 |
The maximum number of tokens to consider when generating the next token (1 to 64). |
| candidate_count | INT |
1 |
Number of alternative responses to generate (1 to 8). |
| stop_sequences | STRING |
"" |
Comma-separated phrases that cause the model to stop generating text. |
| response_mime_type | String |
text/plain |
The desired format of the response. Options: text/plain, application/json. |
| harassment_threshold | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings for Harassment Content. |
| hate_speech_threshold | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings for Hate Speech Content. |
| sexually_explicit_threshold | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings for Sexually Explicit Content. |
| dangerous_content_threshold | Dropdown |
BLOCK_MEDIUM_AND_ABOVE |
Individual settings for Dangerous Content. |
| gcp_project_id | STRING |
"" |
Manually specify GCP Project ID. |
| gcp_region | STRING |
global |
Manually specify GCP Region. Default is global. |
| Parameter | Type | Default | Description |
|---|---|---|---|
| system_instruction | STRING |
"" |
Multiline string. System instructions to guide the model's behavior or persona. |
| image_file_path | STRING |
"" |
Absolute path to an image file (e.g., output/file.png). |
| image_mime_type | Dropdown |
image/png |
Helper to specify the MIME type for the image path provided. |
| video_file_path | STRING |
"" |
Absolute path to a video file (e.g., output/file.mp4). |
| video_mime_type | Dropdown |
video/mp4 |
Helper to specify the MIME type for the video path provided. |
| audio_file_path | STRING |
"" |
Absolute path to an audio file (e.g., output/file.mp3). |
| audio_mime_type | Dropdown |
audio/mp3 |
Helper to specify the MIME type for the audio path provided. |
| Name | Type | Description |
|---|---|---|
| **ge |
$ claude mcp add comfyui-google-genmedia-custom-nodes \
-- python -m otcore.mcp_server <graph>