Veo 3.1 Video
Veo 3.1, from your own Google key
- image
- last_frame
- mask
- video
- output_video
- video_extend
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 onveo-3.1-generate-preview(the default),veo-3.1-fast-generate-preview, andveo-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.mp4and reference images to the GCS bucket you name.
The inputs that matter
promptandnegative_prompt- the creative controls. Veo 3.1 follows long, cinematic instructions surprisingly well.model-veo-3.1-generate-previewis the flagship;veo-3.1-fast-generate-previewtrades a bit of quality for speed. Theveo-2.0-*variants are the older route, needed for mask-based editing.mode- pick your task.image_to_videotakes animage;first_last_framealso takeslast_frame;extend_videotakes thevideooutput of this pack's Load Video (Extract Frame) node or thevideo_extendURI from a previous Veo node;inpaint_*takes amask(white = edit, black = keep) andvideo.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.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A cinematic shot of... | The text description of the video you want to generate. |
| model | COMBO | veo-3.1-generate-preview | Select the Veo model. (Note: veo-2.0 is required for inpainting/mask operations in some API versions). |
| mode | COMBO | text_to_video | Select the generation mode. |
| negative_promptopt | STRING | Text describing what not to include. | |
| api_keyopt | STRING | Your Google AI Studio API Key. Required. | |
| service_account_jsonopt | STRING | Absolute path to your Vertex AI Service Account JSON key file. Required for Veo 2.0 Inpainting. | |
| gcs_bucketopt | STRING | Name of your Cloud Storage bucket (e.g. 'my-veo-bucket'). Required for Veo 2.0 Inpainting. | |
| imageopt | IMAGE | Input image (for image_to_video, first frame of FF2LF, or reference images for txt2v). | |
| last_frameopt | IMAGE | Ending frame. Used only in first_last_frame mode. | |
| maskopt | MASK | Mask image for inpaint_insertion and inpaint_removal modes (white=edit, black=keep). | |
| videoopt | VIDEO | Connect a Load Video output for inpainting or extending. | |
| video_extend_inopt | STRING | Connect the video_extend (URI string) from a previous Veo node to extend it. | |
| aspect_ratioopt | COMBO | 16:9 | The aspect ratio of the generated video. |
| resolutionopt | COMBO | 720p | Resolution. Note: 1080p and 4k forced to 8s duration. Extension is 720p only. |
| durationopt | COMBO | 4 | Duration in seconds. Forced to 8s if 1080p/4k, or if using reference images. |
| person_generationopt | COMBO | allow_all | Control person generation. |
| seedopt | INT | 420–18446744073709550000 | Seed (improves determinism but not guaranteed). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_video | STRING | — |
| video_extend | STRING | — |