Spaces:
Running
on
Zero
Running
on
Zero
docs:updates examples and ui
Browse files- app.py +8 -5
- assets/gradio_examples/{4identity → 1identity}/config.json +1 -1
- assets/gradio_examples/{2identity → 1identity}/ref.webp +0 -0
- assets/gradio_examples/2identity/config.json +2 -2
- assets/gradio_examples/{3identity → 2identity}/ref.jpg +0 -0
- assets/gradio_examples/3identity/config.json +2 -2
- assets/gradio_examples/{4identity → 3identity}/ref.webp +0 -0
- assets/gradio_examples/{1subject → 4subject}/config.json +0 -0
- assets/gradio_examples/{1subject → 4subject}/ref.jpg +0 -0
- assets/gradio_examples/5style_subject/config.json +7 -0
- assets/gradio_examples/{8style_subject → 5style_subject}/ref1.webp +0 -0
- assets/gradio_examples/5style_subject/ref2.webp +3 -0
- assets/gradio_examples/{8style_subject → 6style_subject}/config.json +0 -0
- assets/gradio_examples/6style_subject/ref1.webp +3 -0
- assets/gradio_examples/{8style_subject → 6style_subject}/ref2.webp +0 -0
- assets/gradio_examples/7style_subject/config.json +2 -2
- assets/gradio_examples/7style_subject/ref1.webp +2 -2
- assets/gradio_examples/7style_subject/ref2.webp +2 -2
- assets/gradio_examples/{5style → 8style}/config.json +0 -0
- assets/gradio_examples/{5style → 8style}/ref.webp +0 -0
- assets/gradio_examples/{6style → 9style}/config.json +0 -0
- assets/gradio_examples/{6style → 9style}/ref.webp +0 -0
- assets/gradio_examples/{9mix_style → z1_mix_style}/config.json +0 -0
- assets/gradio_examples/{9mix_style → z1_mix_style}/ref1.webp +0 -0
- assets/gradio_examples/{9mix_style → z1_mix_style}/ref2.webp +0 -0
- assets/gradio_examples/{z_mix_style → z2_mix_style}/config.json +0 -0
- assets/gradio_examples/{z_mix_style → z2_mix_style}/ref1.png +0 -0
- assets/gradio_examples/{z_mix_style → z2_mix_style}/ref2.png +0 -0
- assets/gradio_examples/z3_mix_style/config.json +8 -0
- assets/gradio_examples/z3_mix_style/ref1.jpg +3 -0
- assets/gradio_examples/z3_mix_style/ref2.png +3 -0
- assets/gradio_examples/z3_mix_style/ref3.png +3 -0
- 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 |
-
|
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 |
-
|
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 |
-
|
|
|
|
|
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
|
|
|
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": "
|
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
|
3 |
"seed": 3407,
|
4 |
"usage": "Identity-driven",
|
5 |
-
"image_ref1": "./ref.
|
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": "
|
3 |
"seed": 3407,
|
4 |
"usage": "Identity-driven",
|
5 |
-
"image_ref1": "./ref.
|
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
|
assets/gradio_examples/{8style_subject → 6style_subject}/config.json
RENAMED
File without changes
|
assets/gradio_examples/6style_subject/ref1.webp
ADDED
![]() |
Git LFS Details
|
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-
|
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
|
![]() |
Git LFS Details
|
assets/gradio_examples/7style_subject/ref2.webp
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
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
|
assets/gradio_examples/z3_mix_style/ref2.png
ADDED
![]() |
Git LFS Details
|
assets/gradio_examples/z3_mix_style/ref3.png
ADDED
![]() |
Git LFS Details
|
assets/gradio_examples/{zz_t2i → z4_t2i}/config.json
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
"prompt": "A beautiful woman.",
|
3 |
-
"seed":
|
4 |
"usage": "Text-to-image"
|
5 |
}
|
|
|
1 |
{
|
2 |
"prompt": "A beautiful woman.",
|
3 |
+
"seed": 0,
|
4 |
"usage": "Text-to-image"
|
5 |
}
|