mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Model Path Hardening
This commit is contained in:
@ -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
|
# 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
|
# 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 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"
|
folder = "./models"
|
||||||
else:
|
else:
|
||||||
folder = msg['folder']
|
folder = msg['folder']
|
||||||
@ -3134,6 +3134,9 @@ def get_message(msg):
|
|||||||
vars.model = msg['data']
|
vars.model = msg['data']
|
||||||
vars.custmodpth = msg['path']
|
vars.custmodpth = msg['path']
|
||||||
get_model_info(msg['data'], directory=msg['path'])
|
get_model_info(msg['data'], directory=msg['path'])
|
||||||
|
else:
|
||||||
|
if vars.host:
|
||||||
|
sendModelSelection(menu=msg['data'], folder="./models")
|
||||||
else:
|
else:
|
||||||
sendModelSelection(menu=msg['data'], folder=msg['path'])
|
sendModelSelection(menu=msg['data'], folder=msg['path'])
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user