Spaces:
Running
on
Zero
Running
on
Zero
fix: update app.py
Browse files
app.py
CHANGED
@@ -49,16 +49,18 @@ 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 |
-
|
58 |
-
|
|
|
|
|
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.
|
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**)
|
@@ -69,8 +71,8 @@ Additionally, try the examples provided below the demo to quickly get familiar w
|
|
69 |
* Layout-preserved: set prompt to **empty**.
|
70 |
* Layout-shift: using natural prompt.</details>"""
|
71 |
|
72 |
-
star =
|
73 |
-
If USO is helpful, please help to ⭐ our <a href='https://github.com/bytedance/USO' target='_blank'> Github Repo</a>. Thanks a lot!"""
|
74 |
|
75 |
def get_examples(examples_dir: str = "assets/examples") -> list:
|
76 |
examples = Path(examples_dir)
|
@@ -178,6 +180,13 @@ def create_demo(
|
|
178 |
download_btn = gr.File(
|
179 |
label="Download full-resolution", type="filepath", interactive=False
|
180 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
inputs = [
|
183 |
prompt,
|
@@ -217,6 +226,10 @@ def create_demo(
|
|
217 |
examples_per_page=15
|
218 |
)
|
219 |
|
|
|
|
|
|
|
|
|
220 |
return demo
|
221 |
|
222 |
|
|
|
49 |
""".strip()
|
50 |
|
51 |
tips = """
|
52 |
+
### What is USO and How to use?
|
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 |
+
💡 We provide step-by-step instructions in our <a href='https://github.com/bytedance/USO#-more-examples' target='_blank'> Github Repo</a>.
|
57 |
+
Additionally, try the examples provided below the demo to quickly get familiar with USO and inspire your creativity!
|
58 |
+
|
59 |
+
### Updates
|
60 |
+
🔥 **2025.09.04** USO now has native support in ComfyUI (see <a href='https://docs.comfy.org/tutorials/flux/flux-1-uso' target='_blank'>ComfyUI's official documentation</a> for details). For more information, please also check out our <a href='https://github.com/bytedance/USO?tab=readme-ov-file#%EF%B8%8F-comfyui-examples' target='_blank'>GitHub Repo</a>.
|
61 |
|
62 |
<details>
|
63 |
+
<summary style="cursor: pointer; color: #d34c0e; font-weight: 500;">The model is trained on 1024x1024 resolution and supports 3 types of usage. Tips:</summary>
|
64 |
|
65 |
* **Only content img**: support following types:
|
66 |
* Subject/Identity-driven (supports natural prompt, e.g., *A clock on the table.* *The woman near the sea.*, excels in producing **photorealistic portraits**)
|
|
|
71 |
* Layout-preserved: set prompt to **empty**.
|
72 |
* Layout-shift: using natural prompt.</details>"""
|
73 |
|
74 |
+
star = """
|
75 |
+
### If USO is helpful, please help to ⭐ our <a href='https://github.com/bytedance/USO' target='_blank'> Github Repo</a>. Thanks a lot!"""
|
76 |
|
77 |
def get_examples(examples_dir: str = "assets/examples") -> list:
|
78 |
examples = Path(examples_dir)
|
|
|
180 |
download_btn = gr.File(
|
181 |
label="Download full-resolution", type="filepath", interactive=False
|
182 |
)
|
183 |
+
gr.Markdown(
|
184 |
+
"""
|
185 |
+
### ❗️ Important Usage Tips:
|
186 |
+
- **Input Prompt**: Unless you only need Style Editing ("Transform the style into..."), use natural language ("A dog/man/woman is doing...") instead of instructive descriptions ("Put/Remove/Replace the xx into/with xx").
|
187 |
+
- **Input Content Image**: For portrait-preserving generation, USO excels at producing images with high skin detail. A practical guideline: use half-body close-ups when your prompt specifies a half-body subject, and full-body images—especially when the pose changes significantly.
|
188 |
+
"""
|
189 |
+
)
|
190 |
|
191 |
inputs = [
|
192 |
prompt,
|
|
|
226 |
examples_per_page=15
|
227 |
)
|
228 |
|
229 |
+
with gr.Accordion("Local Gradio Demo for Developers", open=False):
|
230 |
+
gr.Markdown(
|
231 |
+
'Please refer to our GitHub repository to [run the USO gradio demo locally](https://github.com/bytedance/USO?tab=readme-ov-file#-gradio-demo).'
|
232 |
+
)
|
233 |
return demo
|
234 |
|
235 |
|
uso/flux/modules/__pycache__/autoencoder.cpython-311.pyc
DELETED
Binary file (18.9 kB)
|
|
uso/flux/modules/__pycache__/conditioner.cpython-311.pyc
DELETED
Binary file (2.6 kB)
|
|
uso/flux/modules/__pycache__/layers.cpython-311.pyc
DELETED
Binary file (37.3 kB)
|
|