Nodes/comfyui_transit_node/CYAI 上传素材 (自动建组/轮询激活)
ComfyUI Node

CYAI 上传素材 (自动建组/轮询激活)

// is the only door past the real-face filter — here's how to build one

By Gin3601·Created 11 days ago·Updated 9 days ago· 0
CYAI 上传素材 (自动建组/轮询激活)
  • image
  • asset_ids
  • group_id
◄api_key►
◄base_urlhttps://www.cyai.club►
◄name►
◄image_hostuguu►
◄asset_typeImage►
◄project_namedefault►
◄poll_interval5►
◄max_wait300►
◄url►
◄group_id►
◄group_name►
◄upload_max_side2048►
◄upload_quality90►

Volcengine's video API will not accept a real person's face as an inline image. Base64? Scanned and refused. Public URL? Scanned and refused. The error is InputImageSensitiveContentDetected.PrivacyInformation - "may contain real person" - and it doesn't care that it's your own face, your own project, your own key. The one thing that passes is a reference to a hosted asset: asset://<id>. This node is how you make one out of a picture sitting in your ComfyUI graph.

It's an odd node because it solves a problem you can't see from the canvas: nothing in your workflow looks wrong, the video node just refuses to submit. What happens under the hood is a three-step dance, and knowing it explains nearly every failure here.

How it works

Ark's asset API doesn't accept image bytes. It accepts a URL it can fetch server-side, on a public http(s) address - no localhost, no LAN, no base64, no data URI. That's a hard constraint of the upstream service, not a design choice of this pack.

So the node fakes one. Take the image input, clamp it to a sane range (long edge ≤ upload_max_side, default 2048; both sides ≥ 300px because the asset API rejects anything smaller; upper bound 6000px), JPEG-encode it at upload_quality, POST the bytes to an anonymous file host, get back a public link, then call CreateAsset with that link. If you pasted a url instead, it skips straight to that step.

After the create call it polls GetAsset on poll_interval (default 5s) until the asset reports Active - async processing on their side, usually a few seconds - or raises if it goes Failed or you run out of max_wait (default 300s). Then it hands you the id.

The inputs that matter

api_key and base_url first, then name - which is required and which you should make uniquely recognizable, because name is all you'll see when you list assets later. Then pick a source: connect image (a batch is fine, each frame becomes its own asset, named name-1, name-2, …) or fill url. If both are set, url wins silently.

group_id decides where the asset lands. Leave it empty and the node creates an AIGC group for you, using group_name (or an auto-generated one) - that's the right path for AI-generated characters and illustrations. For a real person you have to supply the group id that came out of the liveness-verification flow; there is no auto-create shortcut there.

asset_type (Image, Video, Audio) has to match what the file actually is. image_host picks the throwaway file host - and the tooltip is refreshingly honest about the tradeoff: uguu is stable but its links die within hours, catbox keeps files forever but routinely refuses datacenter IPs. Ark downloads the image within seconds, so the short-lived link is fine in practice - but behind a VPS, catbox is the one that fails.

Outputs are asset_ids (comma-separated when you fed it several frames) and group_id. Wire the first into the video node's asset_ids field - note that's a text input with an optional socket, so either drag the wire over or type the id.

Installing it

It ships in the pack, so install the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Gin3601/comfyui_transit_node.git

Restart, look under CYAI/Asset. No pip dependencies - the multipart upload to the file host is hand-rolled with urllib, which is either elegant or terrifying depending on your day. Manager users: search CYAI Seedance and take the whole pack.

Where people get burned

It blocks the queue while it polls. Not a background job - it calls GetAsset every five seconds while ComfyUI waits, though cancel does interrupt it. Lower poll_interval if throughput beats politeness.

The file host is the fragile link, not Ark. 图床上传未返回 URL or an HTTP 403 from catbox both mean the same thing: the picture never got a public address. Switch image_host, or host the image yourself and use url - a real object-storage link is strictly more reliable than either free host.

A batch turns into multiple assets, and you may not want that. Feed a four-frame batch and you get four assets and one comma string. That's usually what you want for multi-reference work, and occasionally a surprise when you expected one.

These nodes only run when something consumes them. None of the asset nodes are output nodes, and ComfyUI only executes the subgraph that feeds an output node. If you queue a graph where asset_ids goes nowhere, the node simply doesn't run and you'll conclude it's broken. Wire the string into the video node, or into any text-display node, just to give it a destination.

Asset ids are per-account handles. They only resolve on the relay and key that made them, and the real-person ones are tied to a completed liveness check.

CategoryCYAI/Asset

Inputs (14)

NameTypeDefaultDescription
api_keySTRING中转站 API Key(sk-xxx)
base_urlSTRINGhttps://www.cyai.club中转站地址
nameSTRING素材名称(必填)
image_hostCOMBOuguu自动上传用的免费匿名图床:uguu 稳定但链接数小时失效;catbox 永久但机房 IP 常被拒
asset_typeCOMBOImage素材类型,需与真实文件一致
project_nameSTRINGdefault项目名,默认 default
poll_intervalINT51–60轮询间隔(秒)
max_waitINT30030–1800最长等待(秒)
imageoptIMAGE要上传的本地图(接「图像合并」的输出)→ 自动传图床拿 URL
urloptSTRING已有公网 URL 时直接填这里(与 image 二选一,填了优先用 URL)
group_idoptSTRING可选:所属素材组 ID。留空则自动创建 AIGC 组;真人素材填认证结果给的 GroupId
group_nameoptSTRING可选:group_id 留空时,自动创建素材组的名称
upload_max_sideoptINT2048300–6000上传图最长边(素材接口上限 6000px)
upload_qualityoptINT9030–100上传图 JPEG 质量

Outputs (2)

NameTypeDescription
asset_idsSTRING素材 ID(多张则逗号分隔,直接接视频节点的 asset_ids)
group_idSTRING所属素材组 ID(可复用)