Agnes 视频生成
Three Video Modes in One Node, Billed by the Second
- video
Agnes 视频生成 is a cloud video node: nothing runs locally, your prompt and media go to Agnes AI's servers, a video comes back, and you pay by the second. With a decent GPU that's a hard sell for text-to-video - local Wan or LTX does it for free - but two jobs are worth renting a server for: keyframe interpolation between a specific first and last frame, and "all-reference" generation where you hand the model pictures, an audio track and a clip at once.
The flash tier is currently free; the full model is metered at ¥0.15/second for 720P, ¥0.25 for 1080P/1K and ¥0.35 for 2K on the China site. Those numbers move - check the pricing page before you queue a batch.
One node, three shapes
The top of the node is a media_mode dropdown, and switching it rewires what inputs exist below - this is the DynamicCombo pattern, so the node genuinely changes shape rather than hiding greyed-out sockets.
- 文生视频 (text-to-video) - no media inputs at all. Use this one.
- 图生视频 / 首尾帧 (keyframe) - reveals
first_frameandlast_frame, both wiredIMAGE. Connect onlyfirst_framefor image-to-video; connect both and you're interpolating between them. Connect neither and it refuses to run. - 全能参考 (all-reference) - reveals
video_url(a publicly reachable clip URL, only on the non-flash model), and the reference images and audio come from the upload panel above rather than wires.
Everything else is shared. prompt is multiline and convertible to an input; in reference mode you name your media in it with <Picture 1>, <Audio 1>, <Video 1> placeholders so the model knows which reference does what. model defaults to agnes-video-2.5 (the alternative is agnes-video-2.5-flash). seconds is a 4–12 dropdown - this is the 2.5 series, so the old frame-count and frame-rate parameters are gone. size is 720P/1080P/1K/2K, aspect_ratio has six options, and seed at 0 means "server decides" while any value above 0 gets sent along. Two more you'll touch: api_key / base_url (same story as the image node - set AGNES_API_KEY and leave the field blank) and poll_timeout, an advanced field defaulting to 1200 seconds. media_files is JSON the upload panel maintains; don't hand-edit it.
The single output is video, a native ComfyUI VIDEO asset. Wire it to the core Save Video node to keep it, or Get Video Components to split it back into frames and audio.
How the call works
Video is asynchronous. The node POSTs your payload to {base_url}/videos, gets a task ID back, then polls {origin}/agnesapi?video_id=…&model_name=… - that endpoint hangs off the domain root, not under /v1. Polling starts at 3 seconds and slows as the job ages, backing off to roughly 30 seconds when it hits the query rate limit, so a long queue doesn't kill the task. When the job completes the node downloads the MP4 into ComfyUI's temp/ folder and wraps it as a VIDEO asset. Two consequences: your progress bar reads rough while the task queues, and the downloaded file is scratch - no Save Video node, and it's gone when temp gets cleared.
Install
The whole pack installs in one go. Manager: search ComfyUI Agnes AI. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Bigesila-B/ComfyUI-Agnes-AI-All
# restart ComfyUI
Dependencies are requests and pillow only - no models to download. But the pack registers through ComfyUI's V3 node API (comfy_entrypoint, comfy_api.latest), so you need a late-2025-or-newer build; on anything older the nodes simply won't exist. As with the image node: a key pasted into api_key sits in plain text in every workflow you share, so use AGNES_API_KEY. Default base_url is the China site; international users want https://apihub.agnes-ai.com/v1.
Common issues
Reference media has to be uploaded, not wired. This trips up anyone coming from the image node. Keyframe mode takes first_frame/last_frame as IMAGE tensors from the graph; all-reference mode wants images and audio through the node's own upload panel (files land in ComfyUI's input/). The panel greys out in the other two modes - that's design, and your queued media comes back when you switch back to 全能参考.
Limits. Reference images cap at 8 (5 on flash), audio at 3 tracks, video at 1 clip. Files over the API's ceiling - 15MB for images and audio, 50MB for video - are compressed automatically (the console prints before/after sizes), and images get rescaled into the 256–5760px window. Uploading a video and filling in video_url is an error: pick one.
Flash quietly says no. agnes-video-2.5-flash is 720P-only, so any other size is downgraded with a console line, and it can't take a video reference at all. For 1080P or clip-guided generation, use agnes-video-2.5.
Creation is deliberately not retried, and queues are long. The create call fires exactly once - retrying could double-book a metered job, per the author's own source comment - so if it times out, check the Agnes console for a task before hitting run again. Peak-hour waits are normal; on a poll timeout raise poll_timeout rather than re-running, because the task may still be queued and still billable. Query-side 429s are handled by the built-in backoff; ignore those.
Finally, the same identity warning as the image node: 1038lab/ComfyUI-Agnes-AI is a separate pack wrapping the same service with different node names. Check which repo you installed before reporting a bug.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | 视频描述。全能参考模式中用 <Picture 1>/<Audio 1>/<Video 1> 占位说明各参考媒体的作用。可右键转换为输入口。 | |
| model | COMBO | agnes-video-2.5 | 2 options: agnes-video-2.5, agnes-video-2.5-flash |
| seconds | COMBO | 5 | 视频时长(秒)。2.5 系列不再使用 num_frames/frame_rate。 |
| size | COMBO | 720P | 2.5-flash 仅支持 720P,其他档位会自动降级。 |
| aspect_ratio | COMBO | 16:9 | 6 options: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 |
| media_modeopt | COMBO | 选择生成模式:切换后下方的媒体输入口会随之变化 | |
| seedopt | INT | 00–2147483647 | 0 = 不指定(服务端随机);>0 时随请求发送 |
| api_keyopt | STRING | Agnes AI API Key;留空则读取环境变量 AGNES_API_KEY。注意:填入的 key 会随工作流 JSON 保存,分享工作流前请清空。 | |
| base_urlopt | STRING | https://api.agnes-ai.cn/v1 | 国内站默认(需以 /v1 结尾);国际站为 https://apihub.agnes-ai.com/v1 |
| poll_timeoutopt | INT | 120060–7200 | 轮询超时(秒);高峰期任务排队久可调大 |
| media_filesopt | STRING | [] | 素材面板上传清单(JSON,由上方上传区维护,无需手动编辑) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |