Abstract
InstructAny2Pix is a novel image editing framework designed to follow complex, multi-modal instructions that interleave text, multiple reference images, and audio. By employing a multi-modal Large Language Model (LLM) as a "reasoner" to guide a diffusion-based "drawer," the system executes intricate edits—such as adding specific objects from reference images or altering an image's style to match a music track—outperforming existing state-of-the-art baselines in both human and quantitative evaluations.
Introduction
While recent advancements in diffusion models, such as InstructPix2Pix, have revolutionized image editing, most existing systems remain limited to "single-threaded" capabilities. They typically handle simple text-based instructions (e.g., "make it sunny") or a single reference image. The authors of InstructAny2Pix identify three primary gaps in current technology:
- Complexity: Models struggle with instructions involving multiple objects or complex spatial relationships.
- Modality Limitations: There is a lack of support for interleaved inputs, such as using a specific image for a subject and an audio clip for the overall "vibe."
- Instruction Following: Multi-modal models often default to simple "add/remove" tasks rather than nuanced, free-form editing.
Methodology
The InstructAny2Pix architecture utilizes a four-component pipeline to bridge the gap between multi-modal reasoning and high-quality image generation.
- Multi-Modal Encoder: Leveraging ImageBind, the system maps text, images, and audio into a unified latent space.
- Multi-Modal LLM (The Reasoner): A Vicuna-7B model processes interleaved embeddings to generate "control tokens":
[base]for the original image,[sub]for reference subjects, and[gen]for the edited content. - Refinement Module: A transformer-based module "upscales" the semantic intent of the LLM's output. This is vital because raw LLM outputs derived from noisy training data (like YouTube clips) often lack aesthetic quality; the refinement module acts as a semantic denoiser.
- Diffusion Decoder (The Drawer): A repurposed SDXL model takes the refined embeddings and retrieved images to render the final edited result.
The training process involves four stages: pretraining the LLM on "x-to-image" tasks, pretraining the diffusion decoder, training the refinement module, and finally, instruction fine-tuning on a massive new dataset.
Datasets and Benchmarks
To support this research, the authors introduced two significant new benchmarks:
- MM-Inst: A large-scale dataset of 500,000 multi-modal instructions created via an "LLM-in-the-loop" pipeline.
- Dreambooth++: An evolution of the classic Dreambooth benchmark, featuring 30 diverse subjects and 900 tasks designed to test handling of multiple reference images and complex backgrounds.
Key Results
InstructAny2Pix demonstrates superior performance over existing models across several metrics. In human evaluations, it achieved an 86.2% win rate against Kosmos-G and a 79.0% win rate against BLIP-Diffusion. Quantitatively, it reached a $CLIP_{out}$ score of 0.270 on the MM-Inst benchmark, significantly outperforming InstructPix2Pix (0.243) and MagicBrush (0.199).
Notably, the model shows strong zero-shot generalization, remaining competitive on the InstructPix2Pix benchmark even without specific training on that dataset.
Discussion and Limitations
A key insight of this work is the use of the LLM as a controller, allowing the diffusion model to receive "digested" latent representations rather than raw multi-modal inputs. Additionally, the use of audio as a style prompt proved highly efficient for communicating complex "vibes" that are difficult to describe in text.
However, the model has limitations. Due to its training on high-aesthetic datasets like LAION-Aesthetics-3M, it tends toward "artistic" or "painterly" outputs rather than strict photorealism. It also currently focuses on semantic changes (adding/replacing objects) rather than low-level "Photoshop-style" edits like color grading or zooming. Future work will focus on expanding training data diversity and incorporating finer-grained control over image attributes.
Summary updated