Closed dmarx closed 1 year ago
I would like to address this issue. My plan is to try regenerating the image a set amount of times before determining that the image is really NSFW.
There's a component in the diffusers pipeline object i think called "safety_classifier" or something like that which is what gets triggered and blocks the generation output. Check the docs, I think you might just need to pass an argument to get the safety classification status
I've added the parameter and am just determining whether or not the image returned is all black to determine whether or not the image should be regenerated n times.
I will finish testing tomorrow and make a PR for review.
Can just sum over pixels to see if frame is black