Model Path Hardening
This commit is contained in:
parent
24d34647e0
commit
fb2b6f1026
|
@ -3112,7 +3112,7 @@ def get_message(msg):
|
|||
# If we're on a custom line that we have selected a model for, the path variable will be in msg
|
||||
# so if that's missing we need to run the menu to show the model folders in the models folder
|
||||
if msg['data'] in ('NeoCustom', 'GPT2Custom') and 'path' not in msg and 'path_modelname' not in msg:
|
||||
if 'folder' not in msg:
|
||||
if 'folder' not in msg or vars.host:
|
||||
folder = "./models"
|
||||
else:
|
||||
folder = msg['folder']
|
||||
|
@ -3134,6 +3134,9 @@ def get_message(msg):
|
|||
vars.model = msg['data']
|
||||
vars.custmodpth = msg['path']
|
||||
get_model_info(msg['data'], directory=msg['path'])
|
||||
else:
|
||||
if vars.host:
|
||||
sendModelSelection(menu=msg['data'], folder="./models")
|
||||
else:
|
||||
sendModelSelection(menu=msg['data'], folder=msg['path'])
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue