Nodes/ComfyUI API Image Edit/API Image Edit (Enhanced)
ComfyUI Node

API Image Edit (Enhanced)

Qwen-Image-Edit, without the 20B model in your case

By aiaiaikkk·Created about a year ago·Updated 12 months ago· 13
API Image Edit (Enhanced)
  • image1
  • image2
  • image3
  • image4
  • edited_image
  • response_text
api_providerModelScope
api_key
modelQwen/Qwen-Image-Edit
promptGenerate or edit images based on the provided inputs
generation_modesingle
image_count1
seed-1
chat_history
edit_history
reset_chatfalse
backup_api_url
custom_model

APIImageEditNode (listed as "API Image Edit (Enhanced)") is a remote-image-editing client wearing a ComfyUI costume. You hand it an image, a plain-language instruction, and an API key; it sends all three to a cloud image-editing provider - ModelScope's hosted Qwen-Image-Edit by default, but also OpenRouter, OpenAI, Google Gemini, PixelWords, or any OpenAI-compatible endpoint - and hands the edited image back into your graph. Nothing is generated on your machine. No weights, no sampler, no VRAM. For a 20B model like Qwen-Image-Edit, that is the entire pitch.

Qwen-Image-Edit is where the "describe the change in a sentence" era of editing lives: change her dress to blue, remove the watermark. It displaced masks and adapters for a whole class of work. But 20B at bf16 doesn't fit a consumer card, and while the community runs it locally via GGUF, that's still a real setup commitment. This node is the zero-install path: the same sentence-level editing, someone else's GPUs. It's also a decent way to A/B a handful of providers from one graph. Don't reach for it if you already run a local Qwen-Edit GGUF - local is cheaper at volume, and it keeps your images on your box. A key here goes to a third party, and your image leaves with it; that's the trade you're signing.

How it works

Under the hood it's an HTTP client, not a diffusion pipeline. The image tensor becomes a PIL image, gets base64-encoded, and is POSTed to the provider's endpoint: DashScope's multimodal-generation API for ModelScope, an OpenAI-compatible /chat/completions for OpenRouter/OpenAI/PixelWords/Custom, and generateContent for Gemini. The returned base64 image is decoded back into a tensor. One thing to know before you judge it by its output: Qwen-Edit re-emits the whole frame, so pixels you never asked about drift - that's a property of the model, not this node, and it's the same behavior you'd get running it locally.

The inputs that matter

  • api_provider + model - the model dropdown has 82 entries grouped under --- Provider --- separator rows. Pick a model inside the provider you selected; the backend validates this and refuses mismatches.
  • api_key - paste the real thing. The frontend saves keys in localStorage, and there's a check that catches you pasting a masked ●●● key.
  • prompt - the multiline instruction. This does the actual editing.
  • image1image4 - up to four input images. For Qwen-Edit that's the multi-image mode (person+product, person+scene compositing).
  • generation_mode - single (default), multiple (batch image_count, 1–16), chat (multi-turn, with reset_chat and a session kept inside the node), or edit_history.
  • seed - -1 means random.
  • backup_api_url - a custom base URL. Required for the Custom provider, and useful for pointing any provider at a proxy.
  • custom_model - the model name when you pick Custom.

The two outputs are edited_image (IMAGE - wire it to a Save/Preview) and response_text (STRING - a status log with the seed and the actual prompt sent, handy when things go sideways).

Installing it

Same as any node: ComfyUI Manager, search "ComfyUI API Image Edit", install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/aiaiaikkk/comfyui-api-image-edit

Then restart ComfyUI. There are no model downloads - that's the point of an API node. Dependencies are light: requests, Pillow, numpy, torch (already present in ComfyUI), plus google-genai for the Gemini path.

Where people get burned

  • Black 512×512 image out - a missing key or a failed call. The node doesn't crash; it returns an error string in response_text. Read that first.
  • Model mismatch - the dropdown mixes providers in one list. A model under the wrong provider returns an error, not a picture.
  • Gemini single mode is the least-tested path - the source references a steps variable the node never defines on that route. If it blows up, it's the node, not you; use the REST fallback or another provider.
  • ModelScope content-filtering - the source notes the API filters prompts and auto-retries 422s with simplified parameters. Keep instructions plain.
  • The README is stale. It's written in Chinese and describes an older version with mask, strength, and steps inputs - the shipped "Enhanced" node doesn't have those. Trust the widgets you actually see, not the README.

One honest caveat: this pack is tiny and unknown - zero community presence, single author, single node file. Custom nodes are arbitrary Python running on your machine, so give the source a glance before pasting a paid key into it.

CategoryAPI/Image Edit

Inputs (16)

NameTypeDefaultDescription
api_providerCOMBOModelScope6 options: ModelScope, OpenRouter, OpenAI, Google Gemini, PixelWords, Custom
api_keySTRING
modelCOMBOQwen/Qwen-Image-Edit82 options: --- ModelScope ---, Qwen/Qwen-Image-Edit, MusePublic/Qwen-Image-Edit, Qwen/Qwen-Image, iic/Qwen-Image-Edit, qwen-image-edit, +76
promptSTRINGGenerate or edit images based on the provided inputs
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
generation_modeoptCOMBOsingle4 options: single, multiple, chat, edit_history
image_countoptINT11–16
seedoptINT-1-1–2147483647
chat_historyoptSTRING
edit_historyoptSTRING
reset_chatoptBOOLEANfalse
backup_api_urloptSTRING
custom_modeloptSTRING

Outputs (2)

NameTypeDescription
edited_imageIMAGE
response_textSTRING