Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/GoogleCloudPlatform/comfyui-google-genmedia-custom-nodes
/ functions
Functions
106 in github.com/GoogleCloudPlatform/comfyui-google-genmedia-custom-nodes
⨍
Functions
106
◇
Types & classes
41
↓ 17 callers
Function
get_node_logger
Initializes and returns a logger instance for an individual custom node module. It sets the logger's level to match the parent package logge
google_genmedia/logger.py:20
↓ 7 callers
Function
validate_gcs_uri_and_image
Validates if a given string is a valid GCS URI and if the object it points to exists and is identified as an image. Args: gcs_ur
google_genmedia/utils.py:1069
↓ 4 callers
Function
process_video_response
Processes the video generation operation response and saves generated videos. Args: operation: The completed LRO (Long Running Opera
google_genmedia/utils.py:935
↓ 4 callers
Function
recalculateComponentSize
(component)
web/js/preview_veo_video.js:215
↓ 4 callers
Function
tensor_to_pil_to_base64
Converts a PyTorch tensor or PIL Image into PNG-encoded bytes. This function processes an input image, which can be either a PyTorch tensor o
google_genmedia/utils.py:1191
↓ 3 callers
Method
generate_content
Generates content using the Gemini API based on the provided prompt and parameters. This method constructs a request to the Gemini API, inclu
google_genmedia/gemini_nodes.py:187
↓ 3 callers
Function
initializeSingleVideoPreviewWithNavigation
* Manages a single video preview widget for a given component, with navigation for multiple videos. * @param {object} targetComponent The component t
web/js/preview_veo_video.js:57
↓ 2 callers
Method
__init__
Initializes the Gemini client. Args: gcp_project_id: The GCP project ID. If provided, overrides metadata lookup.
google_genmedia/gemini_nodes.py:40
↓ 2 callers
Method
generate_image
Generates an image using the Gemini Flash Image model. Args: model: The name of the Gemini model to use. aspect_ratio
google_genmedia/gemini_flash_image_api.py:60
↓ 2 callers
Function
getNodeStorageKey
(nodeId)
web/js/preview_veo_video.js:22
↓ 2 callers
Function
get_gcp_metadata
(path)
google_genmedia/config.py:25
↓ 2 callers
Function
loadVideoDataFromLocalStorage
(nodeId)
web/js/preview_veo_video.js:36
↓ 2 callers
Function
navigateVideo
(direction)
web/js/preview_veo_video.js:136
↓ 2 callers
Method
upscale_image
Upscale an image using Imagen4. Args: model: Imagen4 model id. There are three as of Jul 1, 2025. image: The
google_genmedia/imagen4_api.py:120
↓ 1 callers
Method
__init__
Initializes the Gemini client. Args: gcp_project_id: The GCP project ID. If provided, overrides metadata lookup.
google_genmedia/virtual_try_on.py:41
↓ 1 callers
Method
__init__
Initializes the Gemini client. Args: gcp_project_id: The GCP project ID. If provided, overrides metadata lookup.
google_genmedia/gemini_nodes.py:425
↓ 1 callers
Method
_predict
Makes a prediction using the Vertex AI PredictionServiceClient. This method is decorated with `@api_error_retry` to handle API error
google_genmedia/virtual_try_on.py:135
↓ 1 callers
Function
download_gcsuri
Downloads a file from a Google Cloud Storage (GCS) URI to a specified local destination path. This function validates the GCS URI format, ex
google_genmedia/utils.py:68
↓ 1 callers
Method
generate_content
Generates content using the Gemini 3.5 API based on the provided prompt and parameters. Args: prompt (str): The main text prompt
google_genmedia/gemini_35_api.py:60
↓ 1 callers
Method
generate_image
Generates an image using the Gemini Pro Image model. Args: model: The name of the Gemini model to use. default: gemini-3-pro-imag
google_genmedia/gemini_pro_image_api.py:60
↓ 1 callers
Method
generate_image_from_text
Generate image from text prompt using Imagen4. Args: model: Imagen4 model id. There are three as of Jul 1, 2025.
google_genmedia/imagen4_api.py:49
↓ 1 callers
Method
generate_image_from_text
Generate image from text prompt using Imagen3. Args: prompt: The text prompt for image generation. person_ge
google_genmedia/imagen3_api.py:53
↓ 1 callers
Method
generate_music_from_text
Generates music from a text prompt using the Lyria 2 API. Args: prompt: The text prompt for music generation.
google_genmedia/lyria2_api.py:70
↓ 1 callers
Method
generate_video_from_gcsuri_image
Generates video from a Google Cloud Storage (GCS) image URI using the Veo 3.1 API. Args: model: Veo3 model.
google_genmedia/veo3_api.py:302
↓ 1 callers
Method
generate_video_from_gcsuri_image
Generates video from a Google Cloud Storage (GCS) image URI using the Veo 2.0 API. Args: gcsuri: The GCS URI of the inpu
google_genmedia/veo2_api.py:199
↓ 1 callers
Method
generate_video_from_image
Generates video from an image input (as a torch.Tensor) using the Veo 3.1 API. Args: model: Veo3 model. imag
google_genmedia/veo3_api.py:139
↓ 1 callers
Method
generate_video_from_image
Generates video from an image input (as a torch.Tensor) using the Veo 2.0 API. Args: image: The input image as a torch.T
google_genmedia/veo2_api.py:121
↓ 1 callers
Method
generate_video_from_references
Generates a video from the references. Args: model: Veo3 model. prompt: The text prompt for video generation
google_genmedia/veo3_api.py:230
↓ 1 callers
Method
generate_video_from_text
Generates video from a text prompt using the Veo 3.1 API. Args: model: Veo3 model. prompt: The text prompt f
google_genmedia/veo3_api.py:60
↓ 1 callers
Method
generate_video_from_text
Generates video from a text prompt using the Veo 2.0 API. Args: prompt: The text prompt for video generation.
google_genmedia/veo2_api.py:59
↓ 1 callers
Function
media_file_to_genai_part
Reads a media file (image, audio, or video) and converts it to a genai.types.Part. This function is designed to prepare the raw bytes of a media
google_genmedia/utils.py:773
↓ 1 callers
Function
saveVideoDataToLocalStorage
(nodeId, videoData)
web/js/preview_veo_video.js:27
↓ 1 callers
Function
setup_custom_package_logger
Reads the custom format, level, handler class, and arguments from logging.conf, creates a custom isolated handler, and attaches it to the pac
__init__.py:39
↓ 1 callers
Function
tensor_to_pil_to_bytes
Converts a PyTorch tensor or PIL Image into PNG-encoded bytes. This function processes an input image, which can be either a PyTorch tensor o
google_genmedia/utils.py:1163
↓ 1 callers
Function
updateVideoSource
()
web/js/preview_veo_video.js:146
Method
INPUT_TYPES
Defines the input types and widgets for the ComfyUI node. Returns: A dictionary specifying the required and optional inp
google_genmedia/imagen4_nodes.py:40
Method
INPUT_TYPES
Defines the input types and widgets for the ComfyUI node. Returns: A dictionary specifying the required and optional inp
google_genmedia/imagen4_nodes.py:218
Method
INPUT_TYPES
(cls)
google_genmedia/veo2_nodes.py:35
Method
INPUT_TYPES
(cls)
google_genmedia/veo2_nodes.py:166
Method
INPUT_TYPES
(cls)
google_genmedia/veo2_nodes.py:318
Method
INPUT_TYPES
(s)
google_genmedia/gemini_35_nodes.py:40
Method
INPUT_TYPES
Defines the input types for the node. - video_paths: A list where each item is a path to a video file.
google_genmedia/helper_nodes.py:45
Method
INPUT_TYPES
(cls)
google_genmedia/helper_nodes.py:143
Method
INPUT_TYPES
(cls)
google_genmedia/lyria2_nodes.py:31
Method
INPUT_TYPES
Defines the input types and widgets for the ComfyUI node. Returns: A dictionary specifying the required and optional inp
google_genmedia/virtual_try_on.py:73
Method
INPUT_TYPES
(cls)
google_genmedia/veo3_nodes.py:35
Method
INPUT_TYPES
(cls)
google_genmedia/veo3_nodes.py:180
Method
INPUT_TYPES
(cls)
google_genmedia/veo3_nodes.py:346
Method
INPUT_TYPES
Defines the input types for the Veo3ReferenceToVideo node.
google_genmedia/veo3_nodes.py:515
Method
INPUT_TYPES
Defines the input types and widgets for the ComfyUI node. Returns: A dictionary specifying the required and optional inp
google_genmedia/gemini_pro_image_node.py:43
Method
INPUT_TYPES
(s)
google_genmedia/gemini_nodes.py:62
Method
INPUT_TYPES
(s)
google_genmedia/gemini_nodes.py:447
Method
INPUT_TYPES
Defines the input types and widgets for the ComfyUI node. Returns: A dictionary specifying the required and optional inp
google_genmedia/gemini_flash_image_node.py:46
Method
INPUT_TYPES
Defines the input types and widgets for the ComfyUI node. Returns: A dictionary specifying the required and optional inp
google_genmedia/gemini_flash_image_node.py:260
Method
INPUT_TYPES
Defines the input types and widgets for the ComfyUI node. Returns: A dictionary specifying the required and optional inp
google_genmedia/imagen3_nodes.py:40
Method
__init__
Initializes the ImagenTextToImageNode.
google_genmedia/imagen4_nodes.py:33
Method
__init__
Initializes the ImagenUpscaleImageNode.
google_genmedia/imagen4_nodes.py:211
Method
__init__
(self)
google_genmedia/gemini_35_nodes.py:36
Method
__init__
(self)
google_genmedia/helper_nodes.py:41
Method
__init__
Initializes the Imagen4API client. Args: project_id: The GCP project ID. If None, it will be retrieved from GCP metadata
google_genmedia/imagen4_api.py:34
Method
__init__
(self)
google_genmedia/lyria2_nodes.py:27
Method
__init__
Initializes the Vertex AI client. Args: gcp_project_id: The GCP project ID. If provided, overrides metadata lookup.
google_genmedia/base.py:33
Method
__init__
Initializes the Imagen3API client. Args: project_id: The GCP project ID. If None, it will be retrieved from GCP metadata
google_genmedia/imagen3_api.py:36
Method
__init__
Initializes the Gemini 3 Pro Image Preview client. Args: project_id (Optional[str], optional): The GCP project ID. If not provided
google_genmedia/gemini_pro_image_api.py:45
Method
__init__
Initializes the Veo3API client. Args: project_id: The GCP project ID. If None, it will be retrieved from GCP metadata.
google_genmedia/veo3_api.py:43
Method
__init__
Initializes the client. Args: project_id: The GCP project ID. If provided, overrides metadata lookup. region
google_genmedia/lyria2_api.py:37
Method
__init__
Initializes the Gemini3ProImage Node.
google_genmedia/gemini_pro_image_node.py:36
Method
__init__
Initializes the Gemini 2.5 Flash Image Preview client. Args: project_id (Optional[str], optional): The GCP project ID. If not prov
google_genmedia/gemini_flash_image_api.py:45
Method
__init__
Initializes the Gemini 3.5 client. Args: project_id: The GCP project ID. If provided, overrides metadata lookup. regio
google_genmedia/gemini_35_api.py:39
Method
__init__
Initializes the ImagenTextToImageNode.
google_genmedia/gemini_flash_image_node.py:39
Method
__init__
Initializes the Gemini31FlashImage Node.
google_genmedia/gemini_flash_image_node.py:253
Method
__init__
Initializes the Veo2API client. Args: project_id: The GCP project ID. If None, it will be retrieved from GCP metadata.
google_genmedia/veo2_api.py:42
Method
__init__
Initializes the Imagen3TextToImageNode.
google_genmedia/imagen3_nodes.py:33
Function
api_error_retry
Decorator factory that implements centralized API error handling, retry logic, and exception mapping for functions interacting with the Googl
google_genmedia/retry.py:29
Function
base64_to_pil_to_tensor
Decodes a base64 string and converts the resulting image to a PyTorch tensor. Args: base64_string: The base64 encoded string of an i
google_genmedia/utils.py:49
Function
beforeRegisterNodeDef
(nodeType, nodeData, appInstance)
web/js/preview_veo_video.js:223
Method
convert_videos
Loads multiple videos from newline-separated paths, extracts frames, and returns them as a single IMAGE batch.
google_genmedia/helper_nodes.py:63
Method
generate
Generates a video from a text prompt using the Google Veo 2.0 API. Args: prompt: The text prompt for video generation.
google_genmedia/veo2_nodes.py:89
Method
generate
Generates a video from a GCS image URI using the Google Veo 2.0 API. Args: gcsuri: The GCS URI of the input image.
google_genmedia/veo2_nodes.py:232
Method
generate
Generates a video from an input image (torch.Tensor) using the Google Veo 2.0 API. Args: image: The input image as a tor
google_genmedia/veo2_nodes.py:378
Method
generate
Generates a video from a text prompt using the Google Veo 3.0 API. Args: model: Veo3 model prompt: The text
google_genmedia/veo3_nodes.py:94
Method
generate
Generates a video from a GCS image URI using the Google Veo 3.0 API. Args: model: Veo3 model gcsuri: The GCS
google_genmedia/veo3_nodes.py:251
Method
generate
Generates a video from an input image (torch.Tensor) using the Google Veo 3.0 API. Args: model: Veo3 model i
google_genmedia/veo3_nodes.py:411
Method
generate_and_return_image
Generates images based on the provided parameters using the Imagen API and returns them as a PyTorch tensor suitable for ComfyUI.
google_genmedia/imagen4_nodes.py:116
Method
generate_and_return_image
This function iterates through each provided product image, makes an API call to the Virtual Try-On service, and returns the generate
google_genmedia/virtual_try_on.py:160
Method
generate_and_return_image
Generates images using the Gemini Pro Image API and returns them. This method interfaces with the GeminiProImageAPI to generate images
google_genmedia/gemini_pro_image_node.py:158
Method
generate_and_return_image
Generates images using the Gemini Flash Image API and returns them. This method interfaces with the GeminiFlashImageAPI to generate images
google_genmedia/gemini_flash_image_node.py:143
Method
generate_and_return_image
Generates images using the Gemini Flash Image API and returns them. This method interfaces with the GeminiFlashImageAPI to generate images
google_genmedia/gemini_flash_image_node.py:365
Method
generate_and_return_image
Generates images based on the provided parameters using the Imagen API and returns them as a PyTorch tensor suitable for ComfyUI.
google_genmedia/imagen3_nodes.py:112
Method
generate_content
( self, prompt: str, model: str, temperature: float, max_output_tokens
google_genmedia/gemini_35_nodes.py:163
Method
generate_content
Generates content using the Gemini API based on the provided prompt and parameters. This method constructs a request to the Gemini API, inclu
google_genmedia/gemini_nodes.py:572
Method
generate_from_references
( self, model: str, image1: torch.Tensor, image_format: str, prompt: s
google_genmedia/veo3_nodes.py:584
Function
generate_image_from_text
Generate image from text prompt using Imagen. Args: client: genai.Client model: model to be used prompt: The text pr
google_genmedia/utils.py:131
Method
generate_music
Generates music from a text prompt using the Lyria 2 API. Args: prompt: The text prompt for music generation.
google_genmedia/lyria2_nodes.py:85
Function
generate_video_from_gcsuri_image
Generates video from a Google Cloud Storage (GCS) image URI using the Veo API. Args: client: genai.Client model: model to be
google_genmedia/utils.py:280
Function
generate_video_from_image
Generates video from an image input (as a torch.Tensor) using the Veo API. Args: client: genai.Client model: model to be use
google_genmedia/utils.py:411
Function
generate_video_from_references
Generates video from GCS reference image URIs using the Veo API.
google_genmedia/utils.py:567
Function
generate_video_from_text
Generates video from a text prompt using the Veo API. Args: client: genai.Client model: model to be used prompt: The
google_genmedia/utils.py:664
Function
getValue
()
web/js/preview_veo_video.js:71
Function
prep_for_media_conversion
Attempts to prepare a media file into a genai.types.Part for input to the model. This function checks if the specified file exists and, if so, at
google_genmedia/utils.py:807
next →
1–100 of 106, ranked by callers