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

Wan Image-to-Image Generator

Reference a second image, not just a prompt

By ru4ls·Created 12 months ago·Updated 11 months ago· 3
Wan Image-to-Image Generator
    • image
    • image_url
    modelwan2.5-i2i-preview
    image_url_1https://example.com/your_image1.png
    promptEdit the image with the desired changes
    regioninternational
    image_url_2
    negative_prompt
    size1024*1024
    watermarkfalse
    seed0
    num_images1

    Most image-editing nodes let you describe a change and hope the model gets it. WanI2IGenerator ("Wan Image-to-Image Generator") from the ru4ls/ComfyUI_Wan pack does the more interesting thing: it takes a second image as reference, so you can say "make image 1 wear image 2's outfit" and the Wan 2.5 model has something concrete to copy from. That multi-reference trick is the reason this node exists.

    It's a cloud node, part of the same DashScope-API family as the rest of this pack - the actual generation runs on Alibaba's servers, you pay per image, and your machine just submits the job and downloads the result. There's no wan2.5-i2i-preview open-weight model you can run locally (Wan stopped shipping weights after 2.2), so if you want this specific editing model, the API is the only door.

    How it works

    You give it URLs - image_url_1 (required) and image_url_2 (optional) - and a prompt describing the edit. The node submits both images to the DashScope image-to-image endpoint, polls the async task until it finishes (every 5 seconds, up to 30 tries), downloads the result, and hands it back as a real IMAGE tensor plus the remote image_url.

    The README's example prompt is telling: "Image_url_1 wearing Image_url_2". That's the mental model - one image is the canvas, the second is the thing to transplant. Outfit swaps, lighting from a reference shot, "change the subject to match this character" - all classic two-image edits.

    Inputs worth knowing

    • image_url_1 / image_url_2 - must be publicly accessible URLs. Alibaba's servers fetch them, so your local files don't count; host them somewhere reachable first. This is the #1 failure point, and it's shared by every image-input node in this pack.
    • prompt - required, multiline, and it does the heavy lifting of describing what to change.
    • num_images - 1 to 4, how many variants to generate in one run. Free diversity without re-submitting.
    • size - nine fixed options from 1024*1024 to 1440*1440.
    • negative_prompt, watermark, seed - standard. Seed 0 is random.

    One thing to note: the model list is just wan2.5-i2i-preview - a single, "Preview Edition" offering, no flash/plus variants like the T2I node has. The node is newer than the rest of the pack (it landed in v1.3.0), so treat it as the new kid rather than the mature default.

    Install

    ComfyUI Manager, search ComfyUI_Wan, or:

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

    Restart, then set DASHSCOPE_API_KEY in config/.env (copy it from .env.template). Requirements are light - requests, Pillow, numpy, python-dotenv - since the compute is remote. And yes, it's paid per generation; the README says so flat out.

    Outputs

    Two outputs: image (the tensor, ready to wire into any image node or saver) and image_url (the remote copy). Since the tensor is the easy one, most workflows just use that and never look at the URL.

    The one caution: because the input is a URL, editing an image you just generated inside the same workflow is awkward - you'd have to host it first. For quick "generate then tweak" loops, the text-to-image node plus a local edit might flow better. This node shines when your source material already lives on the web.

    CategoryRu4ls/Wan

    Inputs (10)

    NameTypeDefaultDescription
    modelCOMBOwan2.5-i2i-preview1 options: wan2.5-i2i-preview
    image_url_1STRINGhttps://example.com/your_image1.png
    promptSTRINGEdit the image with the desired changes
    regionCOMBOinternational2 options: international, mainland_china
    image_url_2optSTRING
    negative_promptoptSTRING
    sizeoptCOMBO1024*10249 options: 1024*1024, 1152*896, 896*1152, 1280*720, 720*1280, 1440*512, +3
    watermarkoptBOOLEANfalse
    seedoptINT00–2147483647
    num_imagesoptINT11–4

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    image_urlSTRING