1. Upload an image with a face. For images with multiple faces, we will only detect the largest face. Ensure the face is not too small and is clearly visible without significant obstructions or blurring.
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 use a cropped face at step 1, it is recommended to upload it to define a new face pose.
3. (可选)输入文本prompt提示词,就像所有文生图应用中所做的那样.
3. Enter a text prompt, as done in normal text-to-image models.
4. 点击 <b>Submit</b> 按钮开始定制.
4. Click the <b>Submit</b> button to begin customization.
5. 分享美图给你的好友吧, enjoy😊!
5. Share your customized photo with your friends and enjoy! 😊
face_file=gr.Image(label="Upload a photo of your face",type="filepath")
face_file=gr.Image(label="Upload a photo of your face",type="filepath")
# optional: upload a reference pose image
# optional: upload a reference pose image
pose_file=gr.Image(label="Upload a reference pose image (optional)",type="filepath")
pose_file=gr.Image(label="Upload a reference pose image (optional)",type="filepath")
# prompt
# prompt
prompt=gr.Textbox(label="Prompt",
prompt=gr.Textbox(label="Prompt",
info="Give simple prompt is enough to achieve good face fidelity",
info="Give simple prompt is enough to achieve good face fidelity",
placeholder="A photo of a person",
placeholder="A photo of a person",
value="")
value="")
submit=gr.Button("Submit",variant="primary")
submit=gr.Button("Submit",variant="primary")
enable_LCM=gr.Checkbox(
enable_LCM=gr.Checkbox(
label="Enable Fast Inference with LCM",value=enable_lcm_arg,
label="Enable Fast Inference with LCM",value=enable_lcm_arg,
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",
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",