Significant commited on
Commit
19fc881
·
verified ·
1 Parent(s): bf85a4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -45
app.py CHANGED
@@ -232,53 +232,53 @@ title = r"""
232
  #V2: Improved ID Fidelity and Better Controllability than PhotoMaker V1</h1>
233
 
234
 
235
- # description = r"""
236
- # <b>Official 🤗 Gradio demo</b> for <a href='https://github.com/TencentARC/PhotoMaker' target='_blank'><b>PhotoMaker: Customizing Realistic Human Photos via Stacked ID Embedding</b></a>.<br>
237
- # How to use PhotoMaker V2 can be found in 🎬 <a href='https://photo-maker.github.io/assets/demo_pm_v2_full.mp4' target='_blank'>this video</a> 🎬.
238
- # <br>
239
- # <br>
240
- # For previous version of PhotoMaker, you could use our original gradio demos [PhotoMaker](https://huggingface.co/spaces/TencentARC/PhotoMaker) and [PhotoMaker-Style](https://huggingface.co/spaces/TencentARC/PhotoMaker-Style).
241
- # <br>
242
- # ❗️❗️❗️[<b>Important</b>] Personalization steps:<br>
243
- # 1️⃣ Upload images of someone you want to customize. One image is ok, but more is better. Although we do not perform face detection, the face in the uploaded image should <b>occupy the majority of the image</b>.<br>
244
- # 2️⃣ Enter a text prompt, making sure to <b>follow the class word</b> you want to customize with the <b>trigger word</b>: `img`, such as: `man img` or `woman img` or `girl img`.<br>
245
- # 3️⃣ Choose your preferred style template.<br>
246
- # 4️⃣ <b>(Optional: but new feature)</b> Select the ‘Enable Drawing Doodle...’ option and draw on the canvas<br>
247
- # 5️⃣ Click the <b>Submit</b> button to start customizing.
248
- # """
249
 
250
- # article = r"""
251
-
252
- # If PhotoMaker V2 is helpful, please help to ⭐ the <a href='https://github.com/TencentARC/PhotoMaker' target='_blank'>Github Repo</a>. Thanks!
253
- # [![GitHub Stars](https://img.shields.io/github/stars/TencentARC/PhotoMaker?style=social)](https://github.com/TencentARC/PhotoMaker)
254
- # ---
255
- # 📝 **Citation**
256
- # <br>
257
- # If our work is useful for your research, please consider citing:
258
-
259
- # ```bibtex
260
- # @article{li2023photomaker,
261
- # title={PhotoMaker: Customizing Realistic Human Photos via Stacked ID Embedding},
262
- # author={Li, Zhen and Cao, Mingdeng and Wang, Xintao and Qi, Zhongang and Cheng, Ming-Ming and Shan, Ying},
263
- # booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
264
- # year={2024}
265
- # }
266
- # ```
267
- # 📋 **License**
268
- # <br>
269
- # Apache-2.0 LICENSE. Please refer to the [LICENSE file](https://huggingface.co/TencentARC/PhotoMaker/blob/main/LICENSE) for details.
270
-
271
- # 📧 **Contact**
272
- # <br>
273
- # If you have any questions, please feel free to reach me out at <b>zhenli1031@gmail.com</b>.
274
- # """
275
 
276
- # tips = r"""
277
- # ### Usage tips of PhotoMaker
278
- # 1. Upload **more photos**of the person to be customized to **improve ID fidelty**.
279
- # 2. If you find that the image quality is poor when using doodle for control, you can reduce the conditioning scale and factor of the adapter.
280
- # If you have any issues, leave the issue in the discussion page of the space. For a more stable (queue-free) experience, you can duplicate the space.
281
- # """
282
  # We have provided some generate examples and comparisons at: [this website]().
283
 
284
  css = '''
 
232
  #V2: Improved ID Fidelity and Better Controllability than PhotoMaker V1</h1>
233
 
234
 
235
+ description = r"""
236
+ <b>Official 🤗 Gradio demo</b> for <a href='https://github.com/TencentARC/PhotoMaker' target='_blank'><b>PhotoMaker: Customizing Realistic Human Photos via Stacked ID Embedding</b></a>.<br>
237
+ How to use PhotoMaker V2 can be found in 🎬 <a href='https://photo-maker.github.io/assets/demo_pm_v2_full.mp4' target='_blank'>this video</a> 🎬.
238
+ <br>
239
+ <br>
240
+ For previous version of PhotoMaker, you could use our original gradio demos [PhotoMaker](https://huggingface.co/spaces/TencentARC/PhotoMaker) and [PhotoMaker-Style](https://huggingface.co/spaces/TencentARC/PhotoMaker-Style).
241
+ <br>
242
+ ❗️❗️❗️[<b>Important</b>] Personalization steps:<br>
243
+ 1️⃣ Upload images of someone you want to customize. One image is ok, but more is better. Although we do not perform face detection, the face in the uploaded image should <b>occupy the majority of the image</b>.<br>
244
+ 2️⃣ Enter a text prompt, making sure to <b>follow the class word</b> you want to customize with the <b>trigger word</b>: `img`, such as: `man img` or `woman img` or `girl img`.<br>
245
+ 3️⃣ Choose your preferred style template.<br>
246
+ 4️⃣ <b>(Optional: but new feature)</b> Select the ‘Enable Drawing Doodle...’ option and draw on the canvas<br>
247
+ 5️⃣ Click the <b>Submit</b> button to start customizing.
248
+ """
249
 
250
+ article = r"""
251
+
252
+ If PhotoMaker V2 is helpful, please help to ⭐ the <a href='https://github.com/TencentARC/PhotoMaker' target='_blank'>Github Repo</a>. Thanks!
253
+ [![GitHub Stars](https://img.shields.io/github/stars/TencentARC/PhotoMaker?style=social)](https://github.com/TencentARC/PhotoMaker)
254
+ ---
255
+ 📝 **Citation**
256
+ <br>
257
+ If our work is useful for your research, please consider citing:
258
+
259
+ ```bibtex
260
+ @article{li2023photomaker,
261
+ title={PhotoMaker: Customizing Realistic Human Photos via Stacked ID Embedding},
262
+ author={Li, Zhen and Cao, Mingdeng and Wang, Xintao and Qi, Zhongang and Cheng, Ming-Ming and Shan, Ying},
263
+ booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
264
+ year={2024}
265
+ }
266
+ ```
267
+ 📋 **License**
268
+ <br>
269
+ Apache-2.0 LICENSE. Please refer to the [LICENSE file](https://huggingface.co/TencentARC/PhotoMaker/blob/main/LICENSE) for details.
270
+
271
+ 📧 **Contact**
272
+ <br>
273
+ If you have any questions, please feel free to reach me out at <b>zhenli1031@gmail.com</b>.
274
+ """
275
 
276
+ tips = r"""
277
+ ### Usage tips of PhotoMaker
278
+ 1. Upload **more photos**of the person to be customized to **improve ID fidelty**.
279
+ 2. If you find that the image quality is poor when using doodle for control, you can reduce the conditioning scale and factor of the adapter.
280
+ If you have any issues, leave the issue in the discussion page of the space. For a more stable (queue-free) experience, you can duplicate the space.
281
+ """
282
  # We have provided some generate examples and comparisons at: [this website]().
283
 
284
  css = '''