Spaces:
Running
on
Zero
Running
on
Zero
fix dat english part 2
#71
by
nroggendorff
- opened
app.py
CHANGED
@@ -192,21 +192,21 @@ def get_example():
|
|
192 |
[
|
193 |
"./examples/musk_resize.jpeg",
|
194 |
"./examples/poses/pose2.jpg",
|
195 |
-
"a man flying
|
196 |
"Mars",
|
197 |
"(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
|
198 |
],
|
199 |
[
|
200 |
"./examples/sam_resize.png",
|
201 |
"./examples/poses/pose4.jpg",
|
202 |
-
"a man doing a silly pose wearing a
|
203 |
"Jungle",
|
204 |
"(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, gree",
|
205 |
],
|
206 |
[
|
207 |
"./examples/schmidhuber_resize.png",
|
208 |
"./examples/poses/pose3.jpg",
|
209 |
-
"a man
|
210 |
"Neon",
|
211 |
"(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
|
212 |
],
|
@@ -433,11 +433,11 @@ title = r"""
|
|
433 |
description = r"""
|
434 |
<b>Official 🤗 Gradio demo</b> for <a href='https://github.com/InstantID/InstantID' target='_blank'><b>InstantID: Zero-shot Identity-Preserving Generation in Seconds</b></a>.<br>
|
435 |
|
436 |
-
We are organizing a Spring Festival event with HuggingFace from
|
437 |
|
438 |
How to use:<br>
|
439 |
-
1. Upload an image with a face. For images with multiple faces, we will only detect the largest face. Ensure the face is
|
440 |
-
2. (Optional) You can upload another image as a reference for the face pose. If you don't, we will use the first detected face image to extract facial landmarks. If you
|
441 |
3. (Optional) You can select multiple ControlNet models to control the generation process. The default is to use the IdentityNet only. The ControlNet models include pose skeleton, canny, and depth. You can adjust the strength of each ControlNet model to control the generation process.
|
442 |
4. Enter a text prompt, as done in normal text-to-image models.
|
443 |
5. Click the <b>Submit</b> button to begin customization.
|
@@ -447,7 +447,7 @@ article = r"""
|
|
447 |
---
|
448 |
📝 **Citation**
|
449 |
<br>
|
450 |
-
If our work is helpful for your research or applications, please cite us via:
|
451 |
```bibtex
|
452 |
@article{wang2024instantid,
|
453 |
title={InstantID: Zero-shot Identity-Preserving Generation in Seconds},
|
@@ -458,15 +458,15 @@ If our work is helpful for your research or applications, please cite us via:
|
|
458 |
```
|
459 |
📧 **Contact**
|
460 |
<br>
|
461 |
-
If you have any questions, please feel free to open an issue or
|
462 |
"""
|
463 |
|
464 |
tips = r"""
|
465 |
-
### Usage
|
466 |
-
1. If you're not satisfied with the similarity, try increasing the weight of "IdentityNet Strength" and "Adapter Strength."
|
467 |
2. If you feel that the saturation is too high, first decrease the Adapter strength. If it remains too high, then decrease the IdentityNet strength.
|
468 |
-
3. If
|
469 |
-
4. If
|
470 |
"""
|
471 |
|
472 |
css = """
|
@@ -493,7 +493,7 @@ with gr.Blocks(css=css) as demo:
|
|
493 |
# prompt
|
494 |
prompt = gr.Textbox(
|
495 |
label="Prompt",
|
496 |
-
info="Give simple prompt
|
497 |
placeholder="A photo of a person",
|
498 |
value="",
|
499 |
)
|
@@ -501,7 +501,7 @@ with gr.Blocks(css=css) as demo:
|
|
501 |
submit = gr.Button("Submit", variant="primary")
|
502 |
enable_LCM = gr.Checkbox(
|
503 |
label="Enable Fast Inference with LCM", value=enable_lcm_arg,
|
504 |
-
info="LCM speeds up the inference step, the trade-off is the quality of the generated image. It performs better with portrait face images rather than distant faces",
|
505 |
)
|
506 |
style = gr.Dropdown(
|
507 |
label="Style template",
|
@@ -527,7 +527,7 @@ with gr.Blocks(css=css) as demo:
|
|
527 |
with gr.Accordion("Controlnet"):
|
528 |
controlnet_selection = gr.CheckboxGroup(
|
529 |
["pose", "canny", "depth"], label="Controlnet", value=["pose"],
|
530 |
-
info="Use pose for skeleton inference, canny for edge detection, and depth for depth map estimation. You can try all three to control the generation process"
|
531 |
)
|
532 |
pose_strength = gr.Slider(
|
533 |
label="Pose strength",
|
|
|
192 |
[
|
193 |
"./examples/musk_resize.jpeg",
|
194 |
"./examples/poses/pose2.jpg",
|
195 |
+
"a man flying through the sky on mars",
|
196 |
"Mars",
|
197 |
"(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
|
198 |
],
|
199 |
[
|
200 |
"./examples/sam_resize.png",
|
201 |
"./examples/poses/pose4.jpg",
|
202 |
+
"a man doing a silly pose wearing a suit",
|
203 |
"Jungle",
|
204 |
"(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, gree",
|
205 |
],
|
206 |
[
|
207 |
"./examples/schmidhuber_resize.png",
|
208 |
"./examples/poses/pose3.jpg",
|
209 |
+
"a man sitting in a chair",
|
210 |
"Neon",
|
211 |
"(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green",
|
212 |
],
|
|
|
433 |
description = r"""
|
434 |
<b>Official 🤗 Gradio demo</b> for <a href='https://github.com/InstantID/InstantID' target='_blank'><b>InstantID: Zero-shot Identity-Preserving Generation in Seconds</b></a>.<br>
|
435 |
|
436 |
+
We are organizing a Spring Festival event with HuggingFace from February 7 to February 25. You can now generate pictures of Spring Festival costumes. Happy Dragon Year 🐲! Share the joy with your family.<br>
|
437 |
|
438 |
How to use:<br>
|
439 |
+
1. Upload an image with a face. For images with multiple faces, we will only detect the largest face. Ensure the face is clearly visible without significant obstructions or blurring.
|
440 |
+
2. (Optional) You can upload another image as a reference for the face pose. If you don't, we will use the first detected face image to extract facial landmarks. If you used a cropped face in step 1, it is recommended to upload it to define a new face pose.
|
441 |
3. (Optional) You can select multiple ControlNet models to control the generation process. The default is to use the IdentityNet only. The ControlNet models include pose skeleton, canny, and depth. You can adjust the strength of each ControlNet model to control the generation process.
|
442 |
4. Enter a text prompt, as done in normal text-to-image models.
|
443 |
5. Click the <b>Submit</b> button to begin customization.
|
|
|
447 |
---
|
448 |
📝 **Citation**
|
449 |
<br>
|
450 |
+
If our work is helpful to you for your research or applications, please cite us via:
|
451 |
```bibtex
|
452 |
@article{wang2024instantid,
|
453 |
title={InstantID: Zero-shot Identity-Preserving Generation in Seconds},
|
|
|
458 |
```
|
459 |
📧 **Contact**
|
460 |
<br>
|
461 |
+
If you have any questions, please feel free to open an issue or reach out to us directly at <b>[email protected]</b>.
|
462 |
"""
|
463 |
|
464 |
tips = r"""
|
465 |
+
### Usage Tips for InstantID
|
466 |
+
1. If you're not satisfied with the similarity, try increasing the weight of "IdentityNet Strength" and "Adapter Strength."
|
467 |
2. If you feel that the saturation is too high, first decrease the Adapter strength. If it remains too high, then decrease the IdentityNet strength.
|
468 |
+
3. If text control is not as expected, decrease the Adapter strength.
|
469 |
+
4. If the realistic style is not good enough, visit our GitHub repo and use a more realistic base model.
|
470 |
"""
|
471 |
|
472 |
css = """
|
|
|
493 |
# prompt
|
494 |
prompt = gr.Textbox(
|
495 |
label="Prompt",
|
496 |
+
info="Give a simple prompt in order to achieve good face fidelity.",
|
497 |
placeholder="A photo of a person",
|
498 |
value="",
|
499 |
)
|
|
|
501 |
submit = gr.Button("Submit", variant="primary")
|
502 |
enable_LCM = gr.Checkbox(
|
503 |
label="Enable Fast Inference with LCM", value=enable_lcm_arg,
|
504 |
+
info="LCM speeds up the inference step, but the trade-off is the quality of the generated image. It performs better with portrait face images rather than distant faces.",
|
505 |
)
|
506 |
style = gr.Dropdown(
|
507 |
label="Style template",
|
|
|
527 |
with gr.Accordion("Controlnet"):
|
528 |
controlnet_selection = gr.CheckboxGroup(
|
529 |
["pose", "canny", "depth"], label="Controlnet", value=["pose"],
|
530 |
+
info="Use pose for skeleton inference, canny for edge detection, and depth for depth map estimation. You can try all three to control the generation process."
|
531 |
)
|
532 |
pose_strength = gr.Slider(
|
533 |
label="Pose strength",
|