ComfyUI Face Detailer Workflow for NSFW Faces
Fix AI-generated faces in NSFW images. Impact Pack face detailer node setup, YOLO models, denoise settings, multi-pass restoration.
Faces in NSFW generations break in characteristic ways. The body comes out perfect, the composition is dialed in, then you zoom to the face and it looks like a Picasso painting. This happens because SDXL family models allocate latent-space resolution unevenly across the canvas. When the body fills most of the frame, the face gets a tiny number of pixels worth of attention during sampling. Face Detailer fixes this by cropping the face region, upscaling it, regenerating just that area at high resolution, and stitching it back. The result is photoreal NSFW where the face actually looks like a person. I have used this workflow on every production image for the past 18 months. Here is the exact setup.
Quick Answer: Install ComfyUI-Impact-Pack from the ComfyUI Manager. Download face_yolov8m.pt as the detection model. Build a chain of KSampler → VAEDecode → FaceDetailer with denoise around 0.4-0.5 for NSFW work. Run a second pass at lower denoise (0.3) for portraits. Add a face LoRA inside the FaceDetailer node for character consistency.
- Install ComfyUI-Impact-Pack and the Impact-Subpack via ComfyUI Manager, then download face_yolov8m.pt for detection and sam_vit_b_01ec64.pth for segmentation.
- FaceDetailer crops the face, upscales, regenerates, and stitches back. The default denoise of 0.5 is fine for most use cases but NSFW often needs 0.4-0.45.
- Adding a face LoRA inside the FaceDetailer node provides character consistency without affecting body proportions.
- Multi-pass detailing (first pass aggressive, second pass conservative) reliably fixes the harder cases where one pass is insufficient.
- PyTorch 2.6+ requires the weights_only=False workaround for YOLO models. The Impact-Subpack ships with a patched loader.
- For zero-setup NSFW face restoration, lewdly.ai runs this pipeline automatically.
Why NSFW Faces Break First
Look, the reason this happens is not mysterious if you understand how the model thinks about composition. SDXL family models work on a 128x128 latent grid (which decodes to 1024x1024 pixel output). Every detail in your image has to fit in that grid. When your prompt asks for a full-body NSFW scene, the body fills most of the frame, and the face occupies maybe a 12x12 region of the latent grid. That is 144 latent pixels of attention budget for the entire face. Compared to 1,000+ latent pixels for the body. The face is undersampled at the structural level.
You see the symptoms as. Eyes that do not match each other. Teeth that look like a horror movie. Skin texture that does not match the body's skin texture. Lips that are subtly wrong. Hair that lacks the detail it should have. None of this is a model failing. It is a resolution allocation problem, and Face Detailer solves it by giving the face its own dedicated generation pass at a higher effective resolution.
The same problem exists in non-NSFW work, which is why ADetailer (the A1111 equivalent) became required equipment for any photoreal generation. For NSFW specifically the problem is worse because:
- Body-focused compositions push the face further from frame center
- More body coverage in frame means less face coverage
- Most NSFW checkpoints have less attention training on face features than portrait checkpoints
- Multi-subject scenes amplify the problem because each face gets even less attention
Face Detailer is not optional for NSFW production work in 2026. Anyone shipping output without it is shipping worse-than-necessary faces.
Installing Impact Pack and YOLO Models
Setup is straightforward but has a few gotchas worth knowing. The flow is:
- Open ComfyUI Manager
- Search for "ComfyUI-Impact-Pack" and install
- Search for "ComfyUI-Impact-Subpack" and install (you need both)
- Restart ComfyUI
- Download the detection and segmentation models
The Impact-Subpack is the part most tutorials skip. It contains the UltralyticsDetectorProvider that loads YOLO models, while Impact-Pack itself contains the FaceDetailer node. Both packages are required and both must be installed and current. If you only install Impact-Pack you will get cryptic errors about missing nodes.
For the detection model, you want face_yolov8m.pt. The "m" stands for medium and it offers the best balance of detection accuracy and speed for face-focused work. The smaller variant (face_yolov8s.pt) is faster but misses more faces in difficult compositions. The larger variants (l, x) are marginally more accurate but considerably slower.
For segmentation, use sam_vit_b_01ec64.pth. SAM (Segment Anything Model) creates a precise mask within the YOLO bounding box, which lets the detailer feather the regeneration smoothly into surrounding pixels. The "b" variant is the right balance of accuracy and speed for face work. The larger SAM variants (l, h) are overkill for face detailing.
Download paths:
- face_yolov8m.pt: place in
ComfyUI/models/ultralytics/bbox/ - sam_vit_b_01ec64.pth: place in
ComfyUI/models/sams/
If you cannot use ComfyUI Manager (some restricted environments block it), you can install manually by cloning the repos into ComfyUI/custom_nodes/ and running the install scripts. Make sure the directories have write permissions or the install will fail silently.
A 2026-specific gotcha. PyTorch 2.6 introduced weights_only=True as the default for torch.load(), which breaks YOLO model loading because Ultralytics models contain Python objects that the secure loader rejects. The Impact-Subpack has a workaround that explicitly sets weights_only=False for trusted YOLO model paths, but if you see an UnpicklingError on startup, your Impact-Subpack version is too old. Update through the ComfyUI Manager and the error should clear.
Building the Face Detailer Node Chain
The basic Face Detailer workflow is a simple linear chain. Start with your normal text-to-image pipeline (CLIP encode, KSampler, VAEDecode), and append the FaceDetailer node after the VAEDecode. Connect inputs:
- image: from your VAEDecode output
- model: from your CheckpointLoader (same model used in main generation)
- clip: from your CheckpointLoader
- vae: from your CheckpointLoader
- positive: your positive prompt (usually same as main)
- negative: your negative prompt (usually same as main)
- bbox_detector: from UltralyticsDetectorProvider loading face_yolov8m.pt
- sam_model_opt: from SAMLoader loading sam_vit_b_01ec64.pth (optional but recommended)
The FaceDetailer node has a lot of parameters but only a handful actually matter for everyday use:
- bbox_threshold: 0.5 (default). Lower it to 0.3 if it misses faces in low-light scenes.
- bbox_dilation: 10 (default). Increases the crop region around detected face. Higher values give more context for the regeneration but waste time.
- bbox_crop_factor: 3 (default). The face crop is upscaled by this factor before regeneration. 3 means a 100px face becomes 300px, gets regenerated, then shrunk back.
- denoise: 0.5 (default). This is the big one. Discussed in detail below.
- feather: 5 (default). Edge feathering for the mask. Smooths the seam between regenerated face and original image.
- sam_dilation_factor: 10 (default). Expands the SAM segmentation mask. Higher values include more surrounding pixels.
For NSFW work specifically, the settings I have settled on after a lot of iteration:
- bbox_threshold: 0.4 (catches faces in harder compositions)
- bbox_dilation: 12 (slightly more context helps NSFW faces)
- bbox_crop_factor: 3 (default is right)
- denoise: 0.42 (lower than default; see next section)
- feather: 8 (slightly more feathering for cleaner stitching)
- sam_dilation_factor: 10 (default is right)
These are starting points. Tune to your specific model and prompt style.
Denoise and CFG for NSFW Faces
Denoise is the parameter that most people get wrong on Face Detailer. The default of 0.5 is meant for general use. For NSFW work where you want the regenerated face to match the body's skin tone and lighting, lower denoise produces cleaner output.
Free ComfyUI Workflows
Find free, open-source ComfyUI workflows for techniques in this article. Open source is strong.
The denoise tradeoff:
- 0.6-0.7: Major face changes. Use for fixing very broken faces but risks character drift.
- 0.5: Default. Balances fix quality and consistency.
- 0.4-0.45: Subtle fixes. Maintains character identity. Best for production NSFW.
- 0.3: Minor refinement only. Use as second pass after a 0.4-0.5 first pass.
- 0.2 and below: Almost no change. Skip the detailer at this level.
For most NSFW work, the right pattern is a single pass at 0.42. That cleans up the structural face problems (mismatched eyes, weird teeth, broken proportions) without changing the character identity that your prompt and LoRAs established. If the first pass is not enough, run a second pass at 0.3 to refine further.
CFG inside FaceDetailer should match or slightly exceed your main generation CFG. For RealVisXL workflows I use CFG 7 for main generation and CFG 7-8 for the face detailer. For Pony Realism I use CFG 5 for main generation and CFG 5-6 for face detailer. Higher CFG in face detailer can over-emphasize prompt tokens (like "beautiful eyes") which leads to anime-like exaggerated features on photoreal output. Avoid pushing it too high. The model choice between these affects detailer settings noticeably and I cover both in the Pony Realism vs RealVisXL comparison.
Sampler choice inside FaceDetailer matters less than it does for the main generation. DPM++ 2M Karras at 20 steps works for most face detailing. Lowering steps below 20 starts to show in face detail quality.
Adding LoRA Inside Face Detailer
Here is the trick that took me embarrassingly long to learn. The FaceDetailer node has its own model input, which means you can pass it a different model graph than your main generation uses. The most useful application of this is loading a face-specific LoRA inside the detailer that does not affect your main generation.
The pattern:
- Main generation: CheckpointLoader → KSampler → VAEDecode
- Face detailer: CheckpointLoader → LoraLoader (face LoRA) → connect to FaceDetailer.model
The face LoRA gets applied during the face regeneration pass only. This is useful when:
- You have a character LoRA that helps with face consistency but messes up bodies at full strength
- You want photoreal skin detail LoRAs applied only to faces, not to backgrounds
- You are doing character-consistent NSFW where the face needs to match a reference across many images
For character consistency specifically, this is a more reliable approach than running a character LoRA on the full generation. The character LoRA gets the full sampling budget on the face region, where it matters, while the body is generated without the LoRA's body-shape biases.
Want to skip the complexity? Lewdly gives you professional AI results instantly with no technical setup required.
LoRA weight inside FaceDetailer typically wants to be at full strength (0.8-1.0) because the face has limited resolution to work with and you want the LoRA's signal to come through clearly. If you are stacking multiple LoRAs (a face LoRA and a detail LoRA), my LoRA stacking guide covers the weight balancing patterns.
Multi-Pass for Group Scenes
Single-face workflows are easy. Multi-face workflows need slightly more setup because the detector finds all faces and processes them as a batch, but the parameters apply uniformly. If you have one well-lit face and one shadowed face, the same denoise might be right for one and wrong for the other.
The fix is multi-pass detailing with different settings per pass:
Pass 1: Aggressive detailing for problem cases (denoise 0.5, all faces) Pass 2: Conservative refinement for the cleanest version (denoise 0.3, all faces)
The two-pass pattern produces better results than any single-pass setting because pass 1 fixes the major structural problems and pass 2 polishes without introducing changes. Total time per image goes up about 30 percent (each pass adds ~3-5 seconds on an RTX 4090), but the quality lift is substantial for production work.
For multi-character NSFW scenes specifically, you can also run face detailer on a per-character mask. Use SAM to segment each character separately, then run face detailer on each masked region with character-specific LoRAs. This is more complex but lets you maintain multiple distinct character identities in the same image. The setup requires more nodes but the workflow stays linear.
Face Detailer Plus Upscale Pipeline
The complete production pipeline I use looks like this:
- Initial generation at 1024x1024 (or your base resolution)
- Face Detailer pass 1 at denoise 0.42
- (Optional) Hand detailer pass for hand fixes
- Upscale to 2048x2048 with a model upscaler (Ultrasharp 4x is my default)
- Face Detailer pass 2 at denoise 0.3 on the upscaled image
- (Optional) Detail enhancement pass on body texture
Steps 5 and 6 are where the magic happens for high-end production work. After upscaling, the face has more pixels to work with, and a low-denoise face detailer pass can add micro-detail (pores, eye reflections, hair strands) that was not possible at the lower resolution. This is the difference between "good AI image" and "photograph-grade AI image."
Earn Up To $1,250+/Month Creating Content
Join our exclusive creator affiliate program. Get paid per viral video based on performance. Create content in your style with full creative freedom.
Total generation time on an RTX 4090 for this full pipeline:
- Initial generation: 5-7 seconds
- Face detailer pass 1: 3-4 seconds
- Hand detailer: 4-5 seconds
- Upscale: 8-12 seconds
- Face detailer pass 2: 4-6 seconds (more pixels)
- Total: 24-34 seconds per image
That is a lot for a single image, but every step adds quality and the result is genuinely better than skipping any of them. For batch production, this becomes 100-150 images per hour. For one-off hero shots it is worth taking the time on each.
Workflow Download
The complete workflow JSON for this pipeline is straightforward to assemble from the nodes described above, but a few setup tips that save time:
- Use the Reroute node to keep your main model graph and face detailer graph visually separate
- Save the workflow as a template once it works (right-click → Save as template)
- Set defaults for the FaceDetailer parameters once and clone the node when you need multiple passes
- Keep the bbox_threshold low enough that you catch borderline detections but not so low you get false positives on body features
For people who do not want to assemble this from scratch, the ComfyUI Impact Pack GitHub repository has example workflows in the workflows folder. The basic_pipe example covers the standard setup. Community workflow sites like RunComfy host more elaborate setups including multi-pass and character-consistent variants.
If maintaining this workflow yourself sounds like work, fair. Lewdly.ai runs the equivalent pipeline automatically. The face detailing happens on every generation without the creator having to think about node graphs. For most NSFW creators whose business is content not infrastructure, that abstraction is the right level. Full disclosure I help build it.
Frequently Asked Questions
What denoise should I use in Face Detailer for NSFW? For most photoreal NSFW work, 0.42 is the sweet spot. The default 0.5 over-modifies faces and can drift from your intended character. Lower than 0.4 is too conservative to fix structural problems. Use 0.42 as your default and tune from there.
Why does FaceDetailer fail with UnpicklingError? PyTorch 2.6+ defaults to weights_only=True for torch.load(), which rejects the Python objects in YOLO models. Update Impact-Subpack to the latest version. The current version includes a patched loader that handles this correctly.
Can I run Face Detailer without SAM? Yes. The sam_model_opt input is optional. Without SAM you get a rectangular bbox mask instead of a precise segmentation. Quality is slightly lower because the regeneration affects more surrounding pixels than necessary, but the result is still usable for most cases.
Do I need a face LoRA for character consistency? Not strictly. If your prompt and seed are consistent, faces will be roughly consistent across generations. A face LoRA tightens this significantly. The LoRA-inside-FaceDetailer pattern I described gives the best results because the LoRA only affects the face region.
What is the difference between Face Detailer and ADetailer? ADetailer is the A1111/Forge equivalent of the same idea. ComfyUI's FaceDetailer (from Impact Pack) has more configuration options but works on the same principle. Both detect a face, crop, upscale, regenerate, and stitch it back. Quality is roughly equivalent. ComfyUI gives you more workflow control.
Should I run Face Detailer before or after upscaling? Both. Pass 1 before upscaling (fixes structural problems at low cost). Pass 2 after upscaling at lower denoise (adds detail to the higher-resolution face). This two-pass-around-upscale pattern is the production standard for high-end output.
Does Face Detailer work with Flux models? Yes. The FaceDetailer node is model-agnostic. It works with Flux, SDXL, Pony, and any other diffusion model that ComfyUI supports. Performance is slower on Flux because the underlying generation step is slower.
How do I prevent Face Detailer from changing the character's identity? Lower denoise (0.35-0.42), keep CFG modest (5-7), and avoid prompt tokens that change character features in the detailer's positive prompt. If you are using a character LoRA, apply it inside FaceDetailer at full strength to anchor identity.
Why does my Face Detailer output look over-smoothed? Too high denoise plus a model with a smooth-skin bias produces over-smoothed faces. Drop denoise to 0.4. Add "skin texture, pores, natural skin" to the positive prompt. Reduce any beauty-LoRA weights inside the detailer.
Can I detail hands with the same node? The Impact Pack ships with a hand_yolov8s.pt detection model and the same FaceDetailer node can target hands by swapping the bbox_detector input. There is also a dedicated HandDetailer in some Impact Pack versions. Both work similarly. Hand detailing typically wants higher denoise (0.5-0.6) than face detailing because the structural problems are more severe.
The Right Mental Model
Face Detailer is not a quality enhancer, it is a resolution allocator. The reason it works is that AI models have a fixed attention budget per pixel and face regions in body-focused compositions get starved. By cropping and regenerating, you give the face its own full attention budget at higher effective resolution. Once you internalize that, the right settings become obvious. Lower denoise preserves what the model already got right. Higher denoise fixes structural problems but risks character drift. Multi-pass is just running the budget twice with different priorities.
This workflow has been my default for production NSFW work for 18 months and it is genuinely the single biggest quality lift I have ever added to a pipeline. If you are not running Face Detailer on every photoreal NSFW image you generate, you are leaving a lot of quality on the table. The setup takes 30 minutes the first time. The quality difference is permanent.
Reference resources include the Impact Pack GitHub, the ComfyUI Wiki tutorial on Face Detailer, and ThinkDiffusion's published face detailer workflow which gives a clean visual reference for the node graph.
Ready to Create Your AI Influencer?
Join 115 students mastering ComfyUI and AI influencer marketing in our complete 51-lesson course.