Skip to content

Commit

Permalink
Set Stable Diffusion as default model, Enable Safety Check (#157)
Browse files Browse the repository at this point in the history
* Implements Stable Diffusion, use /imagine

* Refactor imagine command

* Set Stable Diffusion as default model, Enable Safety Check
  • Loading branch information
earnestangel authored Jun 26, 2023
1 parent 9d72117 commit 423e7df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config.example.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = {
// Replicate.com API Token. Get it from https://replicate.com/account
ReplicateToken: "",
// If you want to change the model, change this to one of the keys in AvailableModels (e.g. anything_3_0, eimis_anime_diffusion, stableDiffusion2_1)
Model: "anything_3_0_better_vae",
Model: "stableDiffusion2_1",
// Available models. You can add your own models here. The key is the name of the model, and the value is the model ID.
// You can find the model ID by going to https://replicate.com/models and clicking on the model you want to use.
AvailableModels: {
Expand All @@ -51,6 +51,7 @@ module.exports = {
Height: 640,
GuidanceScale: 7,
Scheduler: "DPMSolverMultistep",
DisableSafetyCheck: false,
},

// ------------------------------------------ Ririko AI / Chatbot ----------------------------------------------------
Expand Down Expand Up @@ -262,5 +263,5 @@ module.exports = {
LogDir: "logs",
},

VERSION: "5", // DO NOT TOUCH
VERSION: "4", // DO NOT TOUCH
};
2 changes: 1 addition & 1 deletion src/commands/slash/StableDiffusion/imagine.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function generateImage(replicate, userPrompt) {
width: StableDiffusion.Width,
height: StableDiffusion.Height,
negative_prompt: StableDiffusion.NegativePrompt,
disable_safety_check: true,
disable_safety_check: StableDiffusion.DisableSafetyCheck,
num_inference_steps: StableDiffusion.NumInferenceSteps,
guidance_scale: StableDiffusion.GuidanceScale,
scheduler: StableDiffusion.Scheduler,
Expand Down

0 comments on commit 423e7df

Please sign in to comment.