GithubHelp home page GithubHelp logo

stable-diffusion-pickle-scanner's Introduction

Stable Diffusion Pickle Scanner

Scan .pt, .ckpt and .bin files for potentially malicious code.

Example output (with numpy considered "non-standard"):

Code_-_Insiders_Db9qYRswOQ

How to use

  1. Export pickle_inspector.py and pickle_scan.py to your Stable Diffusion WebUI base directory
  2. Open bash / CMD
  3. Run command python pickle_scan.py models > scan_output.txt
  4. Open scan_output.txt

If you get an error about torch not being installed, start your webui and copy the venv python path and replace python with that path.

It might look something like this:

venv "F:\Projects\stable-diffusion-webui\venv\Scripts\Python.exe"

Final command would look like:

"F:\Projects\stable-diffusion-webui\venv\Scripts\Python.exe" pickle_scan.py models > scan_output.txt

Usage

python pickle_scan.py [directory] [debugmode]

Example

python pickle_scan.py models

Debug Mode

Add 1 after directory to see which calls / signals triggered the scan failure.

python pickle_scan.py models 1 > scan_output.txt

Notes

By default this will scan all subdirectories for files ending with .pt, .ckpt and .bin

License

https://creativecommons.org/licenses/by-nc-sa/4.0/

stable-diffusion-pickle-scanner's People

Contributors

zxix avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.