ModelScope Image Generator
No GPU? No problem — generate Qwen images from the cloud inside ComfyUI
- image
The name says "image generator" and it is one - it's just that nothing is generated on your machine. ModelScope Image Generator is a thin client for Alibaba's ModelScope hosted inference: you hand it a prompt, it ships the job to the cloud, and a finished IMAGE tensor comes back ready to feed your workflow. No weights to download, no VRAM to budget, no GPU at all. If that sounds like cheating, think of it as renting a 20B model by the image instead of buying it.
Why would you reach for it? Maybe your card can't run the newest Qwen image models locally, or you want a second generator to A/B against your local stack without changing hardware. It's also handy for the exact opposite situation: a beefy machine where you still don't want to babysit a ten-minute generation. The catch is the same one that applies to any hosted API - your prompts go to Alibaba's servers, and the output is billed. If you need everything to stay local, run Qwen-Image yourself; this node is the "I just want the picture" path.
How it actually works
The node POSTs to https://api-inference.modelscope.cn/v1/images/generations in async mode (the X-ModelScope-Async-Mode: true header), which returns a task_id instead of an image. Then it polls the task status endpoint every five seconds for up to ten minutes, and when the task reports SUCCEED it downloads the first output image and converts it to a ComfyUI IMAGE tensor via Pillow and numpy. What this means in practice: the node blocks until the cloud is done, so a busy queue can stall your whole graph for a while. That's the price of not owning the hardware.
The inputs that matter
- prompt (required) - the actual prompt. That's the whole job.
- model_id (required) - defaults to
Qwen/Qwen-Image-Edit. This is where people trip: Qwen-Image-Edit is an instruction/editing model, an odd default for a text-to-image node. If you want fresh images from scratch, swap it to a plain text-to-image model likeQwen/Qwen-Image. Any ModelScope model ID served for image generation works. - negative_prompt, steps (default 30), guidance (default 3.5), seed - all optional, all the familiar knobs. Guidance of 3.5 is low for adherence; bump it if your prompts feel ignored.
- width / height - default 1024×1024, 64–2048 in steps of 8.
- loras - a JSON string like
{"lora_id": 0.6}for models that accept LoRA parameters on the API, or just a plain ID. - api_key - leave empty if
MODELSCOPE_API_KEY(orMODELSCOPE_ACCESS_TOKEN) is set in your environment.
Output is a single image (IMAGE), so it plugs straight into SaveImage or anything else that eats an IMAGE.
Install
The easy way is ComfyUI Manager - search "ComfyUI-ModelScope". Or clone it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/neverbiasu/ComfyUI-ModelScope.git
Then restart ComfyUI. Here's the pleasant surprise: the README tells you to pip install -r requirements.txt, but that file is empty - the pack has zero Python dependencies of its own. It leans on requests, Pillow, numpy and torch, all of which ship with ComfyUI anyway. No heavy installs, no conflicts.
You will need a ModelScope account and API key from modelscope.cn. Set it once:
export MODELSCOPE_API_KEY="your-key-here"
Common issues
- "API key missing" - either set the env var above or paste the key into the
api_keyfield. - Task FAILED with a message - the node surfaces the API's error text; most often the model ID isn't available for inference, or the model is an editor that the endpoint won't run bare.
- "Timed out after polling" - ten minutes elapsed with the task never finishing. Switch to a smaller/faster model, or check the model's page on ModelScope for whether it's actually live.
- "No task_id returned" - you've pointed it at a model that isn't a generation model. Swap
model_id.
Is it worth it? If you've got a capable local setup, probably not your daily driver - the whole point of local generation is control, and you give some up here. But as a zero-cost-of-entry way to run Qwen image models you can't fit locally, or to slot a cloud generator into a graph without changing a single wire, it's genuinely useful.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model_id | STRING | Qwen/Qwen-Image-Edit | ModelScope model ID for image generation. |
| prompt | STRING | Text prompt for image generation. | |
| negative_promptopt | STRING | Negative prompt to avoid unwanted elements. | |
| stepsopt | INT | 301–100 | Number of denoising steps (higher = better quality, slower). |
| guidanceopt | FLOAT | 3.51–20 | How closely to follow the prompt (higher = more adherent). |
| seedopt | INT | 12340–18446744073709550000 | Random seed for reproducibility. |
| heightopt | INT | 102464–2048 | Generated image height in pixels. |
| widthopt | INT | 102464–2048 | Generated image width in pixels. |
| lorasopt | STRING | LoRA model configuration. | |
| api_keyopt | STRING | ModelScope API key. If empty, reads from MODELSCOPE_API_KEY env var. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Generated image as ComfyUI IMAGE tensor. |