Wagner Bruna
config inference timeout
782d7bb
raw
history blame contribute delete
745 Bytes
'''app config'''
import os
# HF token
HF_TOKEN_SD = os.environ.get('HF_TOKEN_SD')
# if set, generated images will be saved here
AUTOSAVE_DIR = os.environ.get('AUTOSAVE_DIR', '')
# 1 enables debug
DEBUG = os.environ.get('DEBUG')
# default image format (png, jpeg, webp)
DEFAULT_IMAGE_FORMAT = os.environ.get('DEFAULT_IMAGE_FORMAT', 'png')
# models available at start (comma separated)
MODEL_LIST = os.environ.get('MODEL_LIST', '').split(',')
# controls the model list editing (comma separated):
# download: enable fetching available models
# edit: enable editing the field
EDIT_MODELS = os.environ.get('EDIT_MODELS', '').split(',')
# inference timeout, in seconds
INFERENCE_TIMEOUT = float(os.environ.get('INFERENCE_TIMEOUT', '300'))