cb1cyf commited on
Commit
226f674
·
1 Parent(s): afc7f28

feat:support t2i

Browse files
Files changed (2) hide show
  1. app.py +10 -7
  2. uno/flux/model.py +2 -1
app.py CHANGED
@@ -72,9 +72,9 @@ badges_text = r"""
72
  <div style="text-align: center; display: flex; justify-content: center; gap: 5px;">
73
  <a href="https://github.com/bytedance/UMO"><img alt="Build" src="https://img.shields.io/github/stars/bytedance/UMO"></a>
74
  <a href="https://bytedance.github.io/UMO/"><img alt="Build" src="https://img.shields.io/badge/Project%20Page-UMO-yellow"></a>
75
- <a href="https://arxiv.org/abs/25xx.xxxxx"><img alt="Build" src="https://img.shields.io/badge/arXiv%20paper-UMO-b31b1b.svg"></a>
76
  <a href="https://huggingface.co/bytedance-research/UMO"><img src="https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Hugging%20Face&message=Model&color=orange"></a>
77
- <a href="https://huggingface.co/spaces/bytedance-research/UMO-FLUX"><img src="https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Hugging%20Face&message=demo&color=orange"></a>
78
  </div>
79
  """.strip()
80
 
@@ -95,11 +95,14 @@ tips = """
95
 
96
  article = """
97
  ```bibtex
98
- @article{cheng2025umo,
99
- title={UMO: Scaling Multi-Identity Consistency for Image Customization via Matching Reward},
100
- author={Cheng, Yufeng and Wu, Wenxu and Wu, Shaojin and Huang, Mengqi and Ding, Fei and He, Qian},
101
- journal={arXiv preprint arXiv:25xx.xxxxx},
102
- year={2025}
 
 
 
103
  }
104
  ```
105
  """.strip()
 
72
  <div style="text-align: center; display: flex; justify-content: center; gap: 5px;">
73
  <a href="https://github.com/bytedance/UMO"><img alt="Build" src="https://img.shields.io/github/stars/bytedance/UMO"></a>
74
  <a href="https://bytedance.github.io/UMO/"><img alt="Build" src="https://img.shields.io/badge/Project%20Page-UMO-yellow"></a>
75
+ <a href="https://arxiv.org/abs/2509.06818"><img alt="Build" src="https://img.shields.io/badge/arXiv%20paper-UMO-b31b1b.svg"></a>
76
  <a href="https://huggingface.co/bytedance-research/UMO"><img src="https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Hugging%20Face&message=Model&color=orange"></a>
77
+ # <a href="https://huggingface.co/spaces/bytedance-research/UMO-FLUX"><img src="https://img.shields.io/static/v1?label=%F0%9F%A4%97%20Hugging%20Face&message=demo&color=orange"></a>
78
  </div>
79
  """.strip()
80
 
 
95
 
96
  article = """
97
  ```bibtex
98
+ @misc{cheng2025umoscalingmultiidentityconsistency,
99
+ title={UMO: Scaling Multi-Identity Consistency for Image Customization via Matching Reward},
100
+ author={Yufeng Cheng and Wenxu Wu and Shaojin Wu and Mengqi Huang and Fei Ding and Qian He},
101
+ year={2025},
102
+ eprint={2509.06818},
103
+ archivePrefix={arXiv},
104
+ primaryClass={cs.CV},
105
+ url={https://arxiv.org/abs/2509.06818},
106
  }
107
  ```
108
  """.strip()
uno/flux/model.py CHANGED
@@ -177,8 +177,9 @@ class Flux(nn.Module):
177
  img_end = img.shape[1]
178
  if ref_img is not None:
179
  if isinstance(ref_img, tuple) or isinstance(ref_img, list):
180
- img = torch.cat([img, self.img_in(torch.cat(ref_img, dim=1))], dim=1)
181
  img_ids = [ids] + [ref_ids for ref_ids in ref_img_ids]
 
182
  ids = torch.cat(img_ids, dim=1)
183
  else:
184
  img = torch.cat((img, self.img_in(ref_img)), dim=1)
 
177
  img_end = img.shape[1]
178
  if ref_img is not None:
179
  if isinstance(ref_img, tuple) or isinstance(ref_img, list):
180
+ img_in = [img] + [self.img_in(ref) for ref in ref_img]
181
  img_ids = [ids] + [ref_ids for ref_ids in ref_img_ids]
182
+ img = torch.cat(img_in, dim=1)
183
  ids = torch.cat(img_ids, dim=1)
184
  else:
185
  img = torch.cat((img, self.img_in(ref_img)), dim=1)