UNO: A Multi-Subject Conditional Image Generation Model by ByteDance 53

小编 ·

UNO: A Multi-Subject Conditional Image Generation Model by ByteDance

UNO is a multi-subject conditional image generation model developed by the ByteDance research team. It leverages the in-context generation capability of diffusion transformers to produce highly consistent multi-subject paired data.

UNO: A Multi-Subject Conditional Image Generation Model by ByteDance

What is UNO?

UNO is a multi-subject conditional image generation model developed by the ByteDance research team. It leverages the in-context generation capability of diffusion transformers to produce highly consistent multi-subject paired data.

Core Features of UNO

  • Multi-image conditional generation: Supports image generation driven by a single subject or multiple subjects, and is able to generate new images based on one or more reference images.

  • Progressive cross-modal alignment: Improves generation consistency by gradually aligning different modalities (such as text and images) and is carried out in two stages. The first stage uses single-subject in-context generated data to fine-tune a pretrained text-to-image model, turning it into a subject-to-image model; the second stage continues training on the generated multi-subject data pairs.

  • Universal Rotary Position Embedding: Supports image generation at various resolutions and aspect ratios, and effectively mitigates attribute entanglement that occurs when extending visual subject control.

UNO核心特点.webp

Key Mechanisms of UNO:

  • Progressive Cross-Modal Alignment: Divided into two stages. The first stage uses single-subject in-context generated data to fine-tune a pretrained text-to-image model, turning it into a subject-to-image model; the second stage continues training on the generated multi-subject data pairs.

  • Universal Rotary Position Embedding (UnoPE): Effectively mitigates attribute entanglement that occurs when extending visual subject control, and supports image generation at various resolutions and aspect ratios.

How UNO Works

UNO leverages the in-context generation capability of diffusion transformers to produce highly consistent multi-subject paired data. It is iteratively trained from a text-to-image model. Through its unique mechanisms of progressive cross-modal alignment and universal rotary position embedding, it achieves both high consistency and controllability in both single-subject and multi-subject driven generation.

UNO工作原理.jpg

Application Scenarios of UNO

  • Single-subject generation: Generates images based on a single reference image—for example, generating an image of a clock on a beach from a picture of a clock.

  • Multi-subject generation: Generates images based on multiple reference images—for example, using a picture of a doll and a picture of a crystal ball as references to generate an image of the doll inside the crystal ball.

  • In-context generation: Generates highly consistent images through contextual prompts—for instance, given a prompt like "a clock on a beach with a red sun umbrella," combined with a reference image of the clock, it generates an image matching the description.

How to Use UNO

Environment Setup:

  • Create a virtual environment and install dependencies:

python -m venv uno_env
source uno_env/bin/activate
pip install -r requirements.txt
  • Download model weights: Automatic download (downloaded automatically by the code when the inference script is run), or manually use huggingface-cli to download the weights to a specified directory.

Inference Example: Run the following command to generate an image:

python inference.py --prompt "A clock on the beach is under a red sun umbrella" --image_paths "assets/clock.png" --width 704 --height 704

Training: Run the training script:

accelerate launch train.py

Related Links

Project Page:https://bytedance.github.io/UNO

GitHub Repository:https://github.com/bytedance/UNO

arXiv Paper:https://arxiv.org/abs/2504.02160

Demo:https://huggingface.co/spaces/bytedance-research/UNO-FLUX