Skip to content

Run any image through the Stable Diffusion content filter

License

Notifications You must be signed in to change notification settings

m1guelpf/cog-nsfw-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stable Diffusion NSFW Filter

Try it out | View on Replicate

This repo contains a modified implementation of the example code provided in the Red-Teaming the Stable Diffusion Safety Filter paper.

Development

Note If you just wanna try the model out or run it in production, see the link above.

This model is packaged as a Cog model, a tool to packages machine learning models as standard containers.

First, download Cog on your system. Then, download the pre-trained weights with your Hugging Face auth token:

cog run script/download-weights <your-hugging-face-auth-token>

Once setup, you can run predictions:

cog predict -i image=@/path/to/image.jpg

About

Run any image through the Stable Diffusion content filter

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages