mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 22:27:29 +00:00
Add error handling for non-llama.cpp models in portable mode
This commit is contained in:
parent
a25a1fc8d0
commit
f337767f36
2 changed files with 16 additions and 2 deletions
|
|
@ -174,7 +174,12 @@ def create_event_handlers():
|
|||
|
||||
|
||||
def load_model_wrapper(selected_model, loader, autoload=False):
|
||||
settings = get_model_metadata(selected_model)
|
||||
try:
|
||||
settings = get_model_metadata(selected_model)
|
||||
except FileNotFoundError:
|
||||
exc = traceback.format_exc()
|
||||
yield exc.replace('\n', '\n\n')
|
||||
return
|
||||
|
||||
if not autoload:
|
||||
yield "### {}\n\n- Settings updated: Click \"Load\" to load the model\n- Max sequence length: {}".format(selected_model, settings['truncation_length_info'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue