Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Add support for Veo3 API node. (#8320)

Robin Huang592d05610072
diff --git a/comfy_api_nodes/nodes_veo2.py b/comfy_api_nodes/nodes_veo2.py
index df846d5dd..e93f82a9a 100644
--- a/comfy_api_nodes/nodes_veo2.py
+++ b/comfy_api_nodes/nodes_veo2.py
@@ -54,6 +54,10 @@ class VeoVideoGenerationNode(ComfyNodeABC):
"""
Generates videos from text prompts using Google's Veo API.
+ Supported models:
+ - veo-2.0-generate-001
+ - veo-3.0-generate-preview
+
This node can create videos from text descriptions and optional image inputs,
with control over parameters like aspect ratio, duration, and more.
"""
@@ -130,6 +134,14 @@ class VeoVideoGenerationNode(ComfyNodeABC):
"default": None,
"tooltip": "Optional reference image to guide video generation",
}),
+ "model": (
+ IO.COMBO,
+ {
+ "options": ["veo-2.0-generate-001", "veo-3.0-generate-preview"],
+ "default": "veo-2.0-generate-001",
+ "tooltip": "Model to use for video generation. Defaults to veo 2.0",
+ },
+ ),
},
"hidden": {
"auth_token": "AUTH_TOKEN_COMFY_ORG",
@@ -154,6 +166,7 @@ class VeoVideoGenerationNode(ComfyNodeABC):
person_generation="ALLOW",
seed=0,
image=None,
+ model="veo-2.0-generate-001",
unique_id: Optional[str] = None,
**kwargs,
):
@@ -192,7 +205,7 @@ class VeoVideoGenerationNode(ComfyNodeABC):
# Initial request to start video generation
initial_operation = SynchronousOperation(
endpoint=ApiEndpoint(
- path="/proxy/veo/generate",
+ path=f"/proxy/veo/{model}/generate",
method=HttpMethod.POST,
request_model=Veo2GenVidRequest,
response_model=Veo2GenVidResponse
@@ -223,7 +236,7 @@ class VeoVideoGenerationNode(ComfyNodeABC):
# Define the polling operation
poll_operation = PollingOperation(
poll_endpoint=ApiEndpoint(
- path="/proxy/veo/poll",
+ path=f"/proxy/veo/{model}/poll",
method=HttpMethod.POST,
request_model=Veo2GenVidPollRequest,
response_model=Veo2GenVidPollResponse
@@ -304,5 +317,5 @@ NODE_CLASS_MAPPINGS = {
}
NODE_DISPLAY_NAME_MAPPINGS = {
- "VeoVideoGenerationNode": "Google Veo2 Video Generation",
+ "VeoVideoGenerationNode": "Google Veo Video Generation",
}