SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

Redrawing Faces Beautifully! How to Use Detailer and SAM3 Models [AI Image Generation, Image Recognition, Region Detection]


Updated August 1, 2026

On April 27, 2026, the functionality of the sam3.1_multiplex model was integrated into the core ComfyUI.

The sam3.1_multiplex model can be downloaded without entering contact information, and because it runs on default ComfyUI nodes, performance and stability have also been improved.

Moving forward, we recommend using the sam3.1_multiplex model instead of SAM 3.

How to use the sam3.1_multiplex model (with workflow)


Introduction

Hello, I am Kimama / Easygoing.

In this article, I will introduce the latest model for partially correcting illustrations using Detailer and how to use it.

What is Detailer?

Detailer is a feature that upscales and redraws parts of an illustration.

Original illustration before applying Detailer. A selfie image of two girls where the faces and hands are slightly rough.
Original
Illustration after redrawing the faces and hands with Detailer. A selfie image of two girls with improved details.
Redrawing faces and hands with Detailer

In image generation, if the subject being drawn is small, the rendering becomes inaccurate, but Detailer improves details by enlarging the subject to the model's recommended resolution and redrawing it.

Detailer is particularly effective for important parts or parts prone to failure in an illustration, such as faces and hands.

Image Recognition AI + Region Detection AI

When correcting illustrations with Detailer, we use two types of AI models: Image Recognition AI and Region Detection AI.

Flowchart of the combination of Image Recognition AI (CLIPSeg, YOLO, Florence-2) and Region Detection AI (SAM, SAM2) with SAM3.
Comparison of combinations of Image Recognition AI and Region Detection AI.

Among these, the AI used for detecting regions is the SAM model (Segment Anything Model) released by Meta.

The SAM model has evolved from SAM1 to SAM2, but the latest SAM3 model released on November 19, 2025, adds image recognition capabilities to its region detection model, making it possible to complete Detailer processing using SAM3 alone.

Example of image recognition and contour detection using the SAM3 model. Even the face photo on an ID card is accurately detected.
SAM3 model image recognition and region detection
Recognizing even the photo on an ID card as a "face"

Using SAM3 results in a single process, which increases speed and also improves accuracy.

SAM3 model download application

Now, let's look at how to actually use SAM3.

First, download the SAM3 model from the following Hugging Face page.

Hugging Face SAM3 model page. Showing contact information entry for download application.

When downloading the SAM3 model, you need to register for a Hugging Face account and enter your contact information to apply for the download.

Once your application is approved, you will receive an email notification within a few hours, and the model will be available for download.

Download sam3.pt

Once the model is available for download, download the sam3.pt model from the list.

List of SAM3 model files after approval on Hugging Face. Select sam3.pt to download.

Place the downloaded model into a newly created ComfyUI/models/sam3 folder.

SAM3 model workflow!

This is the workflow for redrawing faces and hands using the SAM3 model.

Overall view of the ComfyUI SAM3 Detailer workflow. Node configuration for redrawing faces and hands.

Models used

From here, we will look at the settings for each node in order.

Loading the SAM3 Model

First, load the model using the (down) Load SAM3 model node.

ComfyUI's Load SAM3 model node. Specify the path to sam3.pt in model_path.
  • model_path: Model path (folder and filename where it is placed)

If you placed sam3.pt in a folder other than the recommended one or changed the filename, enter the correct path in model_path.

Detecting Targets with the SAM3 Model

SAM3 text segmentation node uses the SAM3 model to detect targets and regions.

SAM3 text segmentation node. Settings for confidence_threshold, text_prompt, and max_detections.
  • confidence_threshold: Detection threshold

  • text_prompt: Detection target

  • max_detections: Maximum number of detections

Example of detecting a face photo on an ID card using SAM3. Confidence score 0.54
The detection accuracy for the face photo on the ID card is 0.54

A small number is shown at the top left of the target detected by the SAM3 model. By setting the confidence_threshold higher than this value, you can exclude uncertain targets from detection.

Enter the targets you want to detect in text_prompt, separated by commas.

max_detections is maximum number of detections, and setting it to -1 makes it unlimited.

Note that the following Masks Combine Batch node works to combine individually detected mask regions onto a single image.

Adjusting Mask Regions

The regions detected by the SAM3 model are slightly smaller than the actual regions, as if they are "filling the inside" rather than following the contours.

Left: Raw mask from SAM3 detection (inside the contours), Right: Natural mask region after adjustment with GrowMask and Image Matting
SAM3 model detection region | Adjusting the region with GrowMask and Image Matting
GrowMask and Image Matting nodes

Therefore, use the Grow Mask node to expand the region so that the target is completely included.

Furthermore, use the Image Matting node to correct the detection region by comparing it with the original image, which helps refine complex boundaries like hair so they blend in naturally.

Redrawing with Detailer

Next, based on the detected regions, use the Mask to Segs node to determine the actual area to be redrawn.

Mask to SEGS node and DetailerDebug node
  • combined (usually False)

    • Integrates all regions into one

  • crop_factor

    • Expands the crop area to provide margin around the subject

    • Example: If crop_factor = 3.0, it redraws an area 3 times the width and height of the region

  • drop_size

    • Exclude regions where the long side is less than or equal to drop_size from the redrawing target

Finally, pass this information to the Detailer (SEGS) node to perform the actual redrawing.

  • guide_size

    • Scale the region to this size for drawing

  • max_size

    • If the region is larger than this size, shrink it for processing

  • cycle

    • Number of repetitions for redrawing

  • noise_mask_feather (0-100)

    • Blur amount for the redrawing boundary

    • Smooths the boundary to reduce unnaturalness in the redrawing

guide_size to the model's recommended resolution, you can accurately redraw even small subjects.

For reference, the author's settings are as follows.

  • combined: False

  • crop_factor: 1.2

  • drop_size: 100

  • guide_size: 1024

  • max_size: 1024

  • cycle: 1

  • noise_mask_feather: 20

Actual Processing

The actual Detailer processing is as follows.

Original illustration before processing and face/hand detection by SAM3
Original | Detected by SAM3
Adjusted mask area
Mask area adjustment and actual mask region
Redrawn images of each region by Detailer
Redrawing
Completed illustration after Detailer processing. Faces and hands have been beautifully redrawn
Completion

Installing Custom Nodes

This workflow uses the following custom nodes.

ComfyUI-SAM3

ComfyUI-SAM3 custom node installation screen in ComfyUI Manager

ComfyUI-Impact-Pack

ComfyUI-Impact-Pack custom node installation screen in ComfyUI Manager

was-node-suite

was-node-suite custom node installation screen in ComfyUI Manager

ComfyUI-Image-Filters

ComfyUI-Image-Filters custom node installation screen in ComfyUI Manager

If any custom nodes are missing, please install them automatically when loading the workflow or install them individually using ComfyUI-Manager.

How to use ComfyUI-Manager

Summary: Let's try using the SAM3 model!

  • Segment Anything Model detects regions

  • SAM3 model is lightweight and highly accurate

  • Can complete Detailer processing

In this article, I introduced the SAM3 model.

There are multiple combinations of image recognition AI and region detection AI, and while it used to be difficult to decide which one to use, with the arrival of the SAM3 model, all use cases can now be completed with SAM3.

Application example of SAM3 and Detailer. A beautifully drawn anime-style girl's face
Eyes are clearly defined

SAM3 is easy to use and has a wide range of applications, and I believe it will become an essential skill for editing images using AI.

Why don't you all try using the now easier-to-operate SAM3 model to start with partial corrections of your illustrations?

Thank you for reading until the end!


Creator Introduction

Aoikari

Aoikari featured this article and covered SAM3 and Detailer.

They introduce many actual examples using image-to-image, which is very helpful.


Update History

2026.8.1

Added a note recommending the use of sam3.1_multiplex instead of SAM3.

2026.4.25

Changed the Japanese translation of Segmentation from Outline to Region.

2026.3.21

ComfyUI-SAM3 Added introduction of ComfyUI-Easy-Sam3 instead of

2025.12.28

ComfyUI-SAM3 Added introduction of comfyui_sam3 instead of


Model Introduction

mellow_pencil-XL-v1.0.0-base_clear


English Article


いいなと思ったら応援しよう!