Code Monkey home page Code Monkey logo

stable-diffusion-bot's Introduction

Stable-Diffusion-Bot

Example

Features

  • Text to Image generation
  • Image to Image generation
  • Runtime Model Switching
  • Runtime Config Modification
  • Multithreaded parallel image generation with queue system
  • Config options to limit and moderate user generated content
  • Slash commands with a lot of optional parameters to guide image generation

Installation

Prerequisites

  • Python 3.10 or above
  • Cuda 11.7 or above
  • poetry 3.15 or above
git clone https://github.com/ShyAssassin/Stable-Diffusion-Bot.git
cd Stable-Diffusion-Bot
cp .env.example .env
poetry install

Note: Make sure you fill out the .env file!

Running

after completing the installation steps and editing the .env file to add you discord bot token, open a new terminal in the bot's root directory and run poetry run python sdb/main.py

Troubleshooting

Nothing is generated but my GPU is at 100%

This is generally because you are generating too many images at once, try turning down batch_size and images_per_prompt in the config file.

The Generated image does not look good

If the Generated image does not look good try adjusting the provided prompts and negative prompts or the guidance_scale / sample_steps in the config. if you are still not happy you can use a custom model by change current_model in the config.

Generated Images look corrupted

If the Generated Images looks corrupted this is generally because you have too many or too few sample_steps, try messing around with the amount of sample_steps until the images look clear again.

The Generated image contains "mutated" elements

If The Generated image contains mutated elements (extra arms, too many fingers, long necks, etc...) try adjusting the negative prompts provided or add base negative_prompts in the config.

The Img2Img output image looks nothing like the input

This is expected because Img2Img uses the provided input image as a "base" for further generation Read This for more info. Try adjusting the stength paramater provided when using the command or edit the base strength in the config. The higher the strength the more the "creative" the AI gets.

When i start the bot i get import errors

This is generally because you forgot to run poetry install, if you did run the install command and you are still encountering errors please open a bug report!

A black image is being output

A black image will be sent if the saftey checker has determined that the generated image contains unsafe elements, the saftey checker can be disabled in config.

stable-diffusion-bot's People

Contributors

blockofdynamite avatar shyassassin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stable-diffusion-bot's Issues

This isn't a Issue more like Questions

Does the current version use LORA. Also does this work with the automatic 111 webui to generate the images, an lastly is there any option to add negative prompts.

disnake doesnt install properly (?)

Traceback (most recent call last):
File "/content/Stable-Diffusion-Bot/sdb/main.py", line 8, in
from Core.bot import SDB
File "/content/Stable-Diffusion-Bot/sdb/Core/init.py", line 1, in
from .bot import SDB
File "/content/Stable-Diffusion-Bot/sdb/Core/bot.py", line 2, in
import disnake
ModuleNotFoundError: No module named 'disnake'

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.