Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
2c80ba4
1
Parent(s):
30515ee
update app.py
Browse files
app.py
CHANGED
@@ -167,7 +167,7 @@ with gr.Blocks() as demo:
|
|
167 |
session_state = gr.State({})
|
168 |
default_model_version = "v1.0"
|
169 |
|
170 |
-
gr.
|
171 |
<div style="text-align: center; max-width: 900px; margin: 0 auto;">
|
172 |
<h1 style="font-size: 1.5rem; font-weight: 700; display: block;">InfiniteYou-FLUX</h1>
|
173 |
<h2 style="font-size: 1.2rem; font-weight: 300; margin-bottom: 1rem; display: block;">Official Gradio Demo for <a href="https://arxiv.org/abs/2503.16418">InfiniteYou: Flexible Photo Recrafting While Preserving Your Identity</a></h2>
|
@@ -176,7 +176,9 @@ with gr.Blocks() as demo:
|
|
176 |
<a href="https://github.com/bytedance/InfiniteYou">[Code]</a> 
|
177 |
<a href="https://huggingface.co/ByteDance/InfiniteYou">[Model]</a>
|
178 |
</div>
|
|
|
179 |
|
|
|
180 |
### 💡 How to Use This Demo:
|
181 |
1. **Upload an identity (ID) image containing a human face.** For images with multiple faces, only the largest face will be detected. The face should ideally be clear and large enough, without significant occlusions or blur.
|
182 |
2. **Enter the text prompt to describe the generated image and select the model version.** Please refer to **important usage tips** under the Generated Image field.
|
@@ -227,7 +229,7 @@ with gr.Blocks() as demo:
|
|
227 |
- **Model Version**: `aes_stage2` is used by default for better text-image alignment and aesthetics. For higher ID similarity, please try `sim_stage1`.
|
228 |
- **Useful Hyperparameters**: Usually, there is NO need to adjust too much. If necessary, try a slightly larger `--infusenet_guidance_start` (*e.g.*, `0.1`) only (especially helpful for `sim_stage1`). If still not satisfactory, then try a slightly smaller `--infusenet_conditioning_scale` (*e.g.*, `0.9`).
|
229 |
- **Optional LoRAs**: `realism` and `anti-blur`. To enable them, please check the corresponding boxes. They are optional and were NOT used in our paper.
|
230 |
-
- **Gender Prompt**: If the generated gender is not preferred, add specific words in the
|
231 |
"""
|
232 |
)
|
233 |
|
@@ -279,7 +281,11 @@ with gr.Blocks() as demo:
|
|
279 |
the [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) base model, LoRAs, etc., must follow their original licenses and be used only for academic research purposes.
|
280 |
|
281 |
This research aims to positively impact the Generative AI field. Users are granted freedom to create images using this tool, but they must comply with local laws and use it responsibly. The developers do not assume any responsibility for potential misuse.
|
282 |
-
|
|
|
|
|
|
|
|
|
283 |
### 📖 Citation
|
284 |
|
285 |
If you find InfiniteYou useful for your research or applications, please cite our paper:
|
|
|
167 |
session_state = gr.State({})
|
168 |
default_model_version = "v1.0"
|
169 |
|
170 |
+
gr.HTML("""
|
171 |
<div style="text-align: center; max-width: 900px; margin: 0 auto;">
|
172 |
<h1 style="font-size: 1.5rem; font-weight: 700; display: block;">InfiniteYou-FLUX</h1>
|
173 |
<h2 style="font-size: 1.2rem; font-weight: 300; margin-bottom: 1rem; display: block;">Official Gradio Demo for <a href="https://arxiv.org/abs/2503.16418">InfiniteYou: Flexible Photo Recrafting While Preserving Your Identity</a></h2>
|
|
|
176 |
<a href="https://github.com/bytedance/InfiniteYou">[Code]</a> 
|
177 |
<a href="https://huggingface.co/ByteDance/InfiniteYou">[Model]</a>
|
178 |
</div>
|
179 |
+
""")
|
180 |
|
181 |
+
gr.Markdown("""
|
182 |
### 💡 How to Use This Demo:
|
183 |
1. **Upload an identity (ID) image containing a human face.** For images with multiple faces, only the largest face will be detected. The face should ideally be clear and large enough, without significant occlusions or blur.
|
184 |
2. **Enter the text prompt to describe the generated image and select the model version.** Please refer to **important usage tips** under the Generated Image field.
|
|
|
229 |
- **Model Version**: `aes_stage2` is used by default for better text-image alignment and aesthetics. For higher ID similarity, please try `sim_stage1`.
|
230 |
- **Useful Hyperparameters**: Usually, there is NO need to adjust too much. If necessary, try a slightly larger `--infusenet_guidance_start` (*e.g.*, `0.1`) only (especially helpful for `sim_stage1`). If still not satisfactory, then try a slightly smaller `--infusenet_conditioning_scale` (*e.g.*, `0.9`).
|
231 |
- **Optional LoRAs**: `realism` and `anti-blur`. To enable them, please check the corresponding boxes. They are optional and were NOT used in our paper.
|
232 |
+
- **Gender Prompt**: If the generated gender is not preferred, add specific words in the prompt, such as 'a man', 'a woman', *etc*. We encourage using inclusive and respectful language.
|
233 |
"""
|
234 |
)
|
235 |
|
|
|
281 |
the [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev) base model, LoRAs, etc., must follow their original licenses and be used only for academic research purposes.
|
282 |
|
283 |
This research aims to positively impact the Generative AI field. Users are granted freedom to create images using this tool, but they must comply with local laws and use it responsibly. The developers do not assume any responsibility for potential misuse.
|
284 |
+
"""
|
285 |
+
)
|
286 |
+
|
287 |
+
gr.Markdown(
|
288 |
+
"""
|
289 |
### 📖 Citation
|
290 |
|
291 |
If you find InfiniteYou useful for your research or applications, please cite our paper:
|