Improve several log messages

This commit is contained in:
oobabooga 2023-12-19 20:54:32 -08:00
parent 23818dc098
commit 9992f7d8c0
7 changed files with 37 additions and 28 deletions

View file

@ -12,6 +12,7 @@ os.environ['BITSANDBYTES_NOWELCOME'] = '1'
warnings.filterwarnings('ignore', category=UserWarning, message='TypedStorage is deprecated')
warnings.filterwarnings('ignore', category=UserWarning, message='Using the update method is deprecated')
warnings.filterwarnings('ignore', category=UserWarning, message='Field "model_name" has conflict')
warnings.filterwarnings('ignore', category=UserWarning, message='The value passed into gr.Dropdown()')
with RequestBlocker():
import gradio as gr
@ -54,6 +55,7 @@ from modules.models_settings import (
get_model_metadata,
update_model_parameters
)
from modules.shared import do_cmd_flags_warnings
from modules.utils import gradio
@ -170,6 +172,9 @@ def create_interface():
if __name__ == "__main__":
logger.info("Starting Text generation web UI")
do_cmd_flags_warnings()
# Load custom settings
settings_file = None
if shared.args.settings is not None and Path(shared.args.settings).exists():
@ -180,7 +185,7 @@ if __name__ == "__main__":
settings_file = Path('settings.json')
if settings_file is not None:
logger.info(f"Loading settings from {settings_file}...")
logger.info(f"Loading settings from {settings_file}")
file_contents = open(settings_file, 'r', encoding='utf-8').read()
new_settings = json.loads(file_contents) if settings_file.suffix == "json" else yaml.safe_load(file_contents)
shared.settings.update(new_settings)