Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
GNU General Public License v3.0
5.62k stars 247 forks source link

Activate NSFW filter? #656

Open The-unknown-Shadowman opened 2 months ago

The-unknown-Shadowman commented 2 months ago

Hi. I want to use Krita and the AI Diffusion plugin in youthwork with children. Is there a switch, model or lora or anything else to activate NSFW secure filters? Negative prompts dont help. Some curious kids bypass negative prompts.

Thx.

Acly commented 2 months ago

There's nothing implemented at the moment. I doubt any model or lora is safe. I think usually people use

  1. a list of banned words/expressions which are filtered from the prompt
  2. an image classification model which runs on the generated output and determines if it's safe

Ideally both. Depending with choice of classification model you will likely always either have things slip through, or end up with quite a few false positives, but that might be okay.

It's probably not difficult to integrate, but I don't have much time to search for good filter lists or models at the moment. There are some you can try online:

  1. https://huggingface.co/spaces/5m4ck3r/nsfw_image_detection
  2. https://huggingface.co/spaces/aka7774/safetychecker
  3. https://nudenet.notai.tech/
The-unknown-Shadowman commented 2 months ago

Thank you very much for answering this fast. I'll give it a try.

The-unknown-Shadowman commented 2 months ago

I found this plugin for comfyui but dont know how to implement it: https://github.com/42lux/ComfyUI-safety-checker

Drakosha405 commented 2 months ago

some authors make SFW models. you can find them and try. SFW

Acly commented 2 months ago

I found this plugin for comfyui but dont know how to implement it: https://github.com/42lux/ComfyUI-safety-checker

Yea that uses the model from 2. link I posted. There is a node for option 1. too, but not sure which is better.

NeoLoger commented 2 weeks ago

You can setup a negative prompt to disallow certain things