ComfyUI > Nodes > zhangp365/ComfyUI-utils-nodes > detector for the NSFW

ComfyUI Node: detector for the NSFW

Class Name

DetectorForNSFW

Category
utils/filter
Author
zhangp365 (Account age: 408days)
Extension
zhangp365/ComfyUI-utils-nodes
Latest Updated
2024-10-16
Github Stars
0.03K

How to Install zhangp365/ComfyUI-utils-nodes

Install this extension via the ComfyUI Manager by searching for zhangp365/ComfyUI-utils-nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter zhangp365/ComfyUI-utils-nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

detector for the NSFW Description

Automatically detect and filter NSFW content from images using advanced machine learning models for a clean image processing pipeline.

detector for the NSFW:

The DetectorForNSFW node is designed to help you automatically detect and filter out Not Safe For Work (NSFW) content from images. This node leverages advanced machine learning models to identify explicit content, ensuring that your image processing pipeline remains clean and appropriate for all audiences. By integrating this node into your workflow, you can automatically replace detected NSFW content with a placeholder image or simply flag it for review, thus maintaining a safe and professional environment. This node is particularly useful for AI artists and developers who need to manage large volumes of images and want to ensure that their content adheres to community guidelines and standards.

detector for the NSFW Input Parameters:

image

This parameter accepts the image or a batch of images that you want to analyze for NSFW content. The images should be in a tensor format, which is a common data structure used in machine learning for handling multi-dimensional arrays. The quality and resolution of the input images can impact the accuracy of the detection.

model_name

This optional parameter specifies the name of the model to be used for NSFW detection. If not provided, a default model will be used. The model name should correspond to a pre-trained NSFW detection model available in your system. The choice of model can affect the detection accuracy and performance.

detect_size

This parameter defines the resolution at which the images will be processed for detection. The default value is 320, but you can adjust it based on your needs. Higher resolutions may provide more accurate results but will require more computational resources.

provider

This parameter specifies the computational provider to be used for running the model. The default value is "CPU", but you can also use other providers like "GPU" if available. Using a GPU can significantly speed up the detection process.

alternative_image

This optional parameter allows you to specify an alternative image that will replace any detected NSFW content. If not provided, a default placeholder image (a white image) will be used. This can be useful for maintaining the visual integrity of your content while filtering out inappropriate material.

**kwargs

This parameter allows you to pass additional keyword arguments that can fine-tune the detection process. For example, you can specify confidence levels for different types of NSFW content, such as female_genitalia_exposed=0.9, to control the sensitivity of the detection.

detector for the NSFW Output Parameters:

result_tensor

This output parameter provides the processed images in tensor format. If NSFW content is detected, the corresponding images will be replaced with the alternative image or the default placeholder image. This allows you to seamlessly integrate the filtered images into your workflow.

result_info

This output parameter provides detailed information about the detection results in JSON format. It includes the detection results for each image, indicating whether NSFW content was found and providing confidence scores for the detected content. This information can be used for logging, auditing, or further processing.

detector for the NSFW Usage Tips:

  • Ensure that your input images are in the correct tensor format to avoid processing errors.
  • Use a high-quality, pre-trained model for better detection accuracy.
  • Adjust the detect_size parameter based on your computational resources and the required accuracy.
  • Specify an appropriate provider to optimize the detection speed, especially if you have access to a GPU.
  • Use the alternative_image parameter to maintain the visual consistency of your content when NSFW content is detected.

detector for the NSFW Common Errors and Solutions:

"Model not found"

  • Explanation: The specified model name does not correspond to any available pre-trained models in your system.
  • Solution: Ensure that the model name is correct and that the model is available in the specified directory.

"Invalid image format"

  • Explanation: The input image is not in the required tensor format.
  • Solution: Convert your images to tensor format before passing them to the node.

"Detection size too large"

  • Explanation: The specified detection size exceeds the computational capabilities of your system.
  • Solution: Reduce the detect_size parameter to a lower value that your system can handle.

"Provider not supported"

  • Explanation: The specified computational provider is not supported or not available on your system.
  • Solution: Check the available providers on your system and specify a supported one, such as "CPU" or "GPU".

detector for the NSFW Related Nodes

Go back to the extension to check out more related nodes.
zhangp365/ComfyUI-utils-nodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.