UniFashion: A Unified Vision-Language Model for Multimodal Fashion Retrieval and Generation

Xiangyu Zhao, Yuehan Zhang, Wenlong Zhang, Xiao-Ming Wu

Abstract

The fashion industry requires a diverse set of multimodal capabilities, ranging from precise cross-modal retrieval to high-fidelity image synthesis and virtual try-ons. Historically, these tasks have been addressed by fragmented, specialized models. We present UniFashion, the first unified vision-language framework designed to handle the full spectrum of fashion-related tasks within a single architecture. By integrating a Large Language Model (LLM) with a Diffusion Model via a shared multimodal encoder, UniFashion achieves state-of-the-art results in retrieval while enabling controllable, high-quality fashion generation. Our findings demonstrate that generative training reinforces retrieval performance, creating a synergistic effect that enhances the model's overall understanding of the fashion domain.

Introduction

The fashion domain is inherently multimodal. Users often interact with fashion platforms through complex queries that combine visual and textual information—for example, searching for a specific dress seen in a photo but with modifications like "make this dress blue and longer." This task, known as Composed Image Retrieval (CIR), requires a deep understanding of both visual features and linguistic nuances.

Until recently, the AI landscape for fashion was divided. Multimodal Large Language Models (MLLMs) demonstrated exceptional reasoning and text generation but lacked the specialized embedding space necessary for precise image retrieval. Conversely, Diffusion Models produced high-quality visuals but struggled to follow the multi-part, fine-grained instructions common in fashion design. UniFashion bridges this gap by creating a unified framework where retrieval and generation capabilities are not just co-located, but mutually reinforcing.

Methodology

Architectural Design

UniFashion utilizes a three-part architecture to unify disparate fashion tasks:

  1. Multimodal Encoder (Q-Former): Based on the BLIP-2 architecture, this module processes images and text to create "learnable queries"—a compressed, high-dimensional multimodal representation.
  2. Large Language Model (Vicuna-1.5): Serving as the system's cognitive core, the LLM processes instructions and generates detailed fashion captions or design descriptions.
  3. Diffusion Module (Stable Diffusion v1.4): This module uses the multimodal queries from the Q-Former as conditioning signals to synthesize new images or perform virtual try-ons.

A critical component of this architecture is the Task Specific Adapter (TSA). The TSA maps the encoder's output into the specific input spaces required by the LLM and the Diffusion model, ensuring that the shared representation is effectively utilized by both the generative and discriminative components.

Training Strategy

The authors employ a two-phase training strategy to align these components:

  • Phase 1: Cross-modal Pre-training: The model learns fundamental alignments between fashion images and descriptions using contrastive and matching losses. This phase establishes the baseline understanding of fashion attributes and styles.
  • Phase 2: Composed Multimodal Fine-tuning: The model is refined on complex tasks like CIR. During this stage, the LLM and Diffusion models are frozen. The multimodal encoder is tuned to fuse reference images and text instructions into a single "synthetic prompt." This prompt is then used simultaneously for retrieving the target garment and generating a visual representation of it.

Datasets and Evaluation

UniFashion was evaluated on several industry-standard benchmarks to test its versatility:

  • FashionGen: Used for evaluating cross-modal retrieval and image captioning (260k image-text pairs).
  • Fashion-IQ: The primary benchmark for Composed Image Retrieval. To enhance training, the authors used LLaVA 1.5 to semi-automatically generate more detailed annotations for this dataset.
  • VITON-HD & MGD: Used to assess virtual try-on and fashion design synthesis capabilities.

Key Insights and Results

Mutual Task Reinforcement

A significant discovery in the development of UniFashion is that generative training improves retrieval performance. By requiring the model to generate a target image from a description, the underlying multimodal embeddings become more robust. This suggests that the "understanding" required to create an object is deeper than the understanding required merely to find it.

Performance Metrics

UniFashion consistently outperformed specialized state-of-the-art (SOTA) models across multiple categories:

  • Retrieval: On FashionGen, the model achieved a 71.44% R@1 for image-to-text retrieval, a significant improvement over the previous SOTA, FAME-ViL (65.94%).
  • Composed Retrieval: On Fashion-IQ, it reached an average R@10 of 58.93%, surpassing existing CIR-specialist models.
  • Generation: In virtual try-on tasks, UniFashion achieved an FID score of 8.42. This nearly matches specialized models like StableVITON (8.23) while offering far greater flexibility for general fashion design and editing tasks.

Instruction-Tuning for Style

Fashion datasets often vary in captioning styles, ranging from brief product titles to professional editorial descriptions. By employing specific instruction templates during LLM tuning, UniFashion can adapt its output "voice" to match the specific requirements of different platforms or user needs.

Conclusion and Future Work

UniFashion represents a significant step toward a universal assistant for the fashion industry. By unifying retrieval and generation, it provides a more cohesive user experience and achieves superior performance through task synergy.

However, the model's complexity presents challenges. The integration of the Q-Former, LLM, and Diffusion modules makes the system resource-intensive, with an inference speed of approximately 3.15 seconds per image on an A100 GPU. Future research will focus on optimizing these processes, perhaps through more efficient sampling methods like DPM-Solver++. Additionally, there is significant potential in leveraging the LLM’s reasoning capabilities to guide more complex, multi-step fashion editing scenarios.

Summary updated

BibTeX
@inproceedings{zhao2024unifashion,
  author = {Xiangyu Zhao and Yuehan Zhang and Wenlong Zhang and Xiao-Ming Wu},
  title = {{UniFashion: A Unified Vision-Language Model for Multimodal Fashion Retrieval and Generation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.89},
}
Figure