Nodes/ComfyUI-nkxx/Wujiai 通用生图提交 (异步)
ComfyUI Node

Wujiai 通用生图提交 (异步)

Fire N images at any model and free the queue

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
Wujiai 通用生图提交 (异步)
  • images
  • report
model_namegemini-3.1-flash-image-preview
promptA cyberpunk cat
aspect_ratio1:1
image_size默认
sequential_modedisabled
max_images15
n1
concurrency1
api_key

The sync universal generator is great until you want ten images at 4K from a slow model - then your whole graph sits there for minutes. This is the same multi-model node in fire-and-forget form: it submits jobs into the Wujiai task manager in the background and returns immediately, leaving the actual generation to worker threads. You pair it with UniversalAsyncQueryWujiai, which comes back later to collect the images.

Inputs mirror the sync version:

  • model_name - any Wujiai image model, default gemini-3.1-flash-image-preview.
  • prompt - multiline.
  • aspect_ratio - the 9-option list (1:1 / 16:9 / 9:16 / 3:4 / 4:3 / 2:3 / 3:2 / auto / 21:9).
  • image_size - 默认 / 1K / 2K / 3K / 4K.
  • sequential_mode - disabled / auto (组图模式, the multi-image group mode).
  • max_images - 1–15 reference images.
  • n - 1–10 images per call.
  • concurrency - 1–10, how many parallel jobs this submit spawns.
  • images - optional reference batch.
  • api_key - optional, pack-wide fallback.

Output: report - a status string with your task number, how many subtasks went out, and the credit balance. The actual job records live in the pack's local task database under data/, same as every other async node in this pack, so they survive restarts.

Mechanically, it takes your concurrency count, duplicates the prompt into that many background jobs (each with a tiny invisible variation so the API treats them as distinct), and spawns a daemon thread per subtask. Those threads post to the Wujiai gateway, poll, and cache the finished images locally so the query node can serve them without re-downloading. This is a genuinely decent design: the download happens in the worker, and the query step just hands you what's already cached.

Install is pack-wide:

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

Restart and let the auto-installer grab requests, pandas, openpyxl, yt-dlp, opencv-python, aiohttp. You need a Wujiai account (wujiai.org) and its API key.

Grounded gotchas:

  • Submitting costs credits immediately; querying doesn't. The async split saves your queue, not your money - every spawned subtask is a real API call.
  • Because of forced re-execution, every queue of this node submits another batch. Auto Queue plus this node is the fastest way to zero out an account, and while the pack's circuit breaker guards the Grsai banana path, the same discipline applies here: don't leave it in a looping graph.
  • Background workers mean failures can happen after the submit node has already returned - the per-subtask errors surface in the query node's report, not here. Check there before re-submitting.
  • If you never run the query node, the images just sit in the local cache eating disk. Clean up by running query-and-download to completion.
CategoryNkxx/Wujiai/Universal

Inputs (10)

NameTypeDefaultDescription
model_nameSTRINGgemini-3.1-flash-image-preview
promptSTRINGA cyberpunk cat
aspect_ratioCOMBO1:19 options: 1:1, 16:9, 9:16, 3:4, 4:3, 2:3, +3
image_sizeCOMBO默认5 options: 默认, 1K, 2K, 3K, 4K
sequential_modeCOMBOdisabled组图模式
max_imagesINT151–15
nINT11–10
concurrencyINT11–10
imagesoptIMAGE
api_keyoptSTRING

Outputs (1)

NameTypeDescription
reportSTRING