Spaces:
Running
on
Zero
Running
on
Zero
smol ui changes
Browse files
app.py
CHANGED
@@ -277,7 +277,7 @@ def process_and_display(
|
|
277 |
css = """
|
278 |
#col-container {
|
279 |
margin: 0 auto;
|
280 |
-
max-width:
|
281 |
}
|
282 |
"""
|
283 |
example = """
|
@@ -300,18 +300,18 @@ a photo of a person feeling terrified
|
|
300 |
"""
|
301 |
with gr.Blocks(css=css) as demo:
|
302 |
gr.Markdown(f"""# IP Composer π
βποΈ
|
303 |
-
###
|
304 |
-
|
305 |
-
(Built on IP-Adapter)
|
306 |
|
307 |
#### π οΈ How to Use:
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
- Choose a **predefined concept type** from the dropdown (e.g. pattern, emotion, pose), **or**
|
312 |
- Upload a **file with text variations of your concept** (e.g. prompts from an LLM).
|
313 |
- π If you're uploading a **new concept**, don't forget to **adjust the "rank" value** under **Advanced Options** for better results.
|
314 |
|
|
|
315 |
[[Project page](https://ip-composer.github.io/IP-Composer/)] [[arxiv](https://arxiv.org/pdf/2502.13951)]
|
316 |
""")
|
317 |
concpet_from_file_1 = gr.State()
|
@@ -462,7 +462,9 @@ Following the algorithm proposed in [*IP-Composer: Semantic Composition of Visua
|
|
462 |
inputs=[concept_name3],
|
463 |
outputs=[rank3]
|
464 |
)
|
465 |
-
|
466 |
-
|
467 |
|
468 |
-
|
|
|
|
|
|
|
|
|
|
277 |
css = """
|
278 |
#col-container {
|
279 |
margin: 0 auto;
|
280 |
+
max-width: 800px;
|
281 |
}
|
282 |
"""
|
283 |
example = """
|
|
|
300 |
"""
|
301 |
with gr.Blocks(css=css) as demo:
|
302 |
gr.Markdown(f"""# IP Composer π
βποΈ
|
303 |
+
### compose new images with visual concepts extracted from refrence images using CLIP & IP Adapter
|
304 |
+
|
|
|
305 |
|
306 |
#### π οΈ How to Use:
|
307 |
+
1. Upload a base image
|
308 |
+
2. Upload 1β3 concept images
|
309 |
+
3. Select a **concept type** to extract from each concept image:
|
310 |
- Choose a **predefined concept type** from the dropdown (e.g. pattern, emotion, pose), **or**
|
311 |
- Upload a **file with text variations of your concept** (e.g. prompts from an LLM).
|
312 |
- π If you're uploading a **new concept**, don't forget to **adjust the "rank" value** under **Advanced Options** for better results.
|
313 |
|
314 |
+
Following the algorithm proposed in IP-Composer: Semantic Composition of Visual Concepts by Dorfman et al.
|
315 |
[[Project page](https://ip-composer.github.io/IP-Composer/)] [[arxiv](https://arxiv.org/pdf/2502.13951)]
|
316 |
""")
|
317 |
concpet_from_file_1 = gr.State()
|
|
|
462 |
inputs=[concept_name3],
|
463 |
outputs=[rank3]
|
464 |
)
|
|
|
|
|
465 |
|
466 |
+
if __name__ == "__main__":
|
467 |
+
demo.launch()
|
468 |
+
|
469 |
+
|
470 |
+
|