Wan Image-to-Image Generator
Reference a second image, not just a prompt
- image
- image_url
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*1024to1440*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.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | wan2.5-i2i-preview | 1 options: wan2.5-i2i-preview |
| image_url_1 | STRING | https://example.com/your_image1.png | — |
| prompt | STRING | Edit the image with the desired changes | — |
| region | COMBO | international | 2 options: international, mainland_china |
| image_url_2opt | STRING | — | |
| negative_promptopt | STRING | — | |
| sizeopt | COMBO | 1024*1024 | 9 options: 1024*1024, 1152*896, 896*1152, 1280*720, 720*1280, 1440*512, +3 |
| watermarkopt | BOOLEAN | false | — |
| seedopt | INT | 00–2147483647 | — |
| num_imagesopt | INT | 11–4 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_url | STRING | — |