Qwen2 - Image Edit
The cheap draft editor, with an 800-character leash
- image_url
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
What it is
One image in, one prompt, edited image out - KIE's older Qwen2 editing endpoint as a ComfyUI node. If you've read anything about local editing in the last year you know the name: Qwen-Image-Edit became the open instruction editor of record, the Apache-2.0 model that took over jobs people used to solve with a mask plus a ControlNet plus a face adapter (docs/knowledge/ecosystems/qwen.md has the whole arc).
This node is the entry-level way to use that capability. Not the flagship - the pack also ships the newer Qwen 2.1 - Image to Image node - but it's the simplest, and for "make this one change and leave the rest alone" it does the job. It's also the one whose failure modes are entirely about prompt length, which is either a nice constraint or a papercut depending on your temperament.
How it works
The node is generated from KIE's request schema for the Qwen2 image-edit endpoint. image_url is a real IMAGE socket, so the pack uploads your picture to KIE's storage and substitutes the returned URL - no hosting dance. The edit is submitted as a task, the node waits (default timeout_seconds 1200), then downloads the result back into the graph as an IMAGE.
There's no mask input and no reference-image list here. It's a one-image, one-instruction editor: semantic edits like "turn this into a watercolour", not pixel surgery.
Inputs and outputs
Required:
- image_url (IMAGE) - the picture to edit.
- prompt (STRING) - what to change. Max 800 characters, which is the tightest limit in this whole pack; the newer Qwen 2.1 node allows 5000. If your prompt is a paragraph of styling notes, you're on the wrong node.
Optional:
- image_size (
16:9by default, plus1:1,2:3,3:2,3:4,4:3,9:16,21:9) - the size of the output. Worth a moment's thought: choosing a ratio that doesn't match your input means the model is re-framing, not editing. - output_format (
pngorjpeg). - seed - same seed, same prompt, same model version, same image. Keep it pinned while you iterate on wording, otherwise you can't tell whether your change did anything.
- nsfw_checker -
falseby default, meaning KIE's filtering is off and results come straight from the model. - timeout_seconds, callback_url.
Outputs: image, url, all_urls_json, task_id, raw_json, credits_consumed, credits_left. Wire image into a save/preview node, or straight into another edit for a second pass.
Install
Manager: search KIE-Nodes-Next, install, restart. Otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
Restart, then set the key once: Settings → KIE.ai Nodes Next → Connection. The key is validated before it's saved and shown as a masked fingerprint, with the current credit balance next to it. Nothing in this pack does anything without it; you'll get a "No KIE API key configured" error before a single request leaves your machine.
Dependencies are just requests, Pillow, numpy and PyYAML. The Windows .vbs installer in dist/ handles the whole thing if you don't want a terminal.
Where people get burned
The 800-character cap is real and silent-ish. Go over and the request is rejected. If you keep trimming and losing detail, jump to the Qwen 2.1 node.
Aspect ratio changes are not edits. If output and input ratios disagree, you're asking for a re-composition alongside whatever you asked for. Match the input ratio when you want a clean edit.
The whole-frame problem is inherent. This family re-emits the entire image, so pixels nobody asked about can shift, and faces drift across a chain of edits (the open-weight story is the same - see kg/entities/qwen-image-edit.json). Do one meaningful change per pass, check it, then continue. Don't stack five edits and hope.
Faces aren't this node's strength. Where Qwen's Edit line holds identity better than almost anything open, small/older endpoints are less reliable at it, and face ID is exactly what people notice first.
A model that worked yesterday can stop working. KIE's catalog changes as providers add and retire endpoints. If a run starts failing for no visible reason, open the KIE • Refresh Model Catalog node once; the pack rebuilds its node library from KIE's live docs.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The prompt to generate the image with (Max length: 800 characters) | |
| image_url | IMAGE | — | |
| image_sizeopt | COMBO | 16:9 | The size of the generated image. Default value: 16:9 |
| output_formatopt | COMBO | png | The format of the generated image. Default value: "png" |
| seedopt | INT | 0-2147483648–2147483647 | The same seed and the same prompt given to the same version of the model will output the same image every time. |
| nsfw_checkeropt | BOOLEAN | false | Defaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements. |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |