A discord bot for generating art with artificial intelligence
/dream prompt: 1girl, solo, blonde hair, twintails, blue eyes, blue dress
Here are some examples of possible images generated using the bot:
{prompt1 | prompt2 | prompt3}
syntax allows to change parts of the prompt for each image in a batch/upscale
command/metadata
command/interrogate
commandSoph works by communicating with Stable Diffusion WebUI API to generate images using artificial intelligence. This can be achieved by running WebUI locally on the same machine, on the same network or over the internet.
Soph prioritizes UX and being a first-class Discord citizen, and as such uses slash commands and rich embeds with proper multiple image support rather than baking all results into a single image grid, sending each result as a separate image attachment or only displaying one image at a time.
Individual images are sent as soon as they're ready rather than only sending the entire batch at once or showing multiple unfinished images at the same time, that way we can ensure the user gets useful and immediate feedback of their generation request.
/dream <prompt>
<negative> <batch> <sampler> <steps> <width> <height> <cfg> <highres-fix> <hr-scale> <image> <denoising> <scale-latent>
/metadata <image>
/interrogate <image> <model>
/upscale <image>
<model> <resize> <secondary-model> <mix>
/help
/ping
--api
to WebUI's commandline argumentsgit clone https://github.com/TiagoMarinho/Soph
to clone Soph's repoCopy the token and client id of your new discord application and put it in a new file inside Soph's root folder, Soph/config.json
, like this:
{
"token": "TOKEN HERE",
"clientId": "CLIENT ID HERE",
"cacheChannelId": "SEE NEXT STEP"
}
config.json
file for a chat your application has access to, so that it can use as a cache for the images. Every image generated with the bot will be sent in this chat first.npm install
inside Soph's root foldernpm run deploy
inside Soph's root folder to register slash commands for the bot.node .
inside Soph's root folder to launch SophContributions, even in the form of creating new issues, are more than welcome!
Here's a basic overview of the project structure for new contributors to get used to the code base:
src/main.js
is the entry pointsrc/commands/<category>/
src/commands/<category>/<command name>/main.js
contains the code that runs when the user executes said commandsrc/shared/generate.js
is where the relevant generation functions are called from, and where the response is builtUnabled to run Stable Diffusion but still want to contribute? You can install EdoanR's "a1111-fake-webui-api" to mimic the Stable Diffusion WebUI API to develop Soph without having to actually run the AI.