ComfyUI Node

Veo 3.1 Video

Veo 3.1, from your own Google key

By PATAGONIABIM·Created 7 months ago·Updated 6 months ago· 1
Veo 3.1 Video
  • image
  • last_frame
  • mask
  • video
  • output_video
  • video_extend
promptA cinematic shot of...
modelveo-3.1-generate-preview
modetext_to_video
negative_prompt
api_key
service_account_json
gcs_bucket
video_extend_in
aspect_ratio16:9
resolution720p
duration4
person_generationallow_all
seed42

Veo 3.1 is the model open source still can't answer: native synchronized audio with the video, up to 1080p and 8 seconds, in a single generation pass. There are no weights, so it's API-only - and this node runs it inside ComfyUI with nothing fancier than a Google AI Studio key. It's the most powerful node in the pack and the one that'll cost you the most per render, so treat it accordingly.

One thing to internalize up front: video generation here is a long-running operation, not a quick sampler step. The node fires off a request to Google, then polls every 10 seconds until the clip is done, then downloads the .mp4 into your ComfyUI output folder as veo31_<mode>_<hash>.mp4. Budget minutes per render, and know that your queue is sitting there waiting the whole time.

Modes and auth

The mode dropdown is where the complexity lives: text_to_video, image_to_video, first_last_frame, extend_video, inpaint_insertion, inpaint_removal, and reference images. Each expects different inputs, and they split across two auth routes:

  • api_key (Google AI Studio) - enough for plain generation on veo-3.1-generate-preview (the default), veo-3.1-fast-generate-preview, and veo-2.0-generate-preview.
  • service_account_json + gcs_bucket - required for the Veo 2.0 experimental path and the inpaint/extend modes, which run through Vertex AI. The node auto-uploads your local .mp4 and reference images to the GCS bucket you name.

The inputs that matter

  • prompt and negative_prompt - the creative controls. Veo 3.1 follows long, cinematic instructions surprisingly well.
  • model - veo-3.1-generate-preview is the flagship; veo-3.1-fast-generate-preview trades a bit of quality for speed. The veo-2.0-* variants are the older route, needed for mask-based editing.
  • mode - pick your task. image_to_video takes an image; first_last_frame also takes last_frame; extend_video takes the video output of this pack's Load Video (Extract Frame) node or the video_extend URI from a previous Veo node; inpaint_* takes a mask (white = edit, black = keep) and video.
  • aspect_ratio (16:9 / 9:16), resolution (720p / 1080p / 4k), duration (4 / 6 / 8 s), person_generation (allow_all / allow_adult / dont_allow), seed - present, but the tooltip is honest: "improves determinism but not guaranteed." Closed cloud model, don't expect reproducible seeds.

Outputs: output_video is a STRING - the local file path to the downloaded mp4. video_extend is the operation's URI string, which you chain into the next Veo node's video_extend_in input to extend a clip without re-uploading.

Install

Same pack, same story - clone and pip, nothing heavy to download because nothing runs locally:

cd ComfyUI/custom_nodes
git clone https://github.com/PATAGONIABIM/comfyui-NanoBananaPro_3DeLAB.git
cd comfyui-NanoBananaPro_3DeLAB
pip install -r requirements.txt

Restart ComfyUI, or find it in ComfyUI Manager under comfyui-NanoBananaPro_3DeLAB. Grab a Gemini API key from Google AI Studio for generation; the Vertex route needs a GCP project with Vertex AI enabled and a service account.

The gotchas that actually bite

  • You asked for 1080p and got 8 seconds. Resolution and duration are coupled: 1080p and 4k are forced to 8s, and extension mode is 720p only. The tooltip says it, the source enforces it - it's a Google API constraint this node is just surfacing.
  • 720p by default. This is the recurring community complaint about Veo 3.1 in ComfyUI generally - the default output is 1280×720 even though the model can do FHD/4K. If you want bigger, set resolution explicitly and accept the duration jump.
  • Inpaint modes reject an empty mask. The node checks: if you connect a mask with no white pixels, it returns an explicit error telling you to right-click your image node, open the Mask Editor, draw, and Save to node before queuing. This pack's Load Video (Extract Frame) node exists to get you that frame fast.
  • It's expensive. Video is metered per second and per resolution, and jobs can stall mid-poll. The r/comfyui consensus on API video is basically "the real price of these renders" - set your resolution/duration before you hit queue, not after the bill arrives.
  • Inpaint/extend need the Vertex setup. Missing the service account or the GCS bucket on those modes produces a clear error string on output_video - read that output, it carries the failure reason.
Category3DELAB

Inputs (17)

NameTypeDefaultDescription
promptSTRINGA cinematic shot of...The text description of the video you want to generate.
modelCOMBOveo-3.1-generate-previewSelect the Veo model. (Note: veo-2.0 is required for inpainting/mask operations in some API versions).
modeCOMBOtext_to_videoSelect the generation mode.
negative_promptoptSTRINGText describing what not to include.
api_keyoptSTRINGYour Google AI Studio API Key. Required.
service_account_jsonoptSTRINGAbsolute path to your Vertex AI Service Account JSON key file. Required for Veo 2.0 Inpainting.
gcs_bucketoptSTRINGName of your Cloud Storage bucket (e.g. 'my-veo-bucket'). Required for Veo 2.0 Inpainting.
imageoptIMAGEInput image (for image_to_video, first frame of FF2LF, or reference images for txt2v).
last_frameoptIMAGEEnding frame. Used only in first_last_frame mode.
maskoptMASKMask image for inpaint_insertion and inpaint_removal modes (white=edit, black=keep).
videooptVIDEOConnect a Load Video output for inpainting or extending.
video_extend_inoptSTRINGConnect the video_extend (URI string) from a previous Veo node to extend it.
aspect_ratiooptCOMBO16:9The aspect ratio of the generated video.
resolutionoptCOMBO720pResolution. Note: 1080p and 4k forced to 8s duration. Extension is 720p only.
durationoptCOMBO4Duration in seconds. Forced to 8s if 1080p/4k, or if using reference images.
person_generationoptCOMBOallow_allControl person generation.
seedoptINT420–18446744073709550000Seed (improves determinism but not guaranteed).

Outputs (2)

NameTypeDescription
output_videoSTRING
video_extendSTRING