nsfw-image-check-comfyui

nsfw-image-check-comfyui
★ 9

NSFW检测图像过滤ComfyUI节点不当内容屏蔽
检测并屏蔽图像中的不当内容,检测到则输出警告图像或标注不当区域,便于在ComfyUI流程中自动过滤敏感图像。
💡 在ComfyUI流水线中自动屏蔽和标注不当图像。
🍴 1 Forks💻 Python🔄 2026-01-20
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/9d76119b2ef2
📦 requirements.txt
numpy
opencv-python
pillow
typing
onnxruntime
torchvision
img0.png
img2.png
📄 README
  • English version
  • 中文版本
  • nsfw-image-check-comfyui

    The plugin is currently stable, so it hasn’t been updated.

    Installation

    git clone https://github.com/fallingmeteorite/nsfw-image-check-comfyui.git
    
    cd nsfw-image-check-comfyui
    
    pip install -r requirements.txt
    

    or

    comfy node registry-install nsfw-image-check-comfyui

    Node Introduction

    Node Name:Nsfw Image Check Node

    Block inappropriate content in images and output a warning image

    Node Name:Nsfw area coverage

    Filter out inappropriate content and output

    Parameter Explanation

    image_requires_in Input the chart. Usually, VAE decoding or image loading follows.

    image_requires_out Used for outputting images, filtering can be done by outputting the original image or the warning

    image.

    custom_image_out Custom images used to replace images that trigger detection (optional)

    corresponding_filter_entries Output the filters triggered by the automatic check mode (optional)

    corresponding_filter_entries: Used to indicate the filters that have been triggered

    enabled_check: Enable detection?

    xxxx threshold: Threshold for triggering detection. The lower the threshold, the stronger the effect, range (0~1)

    xxxx enabled: Whether to enable this type of detection during the testing period (effective when filter_choose is

    set to auto_nsfw_check)

    filter_choose: Which filters are enabled when auto_nsfw_check is selected will run all filters where xxxx enabled

    is True.

    The images you want to replace are placed in the img folder, with the file extension .jpg, and the file names need

    to be changed to sequential numbers.

    Reference library

    Libraries used: https://github.com/deepghs/imgutils

    Since the code only requires some functions of this library, installing it would need a large number of dependencies,

    which somewhat goes against my expectation for it to be lightweight. Therefore, I only kept the necessary code and

    removed the online download feature. The model has been downloaded to the plugin folder.

    Thanks to this library for completing the core processing part.