Nodes/ComfyUI-nkxx/3. 🎬 Veo 异步获取视频 (Grsai)
ComfyUI Node

3. 🎬 Veo 异步获取视频 (Grsai)

The node that finally downloads your clip

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
3. 🎬 Veo 异步获取视频 (Grsai)
    • video
    • report

    The payout node for the Grsai Veo async pipeline. Zero inputs, one job: open the pack's Veo task database, find the oldest task marked succeeded, download its video to your ComfyUI output folder, and mark it downloaded. Run it after the query step tells you something's ready and you get a real Veo MP4 out of the graph.

    Outputs:

    • video - a ComfyUI VIDEO (local MP4, saved as veo3_<taskid8>_<random>.mp4 in the output dir), ready for a player node, a save node, or further processing.
    • report - STRING: "下载成功" with the task info on success, or one of the explicit failure messages below.

    Mechanically it's the same oldest-first design as the Sora2 fetch node: sort submitted tasks ascending, take the first with status == succeeded, download via robust_download_video (yt-dlp first, curl fallback, three retries), then persist status: downloaded + local path back to data/grsai_veo_history.json. Because IS_CHANGED forces re-execution, re-queueing naturally walks a whole batch one clip at a time.

    The failure modes are handled honestly rather than with silent retries:

    • Nothing succeeded → "当前无待下载的已完成任务。" with an empty video. Not an error, just "not yet."
    • Succeeded but no URL → marks the task failed, because a succeeded Veo task with no URL is a broken record, not a waiting one.
    • Download fails (network, both yt-dlp and curl gave up) → marks it download_failed and hands you the raw URL in the report to grab manually. It won't auto-retry on later runs - once it's download_failed, only manual recovery works (or editing the JSON back to succeeded).

    Install is pack-wide:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jieg9341-lab/ComfyUI-nkxx
    

    Restart; first boot auto-installs requests, pandas, yt-dlp (the primary download engine - a stale/broken yt-dlp in your env is the classic cause of "always fails"), opencv-python, aiohttp. Grsai key from nkxx.grsai.ai is needed for the earlier pipeline steps; this node itself reads the URL from the local DB.

    Grounded gotchas:

    • One video per run, oldest first. A batch of ten needs ten runs (or a loop).
    • The task DB keeps only the last 10 completed Veo tasks by default, so download within a reasonable window or older clips fall out of the queue.
    • If you skip the query step, tasks never flip to succeeded in the DB and this node finds nothing. The order matters: submit → query → fetch.
    • It can't un-send a credit bill - but at least it won't double-charge you by silently retrying a download that already cost you one generation.
    CategoryNkxx/Grsai/视频 (异步)

    Inputs (0)

    No inputs

    Outputs (2)

    NameTypeDescription
    videoVIDEO
    reportSTRING