Nodes/ComfyUI Agnes AI/Agnes 图片生成
ComfyUI Node

Agnes 图片生成

Free Cloud Images, Eight Reference Slots, No GPU

By Bigesila-B·Created 28 days ago·Updated 27 days ago· 1
Agnes 图片生成
  • image
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image
  • saved_path
◄prompt—►
◄modelagnes-image-2.5-flash►
◄size1K►
◄ratio1:1►
◄api_key►
◄base_urlhttps://api.agnes-ai.cn/v1►

"Agnes 图片生成" (AgnesImageGenerate) is a node that does not generate anything on your machine. It packs your prompt and up to eight reference frames, POSTs them to Agnes AI's cloud API, and hands the returned PNG back as a normal ComfyUI image tensor. That puts it in the API-wrapper category: a node that packages your input, sends it to a server you don't control, and drops the result into the graph as if a local sampler had made it. It's the right tool when you want a model you can't download, or when someone else's GPU beats your electricity bill.

Agnes AI is a Chinese cloud platform and, for images, the meter currently reads zero - the README lists every image tier as free. That's the pitch: a 4K composition on a 6GB card, no download queue.

What it actually sends

The mechanism is short enough to describe honestly. Each reference frame is encoded to a base64 Data URI, the node fires one request at POST {base_url}/images/generations in an OpenAI-shaped body, and response_format: b64_json goes inside extra_body - the author's own comment in nodes/agnes_api.py flags that placement as the documented gotcha of this API. The PNG bytes come back, get decoded to a [1, H, W, C] float tensor, and land on the image output.

The inputs that matter, in the order a beginner meets them:

  • prompt - multiline, and you can right-click it → Convert to input to drive it from any STRING node (a prompt-enhancer, a file read, whatever). Empty prompt is a hard error.
  • model / size / ratio - model defaults to agnes-image-2.5-flash (2.1-flash and 2.0-flash are the other options); size is 1K–4K and the tooltip is explicit that size and ratio together decide the final pixel count. Ratio has eight choices from 1:1 to 21:9.
  • image … image_8 - eight optional reference slots, all IMAGE. One frame is img2img; more frames is multi-image composition, up to eight total. Each slot also accepts a batch, and every frame counts against the eight. Feed it nine and it uses the first eight and says so in the console rather than erroring.

Outputs are image (wire it to any image node - SaveImage, upscaler, whatever) and saved_path, a STRING carrying the relative path of the copy the node already wrote to output/AgnesAI/. That auto-save uses ComfyUI's own save-path helper, so filenames get an incrementing counter and won't overwrite each other. You don't need a SaveImage node to keep the file.

Install

ComfyUI Manager: search the pack title ComfyUI Agnes AI (registry display name; publisher bigesila). Manual, if you prefer:

cd ComfyUI/custom_nodes
git clone https://github.com/Bigesila-B/ComfyUI-Agnes-AI-All
# restart ComfyUI

Dependencies are just requests and pillow - that's what requirements.txt pins, and your environment almost certainly has both. No model downloads, no CUDA, no GPU.

Then get a key from the Agnes developer console and either paste it into api_key or set AGNES_API_KEY in the environment and leave the field blank. Prefer the environment variable. A key typed into the node is saved in plain text inside every workflow JSON you share, and a node that holds a credential and calls the network is the exact shape of the one ComfyUI pack that ended in a malware prosecution. Also watch the base_url default: it points at the China site (https://api.agnes-ai.cn/v1); international users should switch it to https://apihub.agnes-ai.com/v1.

Where people get burned

No seed. None. The image API has no seed parameter, so the same prompt gives you a different picture every run and there's nothing you can do about it. If you need reproducibility, this is the wrong node - pick a local model.

The auto-saved PNG has no workflow embedded. The node writes the API's raw bytes straight to disk, so the file in output/AgnesAI/ lacks the workflow/prompt chunks a normal SaveImage PNG carries. You can't drag it back onto the canvas. For anything you intend to post or revisit, wire image into SaveImage as well.

Version floor. The pack registers through ComfyUI's V3 API (comfy_entrypoint, comfy_api.latest), so on an older build the pack simply won't load - no error, no nodes. You need a ComfyUI from late 2025 or later.

Errors worth reading. The client's own status messages are more useful than the traceback: 401 means the key is wrong or not activated, 400 usually means a parameter and media field don't match, and the client retries 429/5xx three times before giving up. A blank-ish error mentioning 未配置 Agnes AI API Key means exactly that - no key found in the field or the environment.

One last thing: this is not the only Agnes AI pack. 1038lab/ComfyUI-Agnes-AI wraps the same service with different node names, and it turns up first in some searches. Check the repository name before you blame these nodes for someone else's behavior.

CategoryAgnesAI

Inputs (14)

NameTypeDefaultDescription
promptSTRING生成/编辑指令。可右键转换为输入口,接入任意 STRING 节点。
modelCOMBOagnes-image-2.5-flash3 options: agnes-image-2.5-flash, agnes-image-2.1-flash, agnes-image-2.0-flash
sizeCOMBO1K输出分辨率档位(与 ratio 组合决定最终像素)
ratioCOMBO1:18 options: 1:1, 3:4, 4:3, 16:9, 9:16, 2:3, +2
api_keyoptSTRINGAgnes AI API Key;留空则读取环境变量 AGNES_API_KEY
base_urloptSTRINGhttps://api.agnes-ai.cn/v1国内站默认;国际站为 https://apihub.agnes-ai.com/v1
imageoptIMAGE参考图 1(连上即图生图)。多口连接或单口 batch 多帧 = 多图合成(共 8 口对齐 API 上限)
image_2optIMAGE参考图 2
image_3optIMAGE参考图 3
image_4optIMAGE参考图 4
image_5optIMAGE参考图 5
image_6optIMAGE参考图 6
image_7optIMAGE参考图 7
image_8optIMAGE参考图 8

Outputs (2)

NameTypeDescription
imageIMAGE—
saved_pathSTRING自动保存的相对路径(output/AgnesAI 下);落盘失败时为空串