This face detector is used in the default workflow. It's built directly into the stable-diffusion-webui, so no additional software installation is required, reducing the chance of operational issues.
This component is implemented using facexlib/detection.
- RetinaFace
- Advanced Options - (1) Face Detection - Face detection confidence
- N/A
- tag: "face"
- attributes: N/A
- landmarks: 5 (both eyes, the nose, and both ends of the mouth)
This face detector is designed specifically for anime/manga faces.
This component is implemented using lbpcascade_animeface.
- lbpcascade_animeface
- N/A
min_neighbors
(integer, default: 5): Specifies the minimum number of neighboring rectangles that make up an object face. A higher number results in fewer detections but higher quality, while a lower number improves detection rate but may result in more false positives.
- tag: "face"
- attributes: N/A
- landmarks: N/A
This is the implementation used for enhancing enlarged face images in the default workflow.
- img2img
- Prompt for face
- Advanced Options - (3) Recreate the Faces - Denoising strength for face images
pp
(string): positive prompt.np
(string): negative prompt.
This face processor applies a Gaussian blur to the detected face region. The intensity of the blur can be specified using the radius
parameter in the 'params' of the JSON configuration. The larger the radius, the more intense the blur effect.
- Blur
- N/A
radius
(integer, default: 20): The radius of the Gaussian blur filter.
This face processor does not apply any processing to the detected faces. It can be used when no face enhancement or modification is desired, and only detection or other aspects of the workflow are needed.
- NoOp
- N/A
- N/A
This operates as the Mask Generator in the default workflow. Similar to RetinaFace Face Detector, it's integrated into the stable-diffusion-webui, making it easy to use without the need for additional software installations. It generates a mask using a deep learning model (BiSeNet) based on the face area of the image. Unique to BiSeNet, it can recognize the "Affected areas" specified by the user, including 'Face', 'Hair', 'Hat', and 'Neck'. This option will be invalid with other mask generators. It includes a fallback mechanism where if the BiSeNet fails to generate an appropriate mask, it can fall back to the VignetteMaskGenerator
.
This component is implemented using facexlib/parsing.
- BiSeNet
- Use minimal area (for close faces)
- Affected areas
- Mask size
fallback_ratio
(float, default: 0.25): Extent to which a mask must cover the face before switching to the fallback generator. Any mask covering less than this ratio of the face will be replaced by a mask generated by the Vignette MaskGenerator`.
This mask generator creates a mask by applying a Gaussian (circular fade-out effect) to the face area. It is less computationally demanding than deep-learning-based mask generators and can consistently produce a mask under conditions where deep-learning-based mask generators such as BiSeNet or YOLO may struggle, such as with unusual face orientations or expressions. It serves as the fallback mask generator for the BiSeNet Mask Generator when it fails to generate an appropriate mask.
- Vignette
- Use minimal area (for close faces)
sigma
(float, default: -1): The spread of the Gaussian effect. If not specified or set to -1, a default value of 120 will be used whenuse_minimal_area
is set to True, and a default value of 180 will be used otherwise.keep_safe_area
(boolean, default: False): If set to True, a safe area within the ellipse around the face will be preserved entirely within the mask, preventing the fade-out effect from being applied to this area.
This option draws an ellipse around the detected face region to generate a mask.
- Ellipse
- Use minimal area (for close faces)
- N/A
This is a simplistic implementation that uses the detected face region as a direct mask.
- Rect
- N/A
- N/A
This option generates a "mask" that is simply an all-white image of the same size as the input face image. It essentially does not mask any part of the image and can be used in scenarios where no masking is desired.
- NoMask
- N/A
- N/A