Abstract
The ability to provide fine-grained control for generating and editing visual imagery has profound implications for computer vision and its applications. Previous works have explored extending controllability in two directions: instruction tuning with text-based prompts and multi-modal conditioning. However, these works make one or more unnatural assumptions on the number and/or type of modality inputs used to express controllability. We propose InstructAny2Pix, a flexible multi-modal instruction-following system that enables users to edit an input image using instructions involving audio, images, and text. InstructAny2Pix consists of three building blocks that facilitate this capability: a multi-modal encoder that encodes different modalities such as images and audio into a unified latent space, a diffusion model that learns to decode representations in this latent space into images, and a multi-modal LLM that can understand instructions involving multiple images and audio pieces and generate a conditional embedding of the desired output, which can be used by the diffusion decoder. Additionally, to facilitate training efficiency and improve generation quality, we include an additional refinement prior module that enhances the visual quality of LLM outputs. These designs are critical to the performance of our system. We demonstrate that our system can perform a series of novel instruction-guided editing tasks.
Introduction
While image editing has advanced rapidly, most current models are limited by their input modalities. Text-guided models often struggle with specific objects that are difficult to describe perfectly, while image-guided models frequently support only a single reference and fail at complex, multi-object instructions. Furthermore, the "creative vibe" of a scene is often hard to put into words but easy to express through music. Before InstructAny2Pix, there was no robust way to use audio as a direct semantic prompt for image editing.
InstructAny2Pix addresses these challenges by introducing a flexible multi-modal instruction-following system. It allows users to edit images using interleaved instructions featuring text, multiple reference images, and audio. This enables intricate requests like adding a specific object from one image to another while simultaneously adopting the stylistic mood of a music track.
Methodology
The InstructAny2Pix framework is built on a three-pillar architecture:
- Multi-Modal Encoder (ImageBind): Acts as the system's sensory input, mapping text, images, and audio into a unified latent space for semantic comparison.
- Multi-Modal LLM (Vicuna-7B): Serves as the reasoning engine. It processes interleaved prompts and generates specialized control tokens (
[base],[sub],[gen]) to guide the background, specific objects, and overall generation. - Diffusion Model (SDXL): The generative component that draws the final result, conditioned on the LLM’s reasoning and retrieved reference embeddings.
A key technical innovation is the Refinement Module. The researchers found that raw LLM embeddings often lead to low-quality images. This transformer-based module "polishes" the LLM's output to better align with the high-fidelity requirements of the diffusion model, bridging the gap between semantic understanding and high-quality visual synthesis.
Benchmarking with MM-Inst and Dreambooth++
To train and evaluate such a complex system, the authors introduced two major benchmarks:
- MM-Inst: A massive dataset of 500,000 multi-modal instructions created through a pipeline where an LLM generated creative instructions, and specialized models (like AudioLDM2 and SDXL) produced the corresponding reference media.
- Dreambooth++: An evolution of the classic Dreambooth dataset, including 30 diverse subjects and 900 tasks specifically designed to test multi-image and multi-object scenarios.
Key Insights: Reasoning and Audio Semantics
A breakthrough of this work is the LLM's ability to reason over different modalities through explicit retrieval. By using tokens like [sub], the LLM can point to specific reference images for different parts of an edit.
Additionally, the paper demonstrates that music carries consistent visual "moods." For example, fast-paced tracks consistently trigger vibrant, high-saturation colors, while somber pieces lead to colder atmospheres. This allows audio to serve as a powerful semantic bridge for creative direction.
Experimental Results and Creative Applications
In human preference studies, InstructAny2Pix was preferred over 70% of the time compared to baselines like InstructPix2Pix and MagicBrush on complex tasks. The model maintains high fidelity even when instructions involve adding or replacing several distinct elements.
The authors showcased several creative applications, most notably "Music-inspired merchandise design." In this task, a product's appearance—such as a T-shirt—is automatically generated or edited based on the semantic profile of a song.
Conclusion
InstructAny2Pix represents a significant step toward truly flexible visual editing. While it excels at object-level and global semantic changes, it currently inherits biases from its base models and leans toward artistic outputs. Future work will explore more granular adjustments, such as precise brightness control and zooming, to further enhance its utility as a professional editing tool.
Summary updated