krita-ai-diffusion
krita-ai-diffusion copied to clipboard
Activate NSFW filter?
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.
There's nothing implemented at the moment. I doubt any model or lora is safe. I think usually people use
- a list of banned words/expressions which are filtered from the prompt
- 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:
- https://huggingface.co/spaces/5m4ck3r/nsfw_image_detection
- https://huggingface.co/spaces/aka7774/safetychecker
- https://nudenet.notai.tech/
Thank you very much for answering this fast. I'll give it a try.
I found this plugin for comfyui but dont know how to implement it: https://github.com/42lux/ComfyUI-safety-checker
some authors make SFW models. you can find them and try. SFW
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.
You can setup a negative prompt to disallow certain things
Done, release v1.21.0
Uses https://huggingface.co/CompVis/stable-diffusion-safety-checker - the others only worked on the most obvious images. This one seems quite robust especially in "Strict" mode, although at that point it does filter out quite a few innocent images too.
There's always the chance something slips through, especially if you're really trying to get around it.