百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

ComfyUI-Forbidden-Vision

> 编程语言
开源

对ComfyUI进行可靠的面部检测、分化和增强,采用经过定制的模型,这些模型在动感、现实主义、极端姿势和隔离等方面都发挥作用.

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

对ComfyUI进行可靠的面部检测、分化和增强,采用经过定制的模型,这些模型在动感、现实主义、极端姿势和隔离等方面都发挥作用.

⚡ What Makes It Different

Built as a modern replacement for ADetailer and Impact Pack's FaceDetailer, Forbidden Vision doesn't rely on general-purpose models. Instead, it ships three models trained from scratch on hand-curated data — purpose-built for face work across styles, content types, and edge cases that other tools struggle with.

  1. Detection & Segmentation — consistent across real, anime, and NSFW; handles extreme poses and heavy occlusion
  2. Neural Corrector — analyzes and fixes exposure, black levels, and color automatically

Quick Start

  1. Install via ComfyUI Manager (search "Forbidden Vision") or manually
  2. Load the example workflow from comfyui_workflows/Forbidden_Vision_Full_All_In_One.json
  3. Enable groups one at a time using the Fast Group Bypasser:
    • Start with just Builder enabled to find your composition
    • Add Refiner to enhance colors and lighting
    • Enable Second Pass for detail refinement
    • Turn on Face Fix if needed
  4. Adjust and iterate - tweak settings in each node as you refine

Models download automatically on first run from HuggingFace. This may take a minute.

✨ What's Included

Core Suite

  • Fixer – Face detection, restoration, and context-aware inpainting
  • Refiner – Automatic enhancement with tone correction, upscaling, and effects
  • Builder – First-pass sampling with adaptive CFG and self-correction

Versatile Tools

  • Inpainter – The Fixer's blending engine in a manual inpainting node
  • Rebuilder – Basic ksampler with integrated VAE decoding
  • Fixer Mask – Outputs masks from the detection models
  • Settings – Simple output for samplers/schedulers

Fixer Node

The Fixer node replaces complex face restoration workflows with a single, reliable node solution. Using 2 custom trained models for detection and mask segmentation you get consistent results with fast performance. Works with both realistic and anime styles for any level of face modification.

Note: While the detection and segmentation models are trained on thousands of images, edge cases and failures can still occur—especially with extreme stylization, heavy occlusion, or unusual compositions. If you encounter detection failures, report them via GitHub Issues. For NSFW images, upload to an external host (Catbox.moe, ImgBB, etc.) and share the link in your issue.

Key Features:

  • Face Detection and Masking: Custom trained YOLO11 and segmentation models optimized for mixed-domain content
  • NSFW friendly: Works reliably on all adult content without filtering or judgement.
  • Detail aware segmentation: Detects eyebrows, eyelashes, sunglasses etc. within the face to ensure best inpainting results
  • Context-Aware Inpainting: Crops detected faces, processes them at optimal resolution, and uses conditioned inpainting together with built in differential diffusion to match the original image's lighting and style.
  • Flexible Prompt Control: Add details to existing prompts, replace prompts entirely, or exclude specific tags just for face processing.
  • AI Pre-Upscaling: Upscale small faces with AI models before processing for better detail in the final result.
  • Smart Blending: Applies automatic color correction and feathered mask blending for seamless integration with the original image
  • Wildcard Per-Face Prompting: Use [SEP] to assign different prompts to each detected face, with ordering control ([ASC], [DSC], [ASC-SIZE], [DSC-SIZE]) and [SKIP] to leave specific faces untouched. Works in both positive and negative prompts. Inspired by Impact Pack's wildcard syntax for easy migration.

Refiner Node

The Refiner automatically fixes common image problems: flat lighting, washed out colors, weak contrast—without manual tweaking. A trained model analyzes your image and applies the right corrections, plus optional AI upscaling and depth of field effects.

Tip: Works great as a pre-pass before your second sampling stage for cleaner, more polished results.
Also perfect as a standalone one-click enhancer.

Key Features:

  • Smart Auto-Correction: Trained on curated examples to recognize and fix tone/color problems automatically—lifts muddy shadows, corrects washed highlights, and balances colors intelligently
  • Highlight Clipping Correction: Ensures highlights or shadows don't go overboard
  • AI Upscaling & Detail Enhancement: Includes model-based upscaling and intelligent sharpening
  • Depth of Field Effects: Simulates depth of field using depth maps
  • Dual Input/Output Support: Works with both latents and images, fitting anywhere in your workflow.

️ Builder and Rebuilder Node

First-pass and second-pass sampling nodes with integrated useful features to reduce clutter.

Key Features:

  • Adaptive CFG Scheduling: Three CFG modes — Constant, Linear, and Ease Down — for dynamic guidance control across sampling steps.
  • Self-Correction: A final 2 step polish pass that automatically refines the generated image with minimal denoising of 0.05 for cleaner results.
  • Resolution Presets: Built-in SDXL, SD1.5 and other optimal resolution presets, plus custom sizing.
  • Integrated VAE Decoding: Automatically outputs both latent and decoded image when VAE is connected.

⚙️ Installation

Via ComfyUI Manager

  1. Open ComfyUI Manager
  2. Click Install Custom Nodes
  3. Search for Forbidden Vision and click Install
  4. Restart ComfyUI

Manual Install

bash
cd ComfyUI/custom_nodes
git clone https://github.com/luxdelux7/ComfyUI-Forbidden-Vision.git
cd ComfyUI-Forbidden-Vision

# For ComfyUI portable:
..\..\..\python_embeded\python.exe -m pip install -r requirements.txt

# For standard Python:
pip install -r requirements.txt

Then restart ComfyUI.


[ Upscale Models ]

Use any upscale model you prefer, however for both speed and quality I found Phhofm models to be great, specifically:

For Fixer:

  • 4xBHI_realplksr_dysample_real

For Builder:

  • 2xBHI_small_realplksr_small_pretrain

Generally, for faces you want a 4x model, and for the refiner (if using before second pass sampling) you want around 2x for speed, but feel free to use what you prefer.


[ Fixer Settings ]

Core Sampling

  • The sampling options are the same as the core ksampler. I set euler_ancestral with sgm_uniform as default as that is usually what I use with most SDXL based models.
  • For general fixing denoise_strength of between 0.2 - 0.4 at even 8 steps will usually give decent results but I prefer to go higer
  • With low denoise CFG doesn't impact the generation that much, but keep it moderate to be on the safe side -> default of 3 is good.
  • If you want bigger changes, the node will do well even up to 0.9 denoise (depending on image) however for such cases you'll probably want to modify the prompts and maybe use a different scheduler like beta

Face Selection & Processing

face_selection
0 = process all detected faces. Set 1 or higher to target a specific detected face in order (e.g., the closest face or the one you want edited).

detection_confidence
YOLO’s confidence threshold for face detection. 0.75 works for about 90% of images. Strong detections typically fall between 0.86–0.90+. Lower only if your image has extreme stylization or very small faces.

manual_rotation
Useful for images where faces appear at unusual angles (including upside-down). The node rotates the face for optimal processing and automatically rotates it back during blending.

processing_resolution
The 1:1 square resolution used for cropping the detected face during sampling (default: 1024). Adjust based on the resolution sweet-spot of your model. Higher = more detail, but also more VRAM and time.

enable_pre_upscale
Pre-upscales the cropped face region before feeding it into sampling. This improves detail restoration on low-resolution faces. Enabled by default and recommended for most workflows.

upscaler_model
Choose between Bicubic/Lanczos (fast Python scaling) or an AI upscaler (recommended: 4×). AI models give sharper and more stable facial details.

crop_padding
Determines how much surrounding context is included around the face (default: 1.6). More padding = better inpainting consistency, since the model sees more of the original image’s lighting and style.


Prompting

CLIP input must be connected for these options to work.

face_positive_prompt / face_negative_prompt
Tags added here are prepended to the connected conditioning. Great for adding or guiding face details without altering the global prompt.

replace toggles
Instead of adding tags, these toggles completely replace the connected conditioning for the face sample. Useful when you want full control over the facial generation prompt.

exclusions
Removes specific tags from the positive conditioning. Ideal for removing unwanted traits (e.g., “smile”, “angry”, “glasses”) while keeping the rest of your prompt intact.

Per-Face Wildcard Prompting

Assign different prompts to individual detected faces using Impact Pack-inspired wildcard syntax. Works in both face_positive_prompt and face_negative_prompt.

Basic syntax:
Use [SEP] to separate prompts for each face: detailed eyes, sharp focus [SEP] soft skin, gentle expression [SEP] angry, scarred

Face 1 gets the first segment, face 2 the second, and so on. If there are more faces than segments, extra faces reuse the last segment.

Ordering tags:
Place one of these at the very start of the prompt to control which face gets which segment:

  • [ASC] — Left-to-right, top-to-bottom (default when using [SEP])
  • [DSC] — Right-to-left, bottom-to-top
  • [ASC-SIZE] — Smallest face first
  • [DSC-SIZE] — Largest face first

Example: [DSC-SIZE] detailed eyes, hero character [SEP] soft focus, background character The largest face gets "detailed eyes, hero character" and the next largest gets "soft focus, background character".

Skipping faces:
Use [SKIP] to leave a face unprocessed: [ASC] beautiful eyes [SEP] [SKIP] [SEP] freckles Face 1 and 3 are processed, face 2 is left untouched.

Notes:

  • When wildcard syntax is detected, face_selection is automatically overridden to process all faces.
  • [SKIP] in either the positive or negative prompt will skip that face entirely.
  • If only one prompt uses [SEP] syntax, the other prompt applies its full text to all faces normally.
  • Ordering is determined by the positive prompt. If only the negative prompt has an ordering tag, it controls ordering instead.

Blending & Masking

blend_softness
Applies subtle feathering to the blended region, improving the transition between the generated face and the original background.

mask_expansion
Uniformly expands the segmentation mask by a set number of pixels (default: 2). Helps avoid harsh transitions by including slightly more skin and edge detail.

sampling_mask_blur_size
The radius of the blur applied to mask edges (default: 21). Larger values create a wider falloff area around the mask border.

sampling_mask_blur_strength
Determines how strongly the blur is applied (default: 1.0). Higher values further soften the mask edge for more natural blending.


Major Toggles

enable_color_correction
Analyzes the entire image’s tone and lighting, then adjusts the newly sampled face to match it.

enable_lightness_rescue
An

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythoncolor-gradingcomfyuicomfyui-workflowface-detection

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言