ModelScope Universal API
The ModelScope API node
- image_1
- image_2
- image_3
- IMAGE
The pitch is simple: drop a picture in, type "give the dog in the picture a birthday hat," and get the edited picture back - with FLUX.1-Kontext-Dev or the full FLUX.2-dev model running on Alibaba's servers, not your GPU. No 12B Kontext weights, no 32B FLUX.2 download, no 18–24GB VRAM invoice. The ModelScope Universal API node is a thin wrapper around ModelScope's hosted inference, and it's genuinely useful if you run ComfyUI on a laptop or a mid-range card that would choke on FLUX.2 locally.
The "Kontext" in the pack name is a history lesson: this started as a wrapper for BFL's instruction-editing model, then the author bolted on FLUX.2 support. The node itself is one class with a dropdown, hence "universal."
How it works
Read the source and it's three steps, all over HTTP. First it takes your input image tensor, converts it to a PNG, and uploads it to freeimage.host to get a public URL - because the ModelScope API needs to fetch the reference image from somewhere. Then it POSTs an async task to api-inference.modelscope.cn/v1/images/generations with your api_key in the header, and finally it polls /v1/tasks/<id> every 5 seconds until the task is SUCCEED, downloads the output image, and hands it back as a tensor.
Dependencies are almost insultingly light: requests and Pillow, nothing else. No torch install, no model files, no models folder. That's the whole appeal - the heavy lifting happens in the cloud.
The inputs that matter
You only need to touch a handful of fields:
model- dropdown betweenblack-forest-labs/FLUX.2-dev(default) andMusePublic/FLUX.1-Kontext-Dev.image_1- the input image. Optionalimage_2andimage_3exist for FLUX.2's multi-reference editing.api_key- your ModelScope key from modelscope.cn/my/myaccesstoken. The default is a placeholder and will not work.prompt- the edit instruction, as a sentence.
The rest are Kontext-era leftovers: width, height, seed, steps, and guidance only get sent when you pick Kontext (single-image, respects all of them). Select FLUX.2-dev and the code silently ignores every one of them - that's not a bug, FLUX.2 on this API just doesn't take them. Kontext also only uses image_1; extra images are ignored.
The single IMAGE output wires straight into PreviewImage or SaveImage.
Install
ComfyUI Manager will find it by searching "ModelScope"; otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/Onionman61/ComfyUI-ModelScope-Kontext
Then restart ComfyUI. One trap: the README's own clone command says ComfyUI-ModelScope.git - a stale copy-paste from the author's earlier repo, and it clones the wrong thing. Use the URL above.
Where people get burned
- Privacy, real talk. Every input image is uploaded to freeimage.host - a public third-party image host - using a shared API key hardcoded into the node. Whatever you feed this node goes up on a public URL, and the same key is used by everyone running it. Don't feed it anything you wouldn't post online. If that shared key ever gets rate-limited or rotated, you'll get an "Image hosting service connection error" and the node dies before reaching ModelScope.
- It's slow and looks frozen. Async polling every 5 seconds means a long FLUX.2 job can sit there for a minute-plus with no progress bar. Be patient.
- FLUX.2 ignores the sliders. If you're cranking
seedandstepsand seeing nothing change, that's the expected behavior. - Censorship. Kontext and FLUX.2 are both heavily safety-filtered, and Kontext's license makes NSFW LoRAs a violation. If that matters to you, Qwen-Image-Edit (Apache 2.0, uncensored) is the local rival everyone actually switched to.
It's not a miracle node - it's a convenience node. But for trying FLUX.2's multi-image editing without a 24GB card, it's about the cheapest on-ramp you'll find.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | black-forest-labs/FLUX.2-dev | 2 options: black-forest-labs/FLUX.2-dev, MusePublic/FLUX.1-Kontext-Dev |
| image_1 | IMAGE | — | |
| api_key | STRING | your_modelscope_api_key | — |
| prompt | STRING | Give the dog in the picture a birthday hat | — |
| width | INT | 102464–2048 | — |
| height | INT | 102464–2048 | — |
| seed | INT | 00–2147483647 | — |
| steps | INT | 301–100 | — |
| guidance | FLOAT | 3.51.5–20 | — |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |