Nodes/AI-HIVE 图片与视频生成/AI-HIVE 图片生成与编辑
ComfyUI Node

AI-HIVE 图片生成与编辑

Nano Banana Pro, GPT Image 2 and Seedream in One ComfyUI Node — for a Fee

By wubin1836·Created 2 months ago·Updated 2 months ago· 1
AI-HIVE 图片生成与编辑
  • reference_image
  • images
  • task_id
  • task_json
◄prompt高级商业视觉,主体准确,光线自然►
◄model▾►
◄routing_mode▾►
◄batch_size1►
◄model_params_json{}►
◄wait_for_resulttrue►
◄timeout_seconds600►

You can't run Nano Banana Pro, GPT Image 2, or Seedream on your own GPU. There are no weights to download - these are closed, API-only models, and the only door into them is a paid call to someone's server. AI-HIVE 图片生成与编辑 (class AIHiveGenerateImage) is that door inside ComfyUI: part of the wubin1836/comfyui-ai-hive pack, it wraps the AI-HIVE API at ai-hive.iclip.cn and hands you four closed image models through one ordinary-looking node.

It's the same move the official ComfyUI Partner Nodes make, just third-party: your prompt (and any reference image) leave the machine, a server generates the picture, and the node downloads it back as a normal IMAGE tensor. Downstream everything behaves like you generated locally - wire images into Preview Image or Save Image and you're done. The name is a small lie in the best sense: it doesn't "generate" anything locally, it calls an API, and what it needs is a key, not a checkpoint.

Before you run it: the key and the cost

The pack never writes your key into a workflow JSON. Set it before launching ComfyUI:

export AI_HIVE_API_KEY="sk-api-你的密钥"

or drop {"apiKey": "sk-api-你的密钥"} in ~/.ai-hive/config.json. You create the key after logging in at AI-HIVE. Missing key? The node errors immediately with a message telling you exactly that.

And internalize this before you queue anything: these are metered calls. Nano Banana Pro alone runs roughly $0.039–0.24 per image depending on resolution, and batch_size multiplies that by up to 4. The node even sends a pricingSnapshot with every submission, so you're charged the price you saw rather than one that moved after the fact. Check model, routing, and batch before you hit run - video may be the expensive story in this pack, but image batches add up fast too.

The inputs that matter

  • model - the pick: public_model_nano_banana_pro (Google's flagship, 4K native, strong text rendering, "thinking mode"), public_model_gpt_image_2 (best at keep-the-label editing jobs), public_model_seedream_5_0_lite (ByteDance's budget image line), public_model_nano_banana_2 (Google's speed/quality hybrid).
  • prompt - plain text, multiline.
  • reference_image (optional IMAGE socket) - wire a Load Image here for img2img, re-backgrounding, or character consistency. This is the editing half of the node.
  • routing_mode - COST_FIRST, SPEED_FIRST, or SUCCESS_FIRST: how AI-HIVE picks among backends behind a given public model.
  • batch_size - 1 to 4 images per call. Each is billed.
  • model_params_json - a JSON object passed straight through to the model, e.g. {"aspect_ratio":"9:16"}. The escape hatch for model-specific knobs.
  • wait_for_result - on by default; the node polls roughly every 3 seconds until done or until timeout_seconds (30–1200, default 600) runs out. Turn it off and you get SUBMITTED back instantly plus a task_id to check later.

Outputs

images (the IMAGE tensor - plug it anywhere), task_id, and task_json (the full server response, handy for debugging or logging).

Installing

ComfyUI Manager: search AI-HIVE in Custom Nodes, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/wubin1836/comfyui-ai-hive.git
pip install -r comfyui-ai-hive/requirements.txt

Dependencies are just requests and Pillow - no model files, no VRAM, nothing heavy. Restart ComfyUI after.

Where people get burned

  • The timeout isn't a failure. If wait_for_result polling hits the limit it raises, but the job keeps running on AI-HIVE's servers - and you've been billed. Don't resubmit. Keep the task_id and pull it later with the AI-HIVE 查询任务 (AIHiveGetTask) node.
  • Your data leaves the machine. Prompts and reference images go to a third-party server with its own moderation and logging. If that's a dealbreaker, this whole category isn't for you - which is exactly why the local community treats API nodes as the right tool for models you can't run and the wrong default for ones you can.
  • It's a fresh, unvetted pack. v0.1.x, zero community footprint so far. The source is small and clean (a thin HTTP client - I read it), but the rule for any API wrapper stands: read what a new one does before you paste in a key.

That's the category in a nutshell: closed-model quality, metered price, key required, nothing runs locally. If the trade sounds right, this is the cleanest way to spend on Nano Banana Pro from a ComfyUI canvas. And if you're doing product work, the sibling AI-HIVE 电商图片 node layers platform-specific prompt guidance on top of this exact node.

CategoryAI-HIVE/Image

Inputs (8)

NameTypeDefaultDescription
promptSTRING高级商业视觉,主体准确,光线自然—
modelCOMBO4 options: public_model_nano_banana_pro, public_model_gpt_image_2, public_model_seedream_5_0_lite, public_model_nano_banana_2
routing_modeCOMBO3 options: COST_FIRST, SPEED_FIRST, SUCCESS_FIRST
batch_sizeINT11–4—
model_params_jsonSTRING{}—
wait_for_resultBOOLEANtrue—
timeout_secondsINT60030–1200—
reference_imageoptIMAGE—

Outputs (3)

NameTypeDescription
imagesIMAGE—
task_idSTRING—
task_jsonSTRING—