-
Notifications
You must be signed in to change notification settings - Fork 17
Configuration
SpenserCai edited this page Nov 3, 2023
·
7 revisions
The following is the complete configuration file template:
{
"sd_webui":{
"servers":[
{
"name":"webui-1",
"host":"127.0.0.1:7860",
"max_concurrent":1,
"max_queue":100,
"max_vram":"20G"
}
],
"default_setting":{}
},
"discord":{
"token":"<your token here>",
"server_id":"<your servers id here if empty all servers>",
"bot_name":"SD-WEBUI-BOT",
"bot_avatar":"https://raw.githubusercontent.com/SpenserCai/sd-webui-discord/main/res/logo.png",
"bot_url":"https://github.com/SpenserCai/sd-webui-discord"
},
"user_center":{
"enable":true,
"db_config":{
"type":"sqlite",
"dsn":"./user_center.db"
}
},
"disable_return_gen_info":false
}
Set them in config["sd_webui"]["servers"]
:
[
{
"name":"webui-1",
"host":"127.0.0.1:7860",
"max_concurrent":5,
"max_queue":100,
"max_vram":"20G"
}
]
Key | Description |
---|---|
name |
Node name |
host |
Stable-diffusion-webui's host |
max_concurrent |
Maximum number of parallelism, exceeding which will enter the queue |
max_queue |
Maximum queuing queue |
max_vram |
Maximum graphics memory, exceeding which will enter the queue |
Set them in config["discord"]
:
{
"app_id":"<your app id here>",
"token":"<your token here>",
"client_secret":"<your client secret here>",
"oauth2_redirect_base_url":"http://127.0.0.1:18890",
"server_id":"<your servers id here if empty all servers>",
"bot_name":"SD-WEBUI-BOT",
"bot_avatar":"https://raw.githubusercontent.com/SpenserCai/sd-webui-discord/main/res/logo.png",
"bot_url":"https://github.com/SpenserCai/sd-webui-discord"
}
Create a bot account on Discord and get the token. How To Create Discord App.
Key | Description |
---|---|
app_id |
Get from Discord App |
token |
Get from Discord App |
client_secret |
Get from Discord App |
oauth2_redirect_base_url |
Your website url. Example:https://aigc.ngrok.io and set https://aigc.ngrok.io/api/auth on discord developer page |
server_id |
Get from Discord App,If set, the robot will only take effect on the specified server |
bot_name |
Customized robot name, display in the return of some commands |
bot_avatar |
Customized robot avatar, display in the return of some commands |
bot_url |
Customized robot url, display in the return of some commands |
app_id
, client_secret
, oauth2_redirect_base_url
example
Set them in config["sd_webui"]["default_setting"]
{
"cfg_scale": 8,
"negative_prompt": "bad,text,watermask",
"height":1024,
"width":1024,
"steps":32,
"sampler":"Euler",
"sd_model_checkpoint":"sd_xl_base_1.0.safetensors [31e35c80fc]",
"sd_vae":"",
"clip_skip":1
}
Set them in config["user_center"]
{
"enable":true,
"must_register":false,
"db_config":{
"type":"sqlite",
"dsn":"./user_center.db"
}
}
Key | Description |
---|---|
enable |
Enable user center |
db_config.type |
User center's db type.Support:sqlite ,mysql
|
db_config.dsn |
Db's connect string |
must_register |
Enable requires registration to use robots |