mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-07 20:12:57 +08:00
Add support for Veo3 API node. (#8320)
This commit is contained in:
parent
1c1687ab1c
commit
592d056100
@ -54,6 +54,10 @@ class VeoVideoGenerationNode(ComfyNodeABC):
|
|||||||
"""
|
"""
|
||||||
Generates videos from text prompts using Google's Veo API.
|
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,
|
This node can create videos from text descriptions and optional image inputs,
|
||||||
with control over parameters like aspect ratio, duration, and more.
|
with control over parameters like aspect ratio, duration, and more.
|
||||||
"""
|
"""
|
||||||
@ -130,6 +134,14 @@ class VeoVideoGenerationNode(ComfyNodeABC):
|
|||||||
"default": None,
|
"default": None,
|
||||||
"tooltip": "Optional reference image to guide video generation",
|
"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": {
|
"hidden": {
|
||||||
"auth_token": "AUTH_TOKEN_COMFY_ORG",
|
"auth_token": "AUTH_TOKEN_COMFY_ORG",
|
||||||
@ -154,6 +166,7 @@ class VeoVideoGenerationNode(ComfyNodeABC):
|
|||||||
person_generation="ALLOW",
|
person_generation="ALLOW",
|
||||||
seed=0,
|
seed=0,
|
||||||
image=None,
|
image=None,
|
||||||
|
model="veo-2.0-generate-001",
|
||||||
unique_id: Optional[str] = None,
|
unique_id: Optional[str] = None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
@ -192,7 +205,7 @@ class VeoVideoGenerationNode(ComfyNodeABC):
|
|||||||
# Initial request to start video generation
|
# Initial request to start video generation
|
||||||
initial_operation = SynchronousOperation(
|
initial_operation = SynchronousOperation(
|
||||||
endpoint=ApiEndpoint(
|
endpoint=ApiEndpoint(
|
||||||
path="/proxy/veo/generate",
|
path=f"/proxy/veo/{model}/generate",
|
||||||
method=HttpMethod.POST,
|
method=HttpMethod.POST,
|
||||||
request_model=Veo2GenVidRequest,
|
request_model=Veo2GenVidRequest,
|
||||||
response_model=Veo2GenVidResponse
|
response_model=Veo2GenVidResponse
|
||||||
@ -223,7 +236,7 @@ class VeoVideoGenerationNode(ComfyNodeABC):
|
|||||||
# Define the polling operation
|
# Define the polling operation
|
||||||
poll_operation = PollingOperation(
|
poll_operation = PollingOperation(
|
||||||
poll_endpoint=ApiEndpoint(
|
poll_endpoint=ApiEndpoint(
|
||||||
path="/proxy/veo/poll",
|
path=f"/proxy/veo/{model}/poll",
|
||||||
method=HttpMethod.POST,
|
method=HttpMethod.POST,
|
||||||
request_model=Veo2GenVidPollRequest,
|
request_model=Veo2GenVidPollRequest,
|
||||||
response_model=Veo2GenVidPollResponse
|
response_model=Veo2GenVidPollResponse
|
||||||
@ -304,5 +317,5 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
"VeoVideoGenerationNode": "Google Veo2 Video Generation",
|
"VeoVideoGenerationNode": "Google Veo Video Generation",
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user