Skip to content

Commit 3b0a53b

Browse files
Revert "Revert "Add support for Veo3 API node." (comfyanonymous#8322)"
This reverts commit fb83eda.
1 parent 7d593ba commit 3b0a53b

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

comfy_api_nodes/nodes_veo2.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ class VeoVideoGenerationNode(ComfyNodeABC):
5454
"""
5555
Generates videos from text prompts using Google's Veo API.
5656
57+
Supported models:
58+
- veo-2.0-generate-001
59+
- veo-3.0-generate-preview
60+
5761
This node can create videos from text descriptions and optional image inputs,
5862
with control over parameters like aspect ratio, duration, and more.
5963
"""
@@ -130,6 +134,14 @@ def INPUT_TYPES(s):
130134
"default": None,
131135
"tooltip": "Optional reference image to guide video generation",
132136
}),
137+
"model": (
138+
IO.COMBO,
139+
{
140+
"options": ["veo-2.0-generate-001", "veo-3.0-generate-preview"],
141+
"default": "veo-2.0-generate-001",
142+
"tooltip": "Model to use for video generation. Defaults to veo 2.0",
143+
},
144+
),
133145
},
134146
"hidden": {
135147
"auth_token": "AUTH_TOKEN_COMFY_ORG",
@@ -154,6 +166,7 @@ def generate_video(
154166
person_generation="ALLOW",
155167
seed=0,
156168
image=None,
169+
model="veo-2.0-generate-001",
157170
unique_id: Optional[str] = None,
158171
**kwargs,
159172
):
@@ -192,7 +205,7 @@ def generate_video(
192205
# Initial request to start video generation
193206
initial_operation = SynchronousOperation(
194207
endpoint=ApiEndpoint(
195-
path="/proxy/veo/generate",
208+
path=f"/proxy/veo/{model}/generate",
196209
method=HttpMethod.POST,
197210
request_model=Veo2GenVidRequest,
198211
response_model=Veo2GenVidResponse
@@ -223,7 +236,7 @@ def progress_extractor(response):
223236
# Define the polling operation
224237
poll_operation = PollingOperation(
225238
poll_endpoint=ApiEndpoint(
226-
path="/proxy/veo/poll",
239+
path=f"/proxy/veo/{model}/poll",
227240
method=HttpMethod.POST,
228241
request_model=Veo2GenVidPollRequest,
229242
response_model=Veo2GenVidPollResponse
@@ -304,5 +317,5 @@ def progress_extractor(response):
304317
}
305318

306319
NODE_DISPLAY_NAME_MAPPINGS = {
307-
"VeoVideoGenerationNode": "Google Veo2 Video Generation",
320+
"VeoVideoGenerationNode": "Google Veo Video Generation",
308321
}

0 commit comments

Comments
 (0)