Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -435,12 +435,12 @@ help_text2 = """<b>Tips</b>:
|
|
435 |
1. Identity Editing and Generation
|
436 |
* If you are interested in preserving more of the image during identity-editing (i.e., where the same seed and prompt results in the same image with only the identity changed), you can play with the "Injection Step" parameter in the \"Editing and Generation\" tab in the `Advanced Options`.
|
437 |
* During the first *n* timesteps, the original model's weights will be used, and then the edited weights will be set during the remaining steps. Values closer to 1000 will set the edited weights early, having a more pronounced effect, which may disrupt some semantics and structure of the generated image. Lower values will set the edited weights later, better preserving image context. We notice that around 600-800 tends to produce the best results. Larger values in the range (700-1000) are helpful for more global attribute changes, while smaller (400-700) can be used for more finegrained edits. Although it is not always needed.
|
438 |
-
* You can play around with negative prompts, number of inference steps, and CFG in the \"
|
439 |
* Sometimes the identity will not be perfectly consistent (e.g., there might be small variations of the face) when you use some seeds or prompts. This is a limitation of our method as well as an open-problem in personalized models.
|
440 |
-
2.
|
441 |
-
* To obtain the best results for
|
442 |
-
* For
|
443 |
-
* For
|
444 |
* Note that if you change the number of PCs, you will probably need to change the learning rate. For less PCs, higher learning rates are typically required."""
|
445 |
|
446 |
|
@@ -452,6 +452,7 @@ intro = """
|
|
452 |
<p style="font-size: 0.95rem;margin: 0rem;line-height: 1.2em;margin-top:1em;display: inline-block">
|
453 |
<a href="https://snap-research.github.io/weights2weights/" target="_blank">Project Page</a> | <a href="https://arxiv.org/abs/2406.09413" target="_blank">Paper</a>
|
454 |
| <a href="https://github.com/snap-research/weights2weights" target="_blank">Code</a> |
|
|
|
455 |
<a href="https://huggingface.co/spaces/Snapchat/w2w-demo?duplicate=true" target="_blank" style="
|
456 |
display: inline-block;
|
457 |
">
|
|
|
435 |
1. Identity Editing and Generation
|
436 |
* If you are interested in preserving more of the image during identity-editing (i.e., where the same seed and prompt results in the same image with only the identity changed), you can play with the "Injection Step" parameter in the \"Editing and Generation\" tab in the `Advanced Options`.
|
437 |
* During the first *n* timesteps, the original model's weights will be used, and then the edited weights will be set during the remaining steps. Values closer to 1000 will set the edited weights early, having a more pronounced effect, which may disrupt some semantics and structure of the generated image. Lower values will set the edited weights later, better preserving image context. We notice that around 600-800 tends to produce the best results. Larger values in the range (700-1000) are helpful for more global attribute changes, while smaller (400-700) can be used for more finegrained edits. Although it is not always needed.
|
438 |
+
* You can play around with negative prompts, number of inference steps, and CFG in the \"Editing and Generation\" tab in the `Advanced Options` to affect the ultimate image quality.
|
439 |
* Sometimes the identity will not be perfectly consistent (e.g., there might be small variations of the face) when you use some seeds or prompts. This is a limitation of our method as well as an open-problem in personalized models.
|
440 |
+
2. Inserting Identity
|
441 |
+
* To obtain the best results for inserting an identity, upload a high resolution photo of the face with minimal occlusion. It is recommended to draw over the face and hair to define a mask. But inversion should still work generally for non-closeup face shots.
|
442 |
+
* For inserting a realistic photo of an identity, typically 800 epochs with lr=1e-1 and 10,000 principal components (PCs) works well. If the resulting generations have artifacted and unrealstic textures, there is probably overfitting and you may want to reduce the number of epochs or learning rate, or play with weight decay. If the generations do not look like the identity in the input photo, then you may want to increase the number of epochs.
|
443 |
+
* For inserting out-of-distribution identities, such as artistic renditions of people or non-humans (e.g. the ones shown in the paper), it is recommended to use 1000 PCs, lr=1 or 2, and train for 400-800 epochs.
|
444 |
* Note that if you change the number of PCs, you will probably need to change the learning rate. For less PCs, higher learning rates are typically required."""
|
445 |
|
446 |
|
|
|
452 |
<p style="font-size: 0.95rem;margin: 0rem;line-height: 1.2em;margin-top:1em;display: inline-block">
|
453 |
<a href="https://snap-research.github.io/weights2weights/" target="_blank">Project Page</a> | <a href="https://arxiv.org/abs/2406.09413" target="_blank">Paper</a>
|
454 |
| <a href="https://github.com/snap-research/weights2weights" target="_blank">Code</a> |
|
455 |
+
<a href="https://huggingface.co/snap-research/weights2weights" target="_blank">Model Card</a> |
|
456 |
<a href="https://huggingface.co/spaces/Snapchat/w2w-demo?duplicate=true" target="_blank" style="
|
457 |
display: inline-block;
|
458 |
">
|