SkillAgentSearch skills...

USO

[CVPR 2026] 🔥🔥 Official Repo of USO: Unified Style and Subject-Driven Generation via Disentangled and Reward Learning

Install / Use

/learn @bytedance/USO
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h3 align="center"> <img src="assets/uso.webp" alt="Logo" style="vertical-align: middle; width: 95px; height: auto;"> </br> Unified Style and Subject-Driven Generation via Disentangled and Reward Learning </h3> <p align="center"> <a href="https://bytedance.github.io/USO/"><img alt="Build" src="https://img.shields.io/badge/Project%20Page-USO-blue"></a> <a href="https://arxiv.org/abs/2508.18966"><img alt="Build" src="https://img.shields.io/badge/Tech%20Report-USO-b31b1b.svg"></a> <a href="https://huggingface.co/bytedance-research/USO"><img src="https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Hugging%20Face&message=Model&color=green"></a> <a href="https://huggingface.co/spaces/bytedance-research/USO"><img src="https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Hugging%20Face&message=demo&color=orange"></a> </p> </p>
<p align="center"> <span style="color:#137cf3; font-family: Gill Sans">Shaojin Wu,</span><sup></sup></a> <span style="color:#137cf3; font-family: Gill Sans">Mengqi Huang,</span></a> <span style="color:#137cf3; font-family: Gill Sans">Yufeng Cheng,</span><sup></sup></a> <span style="color:#137cf3; font-family: Gill Sans">Wenxu Wu,</span><sup></sup> </a> <span style="color:#137cf3; font-family: Gill Sans">Jiahe Tian,</span><sup></sup></a> <span style="color:#137cf3; font-family: Gill Sans">Yiming Luo,</span><sup></sup></a> <span style="color:#137cf3; font-family: Gill Sans">Fei Ding,</span></a> <span style="color:#137cf3; font-family: Gill Sans">Qian He</span></a> <br> <span style="font-size: 13.5px">UXO Team</span><br> <span style="font-size: 12px">Intelligent Creation Lab, Bytedance</span></p>

🚩 Updates

  • 2025.09.12 🔥 Our new family member UMO is here! It focuses on multiple identities and subject-driven generation. You can visit the <a href="https://bytedance.github.io/UMO/" target="_blank">UMO project page</a> for more examples.

  • 2025.09.03 🎉 USO is now natively supported in ComfyUI, see official tutorial USO in ComfyUI and our provided examples in ./workflow. More tips are available in the README below.

<p align="center"> <img src="assets/usoxcomfyui_official.jpeg" width=1024 height="auto"> </p>
  • 2025.08.28 🔥 The demo of USO is released. Try it Now! ⚡️
  • 2025.08.28 🔥 Update fp8 mode as a primary low vmemory usage support (please scroll down). Gift for consumer-grade GPU users. The peak Vmemory usage is ~16GB now.
  • 2025.08.27 🔥 The inference code and model of USO are released.
  • 2025.08.27 🔥 The project page of USO is created.
  • 2025.08.27 🔥 The technical report of USO is released.

📖 Introduction

Existing literature typically treats style-driven and subject-driven generation as two disjoint tasks: the former prioritizes stylistic similarity, whereas the latter insists on subject consistency, resulting in an apparent antagonism. We argue that both objectives can be unified under a single framework because they ultimately concern the disentanglement and re-composition of “content” and “style”, a long-standing theme in style-driven research. To this end, we present USO, a Unified framework for Style driven and subject-driven GeneratiOn. First, we construct a large-scale triplet dataset consisting of content images, style images, and their corresponding stylized content images. Second, we introduce a disentangled learning scheme that simultaneously aligns style features and disentangles content from style through two complementary objectives, style-alignment training and content–style disentanglement training. Third, we incorporate a style reward-learning paradigm to further enhance the model’s performance.

<p align="center"> <img src="assets/teaser.webp" width="1024"/> </p>

⚡️ Quick Start

🔧 Requirements and Installation

Install the requirements

## create a virtual environment with python >= 3.10 <= 3.12, like
python -m venv uso_env
source uso_env/bin/activate
## or
conda create -n uso_env python=3.10 -y
conda activate uso_env

## install torch
## recommended version:
pip install torch==2.4.0 torchvision==0.19.0 --index-url https://download.pytorch.org/whl/cu124 

## then install the requirements by you need
pip install -r requirements.txt # legacy installation command

Then download checkpoints:

# 1. set up .env file
cp example.env .env

# 2. set your huggingface token in .env (open the file and change this value to your token)
HF_TOKEN=your_huggingface_token_here

#3. download the necessary weights (comment any weights you don't need)
pip install huggingface_hub
python ./weights/downloader.py
  • IF YOU HAVE WEIGHTS, COMMENT OUT WHAT YOU DON'T NEED IN ./weights/downloader.py

✍️ Inference

  • Start from the examples below to explore and spark your creativity. ✨
# the first image is a content reference, and the rest are style references.

# for subject-driven generation
python inference.py --prompt "The man in flower shops carefully match bouquets, conveying beautiful emotions and blessings with flowers. " --image_paths "assets/gradio_examples/identity1.jpg" --width 1024 --height 1024
# for style-driven generation
# please keep the first image path empty
python inference.py --prompt "A cat sleeping on a chair." --image_paths "" "assets/gradio_examples/style1.webp" --width 1024 --height 1024
# for style-subject driven generation (or set the prompt to empty for layout-preserved generation)
python inference.py --prompt "The woman gave an impassioned speech on the podium." --image_paths "assets/gradio_examples/identity2.webp" "assets/gradio_examples/style2.webp" --width 1024 --height 1024
# for multi-style generation
# please keep the first image path empty
python inference.py --prompt "A handsome man." --image_paths "" "assets/gradio_examples/style3.webp" "assets/gradio_examples/style4.webp" --width 1024 --height 1024

# for low vram:
python inference.py --prompt "your propmt" --image_paths "your_image.jpg" --width 1024 --height 1024 --offload --model_type flux-dev-fp8 
  • You can also compare your results with the results in the assets/gradio_examples folder.

  • For more examples, visit our project page or try the live demo.

🌟 Gradio Demo

python app.py

For low vmemory usage, please pass the --offload and --name flux-dev-fp8 args. The peak memory usage will be 16GB (Single reference) ~ 18GB (Multi references).

# please use FLUX_DEV_FP8 replace FLUX_DEV
export FLUX_DEV_FP8="YOUR_FLUX_DEV_PATH"

python app.py --offload --name flux-dev-fp8

🌈 More examples

We provide some prompts and results to help you better understand the model. You can check our paper or project page for more visualizations.

Subject/Identity-driven generation

<details> <summary>If you want to place a subject into new scene, please use natural language like "A dog/man/woman is doing...". If you only want to transfer the style but keep the layout, please an use instructive prompt like "Transform the style into ... style". For portraits-preserved generation, USO excels at producing high skin-detail images. A practical guideline: use half-body close-ups for half-body prompts, and full-body images when the pose or framing changes significantly. </summary> <p align="center"> <img src="assets/show_case1.webp" width="1024"/> <p> <p align="center"> <img src="assets/show_case2.webp" width="1024"/> </p> <p align="center"> <img src="assets/show_case3.webp" width="1024"/> </p> <p align="center"> <img src="assets/show_case4.webp" width="1024"/> </p> </details>

Style-driven generation

<details> <summary>Just upload one or two style images, and use natural language to create want you want. USO will generate images follow your prompt and match the style you uploaded. </summary> <p align="center"> <img src="assets/show_case5.webp" width="1024"/> <p> <p align="center"> <img src="assets/show_case6.webp" width="1024"/> </p> </details>

Style-subject driven generation

<details> <summary>USO can stylize a single content reference with one or two style refs. For layout-preserved generation, just set the prompt to empty. </summary> `Layout-preserved generation` <p align="center"> <img src="assets/show_case7.webp" width="1024"/> <p>

Layout-shifted generation

<p align="center"> <img src="assets/show_case8.webp" width="1024"/> </p> </details>

⚙️ ComfyUI examples

We’re pleased that USO now has native support in ComfyUI. For a quick start, please refer to the official tutorials USO in ComfyUI. To help you reproduce and match the results, we’ve provided several examples in ./workflows, including workflows and their inputs and outputs, so you can quickly get familiar with what USO can do. With USO now fully compatible with the ComfyUI ecosystem, you can combine it with other plugins like ControlNet and LoRA. We welcome community contributions of more workflows and examples.

Now you can easily run USO in ComfyUI. Just update ComfyUI to the latest version (0.3.57), and you’ll find USO in the official templates.

<p align="center"> <img src="assets/comfyui_template.png" width=1024 height="auto"> </p>

More examples are provided below:

<p align="center"> <img src="assets/usoxcomfyui.webp" width=1024 height="auto"> </p>

Identity preserved

<p align="center"> <img src="workflow/example1.png" width=1024 height="auto"> </p>

Download the image a

View on GitHub
GitHub Stars1.2k
CategoryEducation
Updated5d ago
Forks77

Languages

Python

Security Score

95/100

Audited on Mar 31, 2026

No findings