Nodes/ComfyUI_Wan/Wan Text-to-Image Generator
ComfyUI Node

Wan Text-to-Image Generator

The ComfyUI_Wan cloud node

By ru4ls·Created 12 months ago·Updated 11 months ago· 3
Wan Text-to-Image Generator
    • image
    • image_url
    modelwan2.2-t2i-flash
    promptGenerate an image of a cat
    size1024*1024
    regioninternational
    negative_prompt
    prompt_extendtrue
    watermarkfalse
    seed0

    Let me save you the surprise: this node doesn't run anything on your machine. WanT2IGenerator ("Wan Text-to-Image Generator") from the ru4ls/ComfyUI_Wan pack is a thin wrapper around Alibaba Cloud's DashScope API - you send it a prompt, their servers generate the image, and the node polls until the result is ready. No VRAM, no model download, no sampler settings. If you've got a laptop with an integrated GPU and you want to play with the newer Wan image models, this is basically your only on-ramp: Wan 2.2 was the last open-weights release, and everything newer (like the wan2.5-t2i-preview this node can pick) is API-only.

    It's also paid. There's no way around that - you're renting Alibaba's compute, and they bill per generation. The README is upfront about it, and the node will happily keep making images until you check your bill.

    How it works

    Under the hood it's an async DashScope job. The node POSTs your prompt to the image-synthesis endpoint with X-DashScope-Async: enable, gets a task_id back, then polls the task status every 5 seconds (up to 30 tries) until the image is ready, downloads it, and hands it to you as a real IMAGE tensor. That last part matters: unlike the video nodes in this pack, this one outputs an actual image you can wire straight into a save node or into whatever comes next in your workflow. You also get a second output, image_url, pointing at the file on Alibaba's servers.

    The inputs that matter

    • model - your pick of the hosted lineup: wan2.5-t2i-preview, wan2.2-t2i-flash (default), wan2.2-t2i-plus, and the wanx2.1/wanx2.0 turbo/plus editions. Flash is fast and fine for drafts; plus is the quality pick.
    • prompt - required, multiline. This is a plain text prompt, no CLIP encoding involved.
    • size - fixed resolution options from 1024*1024 up to 1440*1440. Pick the aspect ratio you need rather than trying to upscale.
    • prompt_extend - on by default, and worth knowing about: it's Alibaba's built-in prompt rewriting. Leave it on for better results, but turn it off if you want your exact wording respected.
    • seed - 0 means random. Set a fixed seed if you want a reproducible look.
    • negative_prompt and watermark - the usual. Watermark adds Wan's logo mark; it defaults off.

    Install

    Via ComfyUI Manager, search for ComfyUI_Wan. Or the manual way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ru4ls/ComfyUI_Wan.git
    pip install -r ComfyUI_Wan/requirements.txt
    

    Restart ComfyUI after that. The dependencies are light - requests, Pillow, numpy, python-dotenv (torch is already there in any ComfyUI install) - because the heavy lifting is happening on Alibaba's side. The real setup step is the API key:

    cd ComfyUI_Wan/config
    cp .env.template .env
    # then edit .env and set DASHSCOPE_API_KEY=your_key
    

    Grab the key from the DashScope console. If you're on a non-default workspace, you may also need to authorize the Wan models in the model management console before anything works.

    Gotchas

    • It's paid, per generation. Budget for it; there are no surprises in the README, but people still hit the bill.
    • A 401 means your key is wrong or unset; a 403 usually means the model isn't authorized for your workspace. The node's error messages spell both out.
    • Videos in this pack download to local files, but images come back as tensors - that's deliberate, so you can keep editing them in the graph.

    If you have a real GPU and want the open-weight Wan 2.2 experience locally, that's a different rabbit hole. This node is for the other 90% of the time: you want a Wan 2.5 image and you don't want to care how.

    CategoryRu4ls/Wan

    Inputs (8)

    NameTypeDefaultDescription
    modelCOMBOwan2.2-t2i-flash4 options: wan2.5-t2i-preview, wan2.2-t2i-flash, wan2.2-t2i-plus, wanx2.1-t2i-turbowanx2.1-t2i-pluswanx2.0-t2i-turbo
    promptSTRINGGenerate an image of a cat
    sizeCOMBO1024*10247 options: 1024*1024, 1152*896, 896*1152, 1280*720, 720*1280, 1440*512, +1
    regionCOMBOinternational2 options: international, mainland_china
    negative_promptoptSTRING
    prompt_extendoptBOOLEANtrue
    watermarkoptBOOLEANfalse
    seedoptINT00–2147483647

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    image_urlSTRING