Nodes/ComfyUI_Lam/Qwen-Image 生图节点
ComfyUI Node

Qwen-Image 生图节点

Alibaba's Qwen-Image, but through the cloud, not your GPU

By yanlang0123·Created 2 years ago·Updated 18 days ago· 76
Qwen-Image 生图节点
    • image
    promptA beautiful landscape
    api_token
    modelQwen/Qwen-Image
    negative_prompt
    width512
    height512
    seed-1
    steps30
    guidance7.5

    QwenImageNode ("Qwen-Image 生图节点") generates images with Alibaba's Qwen-Image - and here's the thing nobody tells you from the display name: it doesn't run on your machine. This is a cloud call to ModelScope's inference API. You give it a token, it ships your prompt to Alibaba's servers, Qwen-Image renders there, and the node downloads the result back into your graph as an IMAGE tensor. No 20B model in your VRAM, no GGUF to find, no weights at all. If that sounds like a disappointment, it's also the whole appeal: it's the only way most people will ever actually run Qwen-Image locally-in-ComfyUI, because the 20B model is a monster.

    The model itself is worth knowing about even if you never touch it directly. Qwen-Image is Alibaba's Apache 2.0 flagship image family - a 20B multimodal diffusion transformer, notable for genuinely strong text rendering in images and a license that doesn't police content the way BFL's Flux Kontext terms do. The Edit line became the community's default open instruction editor. This node gives you the base generator (not Edit) through the API.

    How it works

    It POSTs your prompt to https://api-inference.modelscope.cn/v1/images/generations with your token as a Bearer key. Generation runs async: it submits a task, then polls the task endpoint every few seconds until the image is done, then downloads it, converts to a tensor, and hands you a normal IMAGE output. The token is saved to the pack's config (.qwen_token) so you only paste it once.

    A grounded quirk: if the API call fails, the node doesn't throw - it returns a solid red image at your requested resolution. That's deliberate (so a failure doesn't hard-crash your workflow), but it means "why is everything red" is your error message. Check the console logs.

    The inputs and outputs

    • prompt (multiline) - what you want, in natural language. English works best, but Qwen handles Chinese well.
    • api_token - your ModelScope API token. Required.
    • Optional: model (default Qwen/Qwen-Image), negative_prompt, width/height (64–2048, step 64), seed (-1 = random), steps (1–100, default 30), guidance (1.5–20, default 7.5).
    • Output: image (IMAGE).

    Installing it

    From ComfyUI_Lam: Manager → "ComfyUI_Lam", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yanlang0123/ComfyUI_Lam
    

    Restart, QwenImage category. Requirements: requests and the PIL/numpy stack you already have. The real setup is a ModelScope account and API token - that's outside ComfyUI entirely. Ignore the pack's heavy README install (face-fusion rars, TensorFlow pins); a cloud node needs none of it.

    Common issues

    Cloud-call problems, mostly: an invalid token (401), rate limits, and the timeout - the node polls up to ~12 minutes, and a long queue on a busy model can exceed that. Model availability on the API lags the open weights occasionally, so if Qwen/Qwen-Image 404s, check ModelScope's current model list. And remember you're paying per image (or burning a quota), which is why this node is a complement to local generation, not a replacement. Also note the guidance default of 7.5 is SD-style; Qwen-Image's own recommendations run lower, so don't be afraid to dial it down and see what your prompt wants.

    Pack reality: Chinese-first pack, minimal community footprint. And on uninstall, delete ComfyUI/web/extensions/lam - the frontend extension leaves a popup behind.

    CategoryQwenImage

    Inputs (9)

    NameTypeDefaultDescription
    promptSTRINGA beautiful landscape
    api_tokenSTRING
    modeloptSTRINGQwen/Qwen-Image
    negative_promptoptSTRING
    widthoptINT51264–2048
    heightoptINT51264–2048
    seedoptINT-1-1–2147483647
    stepsoptINT301–100
    guidanceoptFLOAT7.51.5–20

    Outputs (1)

    NameTypeDescription
    imageIMAGE