Emu 3.5 X2I (Image Edit)
Image editing without a diffusion model, up to 3 reference images
- model
- tokenizer
- vq_model
- reference_image_1
- reference_image_2
- reference_image_3
- image
- text_response
- reasoning
Emu 3.5 X2I is the pack's image-editing node, and it's a genuinely different approach to editing than you're used to from diffusion. Where an img2img workflow denoises a latent toward a prompt, X2I works because Emu is a native multimodal model: your reference image is encoded into visual tokens through the vision tokenizer and dropped into the prompt stream itself, then the model autoregressively generates the edited result, token by token. It's a "the model literally reads the image and redraws it" mechanism rather than a "perturb and denoise" one.
That matters for how you prompt it. This isn't a controlnet setup with weights and strength sliders - the model genuinely understands what's in your reference, so you describe the transformation in plain language: "change the background to a beach sunset", "add sunglasses to the person", "transform this into an oil painting". The pack's own tip: keep instructions detailed, and with multiple images, reference them positionally - "replace the dog in the first image with the cat from the second image".
The inputs that matter
- prompt - the edit instruction. Short prompts get a console warning; be specific.
- reference_image_1 - required
IMAGE. Reference 2 and 3 are optional, and this is the unique trick - multi-image editing lets you move a subject from one photo into another. - image_area - token resolution for encoding references:
256x256(fastest) through1024x1024(high VRAM), default512x512 - Recommended. This is your main OOM lever: each reference image at 1024 consumes ~4,000 tokens of context, and the node warns you when the estimate gets dangerous. - cfg_scale - default 2.0, and the README's advice is real: X2I likes lower guidance than T2I. 2–3 works well; pushing toward 5 tends to fight the reference.
- seed - fixed for reproducibility.
Optional image_top_k / image_temperature control visual-token sampling, and tiled_decode / tile_size decode the output in tiles to save VRAM on big results.
Outputs
- image (
IMAGE) - the edited result. - text_response (
STRING) - any text the model emitted. - reasoning (
STRING) - chain-of-thought when present.
Install
cd ComfyUI/custom_nodes
git clone --recursive https://github.com/EricRollei/Emu35-Comfyui-Nodes.git emu35
cd emu35
pip install -r requirements.txt
Models in ComfyUI/models/emu35/ - use the Emu3.5-Image model (34B) for X2I, plus the vision tokenizer; NF4 quantized weights are the 24GB route.
What to know before you commit
Two things. First, there was a notorious early bug where X2I generated a single token and stopped - the stopping criteria fired on reference-image tokens in the input. V2 fixed it by making the stopping criteria ignore input tokens, so if you ever see a one-pixel "output", you're on old code; update the pack. Second, VRAM is the real ceiling: 2+ reference images at 1024x1024 will OOM a 24GB card even with NF4. The working pattern there is smaller image_area, tiled_decode on, and the same ComfyUI --lowvram / --reserved-vram tuning people use for T2I. And pace yourself - a single X2I edit runs about 13 minutes on the hardware the pack was tested on.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | EMU_MODEL | — | |
| tokenizer | EMU_TOKENIZER | — | |
| vq_model | EMU_VQ | — | |
| prompt | STRING | Transform this image into a watercolor painting style | — |
| reference_image_1 | IMAGE | — | |
| image_area | COMBO | 512x512 (262144) - Recommended | 6 options: 256x256 (65536) - Fastest, 384x384 (147456), 512x512 (262144) - Recommended, 640x640 (409600), 768x768 (589824), 1024x1024 (1048576) - High VRAM |
| cfg_scale | FLOAT | 2.01–20 | — |
| seed | INT | 00–18446744073709550000 | — |
| reference_image_2opt | IMAGE | — | |
| reference_image_3opt | IMAGE | — | |
| image_top_kopt | INT | 5120100–131072 | — |
| image_temperatureopt | FLOAT | 1.00.1–2 | — |
| tiled_decodeopt | BOOLEAN | false | — |
| tile_sizeopt | INT | 3216–64 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| text_response | STRING | — |
| reasoning | STRING | — |