Reworked configuration to be able to publish the repo (and not expose keys)
This commit is contained in:
parent
47ce04e15f
commit
07d3f1e6ea
|
@ -0,0 +1,58 @@
|
|||
from asyncio import PriorityQueue
|
||||
from telethon import TelegramClient
|
||||
import logging
|
||||
import sqlite3
|
||||
import coloredlogs
|
||||
import asyncio
|
||||
from process_queue import *
|
||||
from config_priv import *
|
||||
|
||||
coloredlogs.install(level='INFO')
|
||||
|
||||
client = TelegramClient('bot', api_id, api_hash)
|
||||
|
||||
conn = sqlite3.connect('ai621.db', isolation_level=None)
|
||||
conn.row_factory = sqlite3.Row
|
||||
|
||||
client.log_channel_id = log_channel_id
|
||||
client.main_channel_id = main_channel_id
|
||||
client.media_lock = asyncio.Lock()
|
||||
|
||||
client.admin_id = admin_id
|
||||
|
||||
log = logging.getLogger('bot')
|
||||
|
||||
send_prompt_lock = asyncio.Lock()
|
||||
|
||||
enabled_models = ['Yiffy', 'Furry Epoch', 'Zack3D']
|
||||
|
||||
fields_template = {
|
||||
'prompt': None,
|
||||
'sampler_name': 'k_euler_a',
|
||||
'cfg_scale': 5.5,
|
||||
'seed': 'random',
|
||||
'resolution': '512x512',
|
||||
'use_upscaling': False,
|
||||
'steps': 50,
|
||||
'n': 3,
|
||||
'models': 'Yiffy',
|
||||
'negative_prompt': None,
|
||||
'image': None
|
||||
}
|
||||
|
||||
prompt_template = {
|
||||
'prompt': None, # ok
|
||||
'params': {
|
||||
'sampler_name': 'k_euler_a',
|
||||
'toggles': [1, 4],
|
||||
'cfg_scale': 5,
|
||||
'seed': 'random',
|
||||
'height': 512,
|
||||
'width': 512,
|
||||
'seed_variation': 1,
|
||||
'use_upscaling': False,
|
||||
'steps': 50,
|
||||
'n': 3,
|
||||
'models': 'Yiffy'
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
# Your telegram API_ID should be here
|
||||
api_id = 12345
|
||||
|
||||
# Your telegram API_HASH should be put here
|
||||
api_hash = 'aaaaaaaaaaaaaaaaaaaa'
|
||||
|
||||
# All guests will use this key
|
||||
default_horde_key = '0000000000'
|
||||
|
||||
# Prompts will be sent to this channel (with buttons for banning)
|
||||
log_channel_id = 000000000000
|
||||
|
||||
# Generations will be sent to this channel
|
||||
main_channel_id = 000000000000
|
||||
|
||||
# This is the list of user ids of people who should be able to use the bot as an admin.
|
||||
admin_id = [00000000,]
|
Loading…
Reference in New Issue