GithubHelp home page GithubHelp logo

juvesito / stable-diffusion-discord-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ausbitbank/stable-diffusion-discord-bot

0.0 0.0 0.0 635 KB

testing discord bots... (thanks)

License: The Unlicense

Shell 1.97% JavaScript 98.03%

stable-diffusion-discord-bot's Introduction

stable-diffusion-discord-bot

A discord bot built to interface with the InvokeAI fork of stable-diffusion.

Current features:

  • Most features from InvokeAI are available via bot
  • Simple buttons for refresh and using templates/init-images
  • Attach an image with your chat message to use as template/init-image
  • Basic FIFO queue system
  • Watch folder for new files, autopost to discord with filename/info if available
  • Supports loading prompt, keywords and settings from txt files with randomisation
  • RealESRGAN face fixing and upscaling
  • Slash commands
  • Per user credit tracking system
  • Credit recharging via Hive, HBD, or btc lightning payments
  • Free small credit topups for low balance users once every x hours (optional)
  • Filter blacklisted words from prompts (optional)
  • Upload to imgur api if files get too big for your discord server (optional)
  • Upload to imgbb api (optional)
  • Remixing/meming and animating images using discord-image-generation
  • Render prompt(s) by multiple schedules and deliver via webhooks
  • Tweak menu for altering advanced settings on past renders
  • Remove backgrounds from images automagically, export as transparent PNG
  • Supports custom model/checkpoint files, and selecting what model to use per render
  • Expanding, fading, inpainting and outpainting support
  • Mask an image with a text prompt for inpainting

Screenshots:

Tweak menu with advanced controls

Model/Checkpoint switching

Expanding image transparency for outpainting

Outpainting a template image

Inpainting using a text mask

Automagic background removal

Slash commands with available parameters

Image from text with width/height parameters

Image from text with width/height parameters

Generating images from text + template

Generating images from text + templates

Seamless tiling background creation from a template

Seamless tiling background creation from a template

/prompt [keyword] to remix a random prompt from 600+ in the library so far

/prompt keyword to remix a random prompt (600+ so far)

Use {animal} {star} {city} etc in prompts to replace with random keywords from a text file library

Using an init image via discord message attachment

Recharging credit with Hive, HBD or BTC lightning

Generating animations with !meme animate and attaching images

Add arty to your discord server (easy)

Come find arty in the artspam room here https://discord.gg/DSdK9KRJxq Right click him, and click "add to server"

Once in your server you can right click him and "manage integrations" to chose what channels it should interact with

That's it! See the getting started guide - https://peakd.com/@ausbitbank/our-new-stable-diffusion-discord-bot

How to install and host for yourself

Recommend at least 8gb video ram, lots of storage space and joining the server above for support (see #bot-help)

You'll need to have https://github.com/invoke-ai/InvokeAI installed and working on your system first, as well as nodejs and npm. Launch invokeai from its directory using invoke.bat (or invoke.sh on linux), and selecting option 2 for the browser based / web ui

To install bot dependancies : npm install or yarn install

If its a fresh install, rename the queue, payments and users db files to remove .example from the filename, eg dbPayments.json.example to dbPayments.json

Rename .env.example to .env and enter your own details:

  • Copy the Discord channel ID as channelID
    • User Settings > ᴀᴘᴘ sᴇᴛᴛɪɴɢs > Advanced > enable Developer Mode per D⁽ˀ⁾
    • Right click Channel, Copy ID
  • adminID is your full Discord username#123
  • apiURL is already the default for https://github.com/lstein/stable-diffusion
  • Copy Bot ᴛᴏᴋᴇɴ as discordBotKey
    • New Application
    • Settings > Bot > Add Bot
    • (If necessary: Reset Token), Copy
    • Enable the ᴍᴇssᴀɢᴇ ᴄᴏɴᴛᴇɴᴛ ɪɴᴛᴇɴᴛ Privileged Gateway Intent per @zsoltime on SO.
      • image

Run with npm start or yarn start

Invite to your server with https://discord.com/oauth2/authorize?client_id= APPLICATION ID HERE &scope=bot&permissions=124992 (these ᴛᴇxᴛ ᴘᴇʀᴍɪssɪᴏɴs are required for the bot to function!)

If you get a disallowed intents specified error on first launch, make sure you have these priveledged intents enabled in your bots settings here

https://discord.com/developers/applications/

image

The background removal feature requires you to run a "rembg" server bound to localhost port 5000 You can start it as a docker container with this command docker run -p 127.0.0.1:5000:5000 danielgatis/rembg s

Patches/Pull request are greatly appreciated!

If you have any questions you can find me (ausbitbank) in my discord here - https://discord.gg/DSdK9KRJxq You can test out the bot in the #artspam channel

discord license

Star History

Star History Chart

stable-diffusion-discord-bot's People

Contributors

ausbitbank avatar jspraul avatar richrobber2 avatar makidoll avatar eb3095 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.