Junjie96 commited on
Commit
45247d4
·
verified ·
1 Parent(s): 3c45f35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -153,7 +153,7 @@ def interface():
153
  "assets/examples/1_mask.webp",
154
  None,
155
  None,
156
- "Cartoon style. A sheep is riding a skateboard and gliding through the city, holding a wooden sign that says \"TongYi\".",
157
  "assets/examples/1_output.webp",
158
  ],
159
  [
@@ -267,6 +267,8 @@ if __name__ == "__main__":
267
  <div style="display: flex; justify-content: center; align-items: center; text-align: center;">
268
  <a href="https://arxiv.org/pdf/2501.09503"><img src="https://img.shields.io/badge/arXiv-2501.09503-red"></a>
269
  &nbsp;
 
 
270
  <a href='https://aigcdesigngroup.github.io/AnyStory/'><img src='https://img.shields.io/badge/Project_Page-AnyStory-green' alt='Project Page'></a>
271
  &nbsp;
272
  <a href='https://modelscope.cn/studios/iic/AnyStory'><img src='https://img.shields.io/badge/Demo-ModelScope-blue'></a>
@@ -276,17 +278,16 @@ if __name__ == "__main__":
276
  """
277
 
278
  title_description = r"""
279
- Official demo of <b>AnyStory 2</b> 🤗. We will continuously update this demo.
280
- For technical details, please refer to our tech report: <a href='https://arxiv.org/pdf/2501.09503' target='_blank'><b>AnyStory: Towards Unified Single and Multiple Subject Personalization in Text-to-Image Generation</b></a>. 😊
281
  """
282
 
283
  description = r"""🚀🚀🚀 Quick Start:<br>
284
- 1. Upload subject reference images (clean background; real human IDs unsupported for now), Add prompts (only EN supported), and Click "<b>RUN</b>".<br>
285
- 2. (Recommended) Click "<b>Segment Subject</b>" to create masks (or upload your own B&W masks) for subjects. This helps the model better reference the subject you specify (otherwise, we will perform automatic detection). 🤗<br>
286
  """
287
 
288
  tips = r"""💡💡💡 Tips:<br>
289
- If the subject doesn't appear, try adding a detailed description of the subject in the prompt that matches the reference image, and avoid conflicting details (e.g., significantly altering the subject's appearance). Multi-subject referencing in AnyStory2 is still being optimized. 🤗<br>
290
  """
291
 
292
  citation = r"""
@@ -338,7 +339,7 @@ if __name__ == "__main__":
338
  return 'Animation created';
339
  }
340
  """
341
- block = gr.Blocks(title="AnyStory2", js=js, theme=gr.themes.Ocean()).queue()
342
  with block:
343
  gr.HTML(title)
344
  gr.HTML(title_description)
@@ -350,5 +351,5 @@ if __name__ == "__main__":
350
 
351
  gr.Markdown(citation)
352
 
353
- block.launch(share=True, max_threads=10)
354
- # block.launch(server_name='0.0.0.0', share=False, server_port=9999, max_threads=10)
 
153
  "assets/examples/1_mask.webp",
154
  None,
155
  None,
156
+ "Cartoon style. A sheep is riding a skateboard and gliding through the city, holding a wooden sign that says \"hello\".",
157
  "assets/examples/1_output.webp",
158
  ],
159
  [
 
267
  <div style="display: flex; justify-content: center; align-items: center; text-align: center;">
268
  <a href="https://arxiv.org/pdf/2501.09503"><img src="https://img.shields.io/badge/arXiv-2501.09503-red"></a>
269
  &nbsp;
270
+ <a href="https://github.com/junjiehe96/AnyStory"><img src="https://img.shields.io/badge/Github-Code-blue"></a>
271
+ &nbsp;
272
  <a href='https://aigcdesigngroup.github.io/AnyStory/'><img src='https://img.shields.io/badge/Project_Page-AnyStory-green' alt='Project Page'></a>
273
  &nbsp;
274
  <a href='https://modelscope.cn/studios/iic/AnyStory'><img src='https://img.shields.io/badge/Demo-ModelScope-blue'></a>
 
278
  """
279
 
280
  title_description = r"""
281
+ Official demo of <b>AnyStory</b> (FLUX.1-dev version). The code has been released on <a href='https://github.com/junjiehe96/AnyStory' target='_blank'><b>GitHub</b></a>.
 
282
  """
283
 
284
  description = r"""🚀🚀🚀 Quick Start:<br>
285
+ 1. Upload reference images for the subjects (clean background; real human IDs unsupported for now), enter text prompts, and click "<b>RUN</b>".<br>
286
+ 2. (Recommended) Click "<b>Segment Subject</b>" to create masks (or upload your own B&W masks) for subjects. This helps the model better reference the subject you specify (otherwise, we will perform automatic detection).<br>
287
  """
288
 
289
  tips = r"""💡💡💡 Tips:<br>
290
+ If the subject doesn't appear, try adding a detailed description of the subject in the prompt that matches the reference image, and avoid conflicting details (e.g., significantly altering the subject's appearance).<br>
291
  """
292
 
293
  citation = r"""
 
339
  return 'Animation created';
340
  }
341
  """
342
+ block = gr.Blocks(title="AnyStory", js=js, theme=gr.themes.Ocean()).queue()
343
  with block:
344
  gr.HTML(title)
345
  gr.HTML(title_description)
 
351
 
352
  gr.Markdown(citation)
353
 
354
+ # block.launch(share=True, max_threads=10)
355
+ block.launch(server_name='0.0.0.0', share=False, server_port=9999, max_threads=10)