Git Product home page Git Product logo

promptinspectorbot's Introduction

UPDATE v2

Discord no longer strips exif data!

UPDATE

As of 3/31/2023, discord strips all exif data from images uploaded on discord. In order to have the prompt be usable by Prompt Inspector, you must install a webui extension that adds prompt data into the alpha channel of the image. The difference is not noticable to the human eye. https://github.com/ashen-sensored/sd_webui_stealth_pnginfo

Prompt Inspector ๐Ÿ”Ž

Inspect prompts ๐Ÿ”Ž from images uploaded to discord

Functionality

This Discord bot reacts to any image with generation metadata from Automatic1111's WebUI. If generation metadata is detected, a magnifying glass react is added to the image. If the user clicks the magnifying glass, they are sent a DM with the image generation information.

Setup

  1. Clone the repository
  2. Install the dependencies with pip install -r requirements.txt
  3. Create a Discord bot and invite it to your server
  4. Enable the Message Content Intent in the Discord developer portal
  5. Enable the Server Members Intent in the Discord developer portal
  6. Create a file named ".env" in the root directory of the project
  7. Set BOT_TOKEN=<your discord bot token> in the .env file
  8. Add the channel IDs you want the bot to work in into the config.toml file
  9. Run the bot with python3 PromptInspector.py

Examples

Example 1 Example 2

promptinspectorbot's People

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.