Skip to main content

Integrate stable diffusion safety checker / NSFW image detection into web service like FastAPI.

Project description

Safety Checker

Safety checker is a model used in stable diffusion pipeline, aimed to identify NSFW image. Here is the official description.

This project extracts its safety checker into a independent function to provide a conventional way to detect NSFW image in deep neural network.

See test_imgs.py to get start.

TODO

  • add standalone safety checker implementation that depends on pytorch only. provide strength config (if possible) for NSFW detection
  • add FastAPI integration

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safety_checker-0.5.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

safety_checker-0.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file safety_checker-0.5.tar.gz.

File metadata

  • Download URL: safety_checker-0.5.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.15.4 CPython/3.11.4 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for safety_checker-0.5.tar.gz
Algorithm Hash digest
SHA256 9f9c209b58ca51ad9d600d6ef0fd0e29419750f883c5c28da3661b70cd5a4ee3
MD5 40fddfc83f3ea6ad22f6d6449bceff56
BLAKE2b-256 a9387612c6955aaf10758a758fb8205ea79f98b41f2f17e5b5566c890b1f7091

See more details on using hashes here.

File details

Details for the file safety_checker-0.5-py3-none-any.whl.

File metadata

  • Download URL: safety_checker-0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.15.4 CPython/3.11.4 Linux/5.15.146.1-microsoft-standard-WSL2

File hashes

Hashes for safety_checker-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 251151db480c3da8371f4a1e327884170d770967988a5a9aa773f15465755263
MD5 22cad45c1f6108c5b9502150f5afe6d8
BLAKE2b-256 9575ee145e8cbeaedec59f0d72a6b20dc8fbcb561414584985c3473f08ac1219

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page