Manireddy1508 commited on
Commit
9ddcbb6
Β·
verified Β·
1 Parent(s): 073a9a8

Upload 2 files

Browse files
models/uno_lora/.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ simplecase.jpeg filter=lfs diff=lfs merge=lfs -text
37
+ teaser.jpg filter=lfs diff=lfs merge=lfs -text
models/uno_lora/README.md ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-nd-4.0
3
+ base_model:
4
+ - black-forest-labs/FLUX.1-dev
5
+ pipeline_tag: text-to-image
6
+ tags:
7
+ - subject-personalization
8
+ - image-generation
9
+ ---
10
+
11
+ <h3 align="center">
12
+ Less-to-More Generalization: Unlocking More Controllability by In-Context Generation
13
+ </h3>
14
+
15
+ <div style="display:flex;justify-content: center">
16
+ <a href="https://bytedance.github.io/UNO/"><img alt="Build" src="https://img.shields.io/badge/Project%20Page-UNO-yellow"></a>
17
+ <a href="https://arxiv.org/abs/2504.02160"><img alt="Build" src="https://img.shields.io/badge/arXiv%20paper-2504.02160-b31b1b.svg"></a>
18
+ <a href="https://github.com/bytedance/UNO"><img src="https://img.shields.io/static/v1?label=GitHub&message=Code&color=green&logo=github"></a>
19
+ </div>
20
+
21
+ ><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><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">Yufeng Cheng,</span><sup></sup> </a> <span style="color:#137cf3; font-family: Gill Sans">Fei Ding</span><sup>+</sup>,</a> <span style="color:#137cf3; font-family: Gill Sans">Qian He</span></a> <br>
22
+ ><span style="font-size: 16px">Intelligent Creation Team, ByteDance</span></p>
23
+
24
+ ![teaser of UNO](./assets/teaser.jpg)
25
+
26
+ ## πŸ”₯ News
27
+ - [04/2025] πŸ”₯ The [training code](https://github.com/bytedance/UNO), [inference code](https://github.com/bytedance/UNO), and [model](https://huggingface.co/bytedance-research/UNO) of UNO are released. The [demo](https://huggingface.co/spaces/bytedance-research/UNO-FLUX) will coming soon.
28
+ - [04/2025] πŸ”₯ The [project page](https://bytedance.github.io/UNO) of UNO is created.
29
+ - [04/2025] πŸ”₯ The arXiv [paper](https://arxiv.org/abs/2504.02160) of UNO is released.
30
+
31
+ ## πŸ“– Introduction
32
+ In this study, we propose a highly-consistent data synthesis pipeline to tackle this challenge. This pipeline harnesses the intrinsic in-context generation capabilities of diffusion transformers and generates high-consistency multi-subject paired data. Additionally, we introduce UNO, which consists of progressive cross-modal alignment and universal rotary position embedding. It is a multi-image conditioned subject-to-image model iteratively trained from a text-to-image model. Extensive experiments show that our method can achieve high consistency while ensuring controllability in both single-subject and multi-subject driven generation.
33
+
34
+
35
+ ## ⚑️ Quick Start
36
+
37
+ ### πŸ”§ Requirements and Installation
38
+
39
+ Clone our [Github repo](https://github.com/bytedance/UNO)
40
+
41
+
42
+ Install the requirements
43
+ ```bash
44
+ ## create a virtual environment with python >= 3.10 <= 3.12, like
45
+ # python -m venv uno_env
46
+ # source uno_env/bin/activate
47
+ # then install
48
+ pip install -r requirements.txt
49
+ ```
50
+
51
+ then download checkpoints in one of the three ways:
52
+ 1. Directly run the inference scripts, the checkpoints will be downloaded automatically by the `hf_hub_download` function in the code to your `$HF_HOME`(the default value is `~/.cache/huggingface`).
53
+ 2. use `huggingface-cli download <repo name>` to download `black-forest-labs/FLUX.1-dev`, `xlabs-ai/xflux_text_encoders`, `openai/clip-vit-large-patch14`, `TODO UNO hf model`, then run the inference scripts.
54
+ 3. use `huggingface-cli download <repo name> --local-dir <LOCAL_DIR>` to download all the checkpoints menthioned in 2. to the directories your want. Then set the environment variable `TODO`. Finally, run the inference scripts.
55
+
56
+ ### 🌟 Gradio Demo
57
+
58
+ ```bash
59
+ python app.py
60
+ ```
61
+
62
+
63
+ ### ✍️ Inference
64
+
65
+ - Optional prepreration: If you want to test the inference on dreambench at the first time, you should clone the submodule `dreambench` to download the dataset.
66
+
67
+ ```bash
68
+ git submodule update --init
69
+ ```
70
+
71
+
72
+ ```bash
73
+ python inference.py
74
+ ```
75
+
76
+ ### πŸš„ Training
77
+
78
+ ```bash
79
+ accelerate launch train.py
80
+ ```
81
+
82
+ ## 🎨 Application Scenarios
83
+ ![simplecase of UNO](./assets/simplecase.jpeg)
84
+
85
+ ## πŸ“„ Disclaimer
86
+ <p>
87
+ We open-source this project for academic research. The vast majority of images
88
+ used in this project are either generated or licensed. If you have any concerns,
89
+ please contact us, and we will promptly remove any inappropriate content.
90
+ Our code is released under the Apache 2.0 License,, while our models are under
91
+ the CC BY-NC 4.0 License. Any models related to <a href="https://huggingface.co/black-forest-labs/FLUX.1-dev" target="_blank">FLUX.1-dev</a>
92
+ base model must adhere to the original licensing terms.
93
+ <br><br>This research aims to advance the field of generative AI. Users are free to
94
+ create images using this tool, provided they comply with local laws and exercise
95
+ responsible usage. The developers are not liable for any misuse of the tool by users.</p>
96
+
97
+ ## πŸš€ Updates
98
+ For the purpose of fostering research and the open-source community, we plan to open-source the entire project, encompassing training, inference, weights, etc. Thank you for your patience and support! 🌟
99
+ - [x] Release github repo.
100
+ - [x] Release inference code.
101
+ - [x] Release training code.
102
+ - [x] Release model checkpoints.
103
+ - [x] Release arXiv paper.
104
+ - [ ] Release in-context data generation pipelines.
105
+
106
+ ## Citation
107
+ If UNO is helpful, please help to ⭐ the repo.
108
+
109
+ If you find this project useful for your research, please consider citing our paper:
110
+ ```bibtex
111
+ @misc{wu2025lesstomoregeneralizationunlockingcontrollability,
112
+ title={Less-to-More Generalization: Unlocking More Controllability by In-Context Generation},
113
+ author={Shaojin Wu and Mengqi Huang and Wenxu Wu and Yufeng Cheng and Fei Ding and Qian He},
114
+ year={2025},
115
+ eprint={2504.02160},
116
+ archivePrefix={arXiv},
117
+ primaryClass={cs.CV},
118
+ url={https://arxiv.org/abs/2504.02160},
119
+ }
120
+ ```
121
+
122
+