fenfan commited on
Commit
f1f32cc
·
1 Parent(s): bc39e49

docs:updates examples and ui

Browse files
Files changed (33) hide show
  1. app.py +8 -5
  2. assets/gradio_examples/{4identity → 1identity}/config.json +1 -1
  3. assets/gradio_examples/{2identity → 1identity}/ref.webp +0 -0
  4. assets/gradio_examples/2identity/config.json +2 -2
  5. assets/gradio_examples/{3identity → 2identity}/ref.jpg +0 -0
  6. assets/gradio_examples/3identity/config.json +2 -2
  7. assets/gradio_examples/{4identity → 3identity}/ref.webp +0 -0
  8. assets/gradio_examples/{1subject → 4subject}/config.json +0 -0
  9. assets/gradio_examples/{1subject → 4subject}/ref.jpg +0 -0
  10. assets/gradio_examples/5style_subject/config.json +7 -0
  11. assets/gradio_examples/{8style_subject → 5style_subject}/ref1.webp +0 -0
  12. assets/gradio_examples/5style_subject/ref2.webp +3 -0
  13. assets/gradio_examples/{8style_subject → 6style_subject}/config.json +0 -0
  14. assets/gradio_examples/6style_subject/ref1.webp +3 -0
  15. assets/gradio_examples/{8style_subject → 6style_subject}/ref2.webp +0 -0
  16. assets/gradio_examples/7style_subject/config.json +2 -2
  17. assets/gradio_examples/7style_subject/ref1.webp +2 -2
  18. assets/gradio_examples/7style_subject/ref2.webp +2 -2
  19. assets/gradio_examples/{5style → 8style}/config.json +0 -0
  20. assets/gradio_examples/{5style → 8style}/ref.webp +0 -0
  21. assets/gradio_examples/{6style → 9style}/config.json +0 -0
  22. assets/gradio_examples/{6style → 9style}/ref.webp +0 -0
  23. assets/gradio_examples/{9mix_style → z1_mix_style}/config.json +0 -0
  24. assets/gradio_examples/{9mix_style → z1_mix_style}/ref1.webp +0 -0
  25. assets/gradio_examples/{9mix_style → z1_mix_style}/ref2.webp +0 -0
  26. assets/gradio_examples/{z_mix_style → z2_mix_style}/config.json +0 -0
  27. assets/gradio_examples/{z_mix_style → z2_mix_style}/ref1.png +0 -0
  28. assets/gradio_examples/{z_mix_style → z2_mix_style}/ref2.png +0 -0
  29. assets/gradio_examples/z3_mix_style/config.json +8 -0
  30. assets/gradio_examples/z3_mix_style/ref1.jpg +3 -0
  31. assets/gradio_examples/z3_mix_style/ref2.png +3 -0
  32. assets/gradio_examples/z3_mix_style/ref3.png +3 -0
  33. assets/gradio_examples/{zz_t2i → z4_t2i}/config.json +1 -1
app.py CHANGED
@@ -49,15 +49,17 @@ badges_text = r"""
49
  """.strip()
50
 
51
  tips = """
52
- 📌 **What is USO?**
53
  USO is a unified style-subject optimized customization model and the latest addition to the UXO family (<a href='https://github.com/bytedance/USO' target='_blank'> USO</a> and <a href='https://github.com/bytedance/UNO' target='_blank'> UNO</a>).
54
  It can freely combine any subjects with any styles in any scenarios.
55
 
56
- 💡 **How to use?**
57
  We provide step-by-step instructions in our <a href='https://github.com/bytedance/USO' target='_blank'> Github Repo</a>.
58
  Additionally, try the examples provided below the demo to quickly get familiar with USO and spark your creativity!
59
 
60
- ⚡️ The model is trained on 1024x1024 resolution and supports 3 types of usage:
 
 
61
  * **Only content img**: support following types:
62
  * Subject/Identity-driven (supports natural prompt, e.g., *A clock on the table.* *The woman near the sea.*, excels in producing **photorealistic portraits**)
63
  * Style edit (layout-preserved): *Transform the image into Ghibli style/Pixel style/Retro comic style/Watercolor painting style...*.
@@ -65,7 +67,7 @@ Additionally, try the examples provided below the demo to quickly get familiar w
65
  * **Only style img**: Reference input style and generate anything following prompt. Excelling in this and further support multiple style references (in beta).
66
  * **Content img + style img**: Place the content into the desired style.
67
  * Layout-preserved: set prompt to **empty**.
68
- * Layout-shift: using natural prompt."""
69
 
70
  star = r"""
71
  If USO is helpful, please help to ⭐ our <a href='https://github.com/bytedance/USO' target='_blank'> Github Repo</a>. Thanks a lot!"""
@@ -211,7 +213,8 @@ def create_demo(
211
  # cache_examples='lazy',
212
  outputs=[output_image, download_btn],
213
  fn=pipeline.gradio_generate,
214
- label='row 1: subject-driven; row 2-4: identity-driven; row 5-6: style-driven. row 7-8: style-subject-driven; row 9-10: multi-style-driven task; row 11: txt2img'
 
215
  )
216
 
217
  return demo
 
49
  """.strip()
50
 
51
  tips = """
52
+ **What is USO?** 🎨
53
  USO is a unified style-subject optimized customization model and the latest addition to the UXO family (<a href='https://github.com/bytedance/USO' target='_blank'> USO</a> and <a href='https://github.com/bytedance/UNO' target='_blank'> UNO</a>).
54
  It can freely combine any subjects with any styles in any scenarios.
55
 
56
+ **How to use?** 💡
57
  We provide step-by-step instructions in our <a href='https://github.com/bytedance/USO' target='_blank'> Github Repo</a>.
58
  Additionally, try the examples provided below the demo to quickly get familiar with USO and spark your creativity!
59
 
60
+ <details>
61
+ <summary style="cursor: pointer; color: #d34c0e; font-weight: 500;">The model is trained on 1024x1024 resolution and supports 3 types of usage. 📌 Tips:</summary>
62
+
63
  * **Only content img**: support following types:
64
  * Subject/Identity-driven (supports natural prompt, e.g., *A clock on the table.* *The woman near the sea.*, excels in producing **photorealistic portraits**)
65
  * Style edit (layout-preserved): *Transform the image into Ghibli style/Pixel style/Retro comic style/Watercolor painting style...*.
 
67
  * **Only style img**: Reference input style and generate anything following prompt. Excelling in this and further support multiple style references (in beta).
68
  * **Content img + style img**: Place the content into the desired style.
69
  * Layout-preserved: set prompt to **empty**.
70
+ * Layout-shift: using natural prompt.</details>"""
71
 
72
  star = r"""
73
  If USO is helpful, please help to ⭐ our <a href='https://github.com/bytedance/USO' target='_blank'> Github Repo</a>. Thanks a lot!"""
 
213
  # cache_examples='lazy',
214
  outputs=[output_image, download_btn],
215
  fn=pipeline.gradio_generate,
216
+ label='row 1-4: identity/subject-driven; row 5-7: style-subject-driven; row 8-9: style-driven; row 10-12: multi-style-driven task; row 13: txt2img',
217
+ examples_per_page=15
218
  )
219
 
220
  return demo
assets/gradio_examples/{4identity → 1identity}/config.json RENAMED
@@ -1,5 +1,5 @@
1
  {
2
- "prompt": "Transform the image into Ghibli style.",
3
  "seed": 3407,
4
  "usage": "Identity-driven",
5
  "image_ref1": "./ref.webp"
 
1
  {
2
+ "prompt": "The girl is riding a bike in a street.",
3
  "seed": 3407,
4
  "usage": "Identity-driven",
5
  "image_ref1": "./ref.webp"
assets/gradio_examples/{2identity → 1identity}/ref.webp RENAMED
File without changes
assets/gradio_examples/2identity/config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
- "prompt": "The girl is riding a bike in a street.",
3
  "seed": 3407,
4
  "usage": "Identity-driven",
5
- "image_ref1": "./ref.webp"
6
  }
 
1
  {
2
+ "prompt": "The man in flower shops carefully match bouquets, conveying beautiful emotions and blessings with flowers.",
3
  "seed": 3407,
4
  "usage": "Identity-driven",
5
+ "image_ref1": "./ref.jpg"
6
  }
assets/gradio_examples/{3identity → 2identity}/ref.jpg RENAMED
File without changes
assets/gradio_examples/3identity/config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
- "prompt": "The man in flower shops carefully match bouquets, conveying beautiful emotions and blessings with flowers.",
3
  "seed": 3407,
4
  "usage": "Identity-driven",
5
- "image_ref1": "./ref.jpg"
6
  }
 
1
  {
2
+ "prompt": "Transform the image into Ghibli style.",
3
  "seed": 3407,
4
  "usage": "Identity-driven",
5
+ "image_ref1": "./ref.webp"
6
  }
assets/gradio_examples/{4identity → 3identity}/ref.webp RENAMED
File without changes
assets/gradio_examples/{1subject → 4subject}/config.json RENAMED
File without changes
assets/gradio_examples/{1subject → 4subject}/ref.jpg RENAMED
File without changes
assets/gradio_examples/5style_subject/config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "prompt": "",
3
+ "seed": 321,
4
+ "usage": "Style-subject-driven (layout-preserved)",
5
+ "image_ref1": "./ref1.webp",
6
+ "image_ref2": "./ref2.webp"
7
+ }
assets/gradio_examples/{8style_subject → 5style_subject}/ref1.webp RENAMED
File without changes
assets/gradio_examples/5style_subject/ref2.webp ADDED

Git LFS Details

  • SHA256: 175d6e5b975b4d494950250740c0fe371a7e9b2c93c59a3ae82b82be72ccc0f6
  • Pointer size: 130 Bytes
  • Size of remote file: 14.2 kB
assets/gradio_examples/{8style_subject → 6style_subject}/config.json RENAMED
File without changes
assets/gradio_examples/6style_subject/ref1.webp ADDED

Git LFS Details

  • SHA256: f8ed8aa1c0714c939392e2c033735d6266e53266079bb300cbf05a6824a49f9f
  • Pointer size: 130 Bytes
  • Size of remote file: 38.8 kB
assets/gradio_examples/{8style_subject → 6style_subject}/ref2.webp RENAMED
File without changes
assets/gradio_examples/7style_subject/config.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
- "prompt": "",
3
  "seed": 321,
4
- "usage": "Style-subject-driven (layout-preserved)",
5
  "image_ref1": "./ref1.webp",
6
  "image_ref2": "./ref2.webp"
7
  }
 
1
  {
2
+ "prompt": "The man gave an impassioned speech on the podium. ",
3
  "seed": 321,
4
+ "usage": "Style-subject-driven (layout-shifted)",
5
  "image_ref1": "./ref1.webp",
6
  "image_ref2": "./ref2.webp"
7
  }
assets/gradio_examples/7style_subject/ref1.webp CHANGED

Git LFS Details

  • SHA256: f8ed8aa1c0714c939392e2c033735d6266e53266079bb300cbf05a6824a49f9f
  • Pointer size: 130 Bytes
  • Size of remote file: 38.8 kB

Git LFS Details

  • SHA256: e90c15cb58a2cbe6ff6d2a35bb18584f614ff0277a1eddcf90ab0a72062938c9
  • Pointer size: 130 Bytes
  • Size of remote file: 37.4 kB
assets/gradio_examples/7style_subject/ref2.webp CHANGED

Git LFS Details

  • SHA256: 175d6e5b975b4d494950250740c0fe371a7e9b2c93c59a3ae82b82be72ccc0f6
  • Pointer size: 130 Bytes
  • Size of remote file: 14.2 kB

Git LFS Details

  • SHA256: 9e83907ee1a966096d74c1b2dfe2ee1fa70167db7eec47d818f8a463ef0f97fb
  • Pointer size: 130 Bytes
  • Size of remote file: 39.8 kB
assets/gradio_examples/{5style → 8style}/config.json RENAMED
File without changes
assets/gradio_examples/{5style → 8style}/ref.webp RENAMED
File without changes
assets/gradio_examples/{6style → 9style}/config.json RENAMED
File without changes
assets/gradio_examples/{6style → 9style}/ref.webp RENAMED
File without changes
assets/gradio_examples/{9mix_style → z1_mix_style}/config.json RENAMED
File without changes
assets/gradio_examples/{9mix_style → z1_mix_style}/ref1.webp RENAMED
File without changes
assets/gradio_examples/{9mix_style → z1_mix_style}/ref2.webp RENAMED
File without changes
assets/gradio_examples/{z_mix_style → z2_mix_style}/config.json RENAMED
File without changes
assets/gradio_examples/{z_mix_style → z2_mix_style}/ref1.png RENAMED
File without changes
assets/gradio_examples/{z_mix_style → z2_mix_style}/ref2.png RENAMED
File without changes
assets/gradio_examples/z3_mix_style/config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "prompt": "",
3
+ "seed": 321,
4
+ "usage": "Multi-style-driven",
5
+ "image_ref1": "./ref1.jpg",
6
+ "image_ref2": "./ref2.png",
7
+ "image_ref3": "./ref3.png"
8
+ }
assets/gradio_examples/z3_mix_style/ref1.jpg ADDED

Git LFS Details

  • SHA256: 6b8d8b0e22c91297ed23fabf03b0a3574a717efe8e578d6a9d51f5367b7fb0ee
  • Pointer size: 131 Bytes
  • Size of remote file: 167 kB
assets/gradio_examples/z3_mix_style/ref2.png ADDED

Git LFS Details

  • SHA256: 5c31ba662c85f4032abf079dfeb9cba08d797b7b63f1d661c5270b373b00d095
  • Pointer size: 130 Bytes
  • Size of remote file: 26.1 kB
assets/gradio_examples/z3_mix_style/ref3.png ADDED

Git LFS Details

  • SHA256: c47d23d5ffdbf30b4a8f6c1bc5d07a730825eaac8363c13bdac8e3bb8c330aed
  • Pointer size: 130 Bytes
  • Size of remote file: 14.7 kB
assets/gradio_examples/{zz_t2i → z4_t2i}/config.json RENAMED
@@ -1,5 +1,5 @@
1
  {
2
  "prompt": "A beautiful woman.",
3
- "seed": -1,
4
  "usage": "Text-to-image"
5
  }
 
1
  {
2
  "prompt": "A beautiful woman.",
3
+ "seed": 0,
4
  "usage": "Text-to-image"
5
  }