dmarx / video-killed-the-radio-star

Notebook and tools for end-to-end automation of music video production with generative AI
https://colab.research.google.com/github/dmarx/video-killed-the-radio-star/blob/main/Video_Killed_The_Radio_Star_Defusion.ipynb#scrollTo=oPbeyWtesAoh
MIT License
198 stars 35 forks source link

Option to regen if nsfw filtered #104

Closed dmarx closed 1 year ago

dmarx commented 1 year ago

Can just sum over pixels to see if frame is black

SchmitzAndrew commented 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.

dmarx commented 1 year ago

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

SchmitzAndrew commented 1 year ago

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.