linoyts HF Staff commited on
Commit
c90aa74
Β·
verified Β·
1 Parent(s): e6f9650

smol ui changes

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -277,7 +277,7 @@ def process_and_display(
277
  css = """
278
  #col-container {
279
  margin: 0 auto;
280
- max-width: 960px;
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
- ### Compose new images with visual concepts
304
- Following the algorithm proposed in [*IP-Composer: Semantic Composition of Visual Concepts* by Dorfman et al.](https://arxiv.org/pdf/2502.13951)
305
- (Built on IP-Adapter)
306
 
307
  #### πŸ› οΈ How to Use:
308
- #### 1. Upload a base image
309
- #### 2. Upload 1–3 concept images
310
- #### 3. Select a concept type to extract from each concept image:
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
- demo.launch()
 
 
 
 
 
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
+