Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -315,7 +315,39 @@ if __name__ == "__main__":
|
|
315 |
|
316 |
with gr.Blocks() as demo:
|
317 |
|
318 |
-
gr.Markdown("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
with gr.Row():
|
320 |
with gr.Column():
|
321 |
prompt = gr.Textbox(label="Prompt", value="")
|
@@ -333,6 +365,13 @@ if __name__ == "__main__":
|
|
333 |
|
334 |
# 将其他设置参数压缩到 Advanced Accordion 内
|
335 |
with gr.Accordion("Advanced", open=False):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
# 使用 Row 和 Column 来布局四个图像和描述
|
337 |
with gr.Row():
|
338 |
target_height = gr.Slider(512, 1024, step=128, value=768, label="Generated Height", info="")
|
|
|
315 |
|
316 |
with gr.Blocks() as demo:
|
317 |
|
318 |
+
gr.Markdown("""
|
319 |
+
### Official demo for "XVerse: Consistent Multi-Subject Control of Identity and Semantic Attributes via DiT Modulation"
|
320 |
+
|
321 |
+
<p align="center">
|
322 |
+
<a href="https://arxiv.org/abs/2506.21416">
|
323 |
+
<img alt="Build" src="https://img.shields.io/badge/arXiv%20paper-2506.21416-b31b1b.svg">
|
324 |
+
</a>
|
325 |
+
<a href="https://bytedance.github.io/XVerse/">
|
326 |
+
<img alt="Project Page" src="https://img.shields.io/badge/Project-Page-blue">
|
327 |
+
</a>
|
328 |
+
<a href="https://huggingface.co/ByteDance/XVerse">
|
329 |
+
<img alt="Build" src="https://img.shields.io/badge/🤗-HF%20Model-yellow">
|
330 |
+
</a>
|
331 |
+
<a href="https://github.com/ByteDance/XVerse">
|
332 |
+
<img alt="Build" src="https://img.shields.io/badge/Github-Repo-blue">
|
333 |
+
</a>
|
334 |
+
</p>
|
335 |
+
|
336 |
+
#### Input Images and Prompts
|
337 |
+
|
338 |
+
* **Prompt**: The textual description guiding the image generation.
|
339 |
+
* **Upload Image**: Click "Image X" to upload your desired reference image.
|
340 |
+
* **Image Description**: Enter a description in the "Caption X" input box. You can also click "Auto Caption" to generate a description automatically.
|
341 |
+
* **Detection & Segmentation**: Click "Det & Seg" to perform detection and segmentation on the uploaded image.
|
342 |
+
* **Crop Face**: Use "Crop Face" to automatically crop the face from the image.
|
343 |
+
* **ID Checkbox**: Check or uncheck "ID or not" to determine whether to use ID-related weights for that specific input image.
|
344 |
+
|
345 |
+
> **⚠️ Important Usage Notes:**
|
346 |
+
>
|
347 |
+
> * **Prompt Construction**: The main text prompt **MUST** include the exact text you entered in the `Image Description` field for each active image. **Generation will fail if this description is missing from the prompt.**
|
348 |
+
> * *Example*: If you upload two images and set their descriptions as "a man with red hair" (for Image 1) and "a woman with blue eyes" (for Image 2), your main prompt might be: "A `a man with red hair` walking beside `a woman with blue eyes` in a park."
|
349 |
+
> * You can then write your main prompt simply as: "`ENT1` walking beside `ENT2` in a park." The code will **automatically replace** these placeholders with the full description text before generation.
|
350 |
+
""")
|
351 |
with gr.Row():
|
352 |
with gr.Column():
|
353 |
prompt = gr.Textbox(label="Prompt", value="")
|
|
|
365 |
|
366 |
# 将其他设置参数压缩到 Advanced Accordion 内
|
367 |
with gr.Accordion("Advanced", open=False):
|
368 |
+
gr.Markdown("""#### Advanced Settings Explained
|
369 |
+
The Gradio demo provides several parameters to control your image generation process:
|
370 |
+
* **Generated Height/Width**: Use the sliders to set the shape of the output image.
|
371 |
+
* **Weight_id/ip**: Adjust these weight parameters. Higher values generally lead to better subject consistency but might slightly impact the naturalness of the generated image.
|
372 |
+
* **latent_lora_scale and vae_lora_scale**: Control the LoRA scale. Similar to Weight_id/ip, larger LoRA values can improve subject consistency but may reduce image naturalness.
|
373 |
+
* **vae_skip_iter_before and vae_skip_iter_after**: Configure VAE skip iterations. Skipping more steps can result in better naturalness but might compromise subject consistency.
|
374 |
+
""")
|
375 |
# 使用 Row 和 Column 来布局四个图像和描述
|
376 |
with gr.Row():
|
377 |
target_height = gr.Slider(512, 1024, step=128, value=768, label="Generated Height", info="")
|