How to Turn off Stable Diffusion Filter?

How to Turn off Stable Diffusion Filter?

Bypass the Stable Diffusion NSFW filter and access all content without restrictions. Explore our blog for details.

Introduction

In today’s digital age, it becomes essential to filter out potentially sensitive or explicit content, ensuring a safe experience for users. One such filter is the NSFW filter, which stands for “Not Safe for Work.”

In this blog, we will explore the stable diffusion NSFW filter, its concept, its importance, and how to activate or deactivate it. We will also discuss its practical applications and risks involved in turning off the filter. Let’s dive into it!

Understanding Stable Diffusion Filter

What is Stable Diffusion?

Stable Diffusion is an AI technique that involves the controlled diffusion of noise to create high-quality images. Leveraging the power of GPUs, Stable Diffusion models allow images to evolve, driven by a diffusion process. 

Importance

  • Protecting Sensitive Users: By implementing the NSFW filter, content platforms create a secure environment without explicit or inappropriate materials, protecting vulnerable individuals from potentially harmful content.
  • Ethical Considerations in AI: By adhering to ethical guidelines, content platforms with NSFW filters prevent the dissemination of potentially offensive or objectionable materials, ensuring that users are provided with the desired content while respecting ethical boundaries.

How Does it Work in Stable Diffusion?

  • Use of Classifiers: Stable Diffusion employs trained classifiers to analyze each image for certain characteristics that are typical of NSFW material.
  • Scoring System: It helps in determining the likelihood of the image being inappropriate.
  • Implementation in UI: Use it in the Stable Diffusion WEBUI to automatically replace potentially unsafe images with black images or provide a safer image generation model.

Exploring it in Stable Diffusion

Features

  • Automatic Content Detection
  • Background Operation: It operates silently in the background, ensuring that the user experience is not disrupted while the content is being monitored and filtered.
  • Black Image Replacement: When NSFW content is detected, the filter replaces the image with a black image, giving users a good experience.
  • User Control: Users have control over the NSFW filter, being able to define the sensitivity level and the types of content that are filtered.

Use Cases

  • Content Moderation
  • Artistic Freedom with Control: It allows artists and creators to have control over the type of content they generate, enabling them to produce adult content only in a controlled manner.
  • Parental Controls: It can serve as a form of parental control, preventing minors from accessing or generating adult content.
  • Avoiding Unwanted Exposure: It helps avoid unwanted exposure to sensitive content in shared environments like educational institutions, or public spaces.

How to Switch it in Stable Diffusion

Normally, the NSFW filter is enabled by default when you install Stable Diffusion. Well, you can directly download the Stable Diffusion WebUI from GitHub and set it up on your computer. Then, simply toggle the corresponding switch to enable the NSFW filter.

However, the Stable Diffusion you get this way is pre-set that you can’t adjust. To use Stable Diffusion more freely, you can consider integrating APIs into your project.

Step-by-Step Guide

Novita AI is committed to bringing a good experience to every user, so the original API it provides is the one with the NSFW filter enabled. 

  • Step 1: Visit the Novita AI website and create an account.
  • Step 2: Navigate to the “API” and find the one you want, like “Text to Image”.
  • Step 3: Obtain the API key and weave the API endpoints into your program using the right HTTP methods.

Precautions while Activating the NSFW Filter

  • Familiarize yourself with the platform’s policy regarding the use and customization of the NSFW filter.
  • Understand the implications of modifying filter settings, including potential impacts on content visibility and accessibility.
  • Take necessary steps to optimize content safety while ensuring a smooth user experience.

How to Turn Off Stable Diffusion NSFW Filter

Although NSFW filters have significant advantages, in actual application scenarios we may need to temporarily turn off the filter to generate some NSFW content. The APIs in Novita AI also allow you to do so. 

Steps to Deactivate

Let’s take the Text to Image API in Novita AI as an example.

  • Step 1: Navigate to “Text to Image” on its “API” page to get the API key.
  • Step 2: Use code samples to make requests including NSFW. When set enable_nsfw_detection true, NSFW detection will be enabled. Then you can set the level of nsfw_detection_level according to your needs.
  • Step 3: Use task_id to get images.

The example request is shown below. Please set the Content-Type header to application/json in your HTTP request to indicate that you are sending JSON data. Currently, only JSON format is supported.

curl --location 'https://api.novita.ai/v3/async/txt2img' \
--header 'Authorization: Bearer {{key}}' \
--header 'Content-Type: application/json' \
--data '{
    "extra": {
        "response_image_type": "jpeg",
        "enable_nsfw_detection": true,
        "nsfw_detection_level": 2
    },
    "request": {
        "prompt": "1girl,sexy",
        "model_name": "dreamshaper_8_93211.safetensors",
        "negative_prompt": "nsfw, bottle,bad face",
        "width": 512,
        "height": 512,
        "image_num": 4,
        "steps": 20,
        "seed": -1,
        "clip_skip": 1,
        "sampler_name": "Euler a",
        "guidance_scale": 7.5
    }
}'

Generating Images

After turning off the NSFW filter, you can use Stable Diffusion to generate an AI NSFW image.

Step 1: Navigate to “txt2img” in its “Playground”.

  • Step 2: Select a model you like from the list. Novita AI provides over 1000 models for you to choose from, including the newest Stable Diffusion 3 model.
  • Step 3: Enter the “Prompt” to describe what you want your images to be.
  • Step 4: Set the other parameters below, like the image size.

Risks involved in Turning off the NSFW Filter

It is important to carefully consider the risks before bypassing the NSFW filter and to ensure that appropriate safeguards are in place to mitigate any potential harm.

Liability and Responsibility

Users should proceed with caution and understand the potential implications of their actions, ensuring a responsible approach to the content they access.

Potential Misuse

Users should be vigilant about the potential misuse of original stable diffusion content after deactivation, including unnecessary watermarking and black image encounters.

Conclusion

In conclusion, while filter may provide certain benefits in specific scenarios, like artistic expression, there are also significant risks involved. Turning off the filter can expose sensitive users, potentially leading to harm or discomfort. Consider alternative approaches that may allow for a safer and more inclusive user experience.

Novita AI is the All-in-one cloud platform that empowers your AI ambitions. Integrated APIs, serverless, GPU Instance — the cost-effective tools you need. Eliminate infrastructure, start free, and make your AI vision a reality.