mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for --path
This commit is contained in:
@@ -1545,14 +1545,13 @@ def general_startup(override_args=None):
|
|||||||
if(modpath):
|
if(modpath):
|
||||||
# Save directory to koboldai_vars
|
# Save directory to koboldai_vars
|
||||||
koboldai_vars.model = "NeoCustom"
|
koboldai_vars.model = "NeoCustom"
|
||||||
koboldai_vars.custmodpth = modpath
|
args.path = modpath
|
||||||
elif args.model:
|
elif args.model:
|
||||||
logger.message(f"Welcome to KoboldAI!")
|
logger.message(f"Welcome to KoboldAI!")
|
||||||
logger.message(f"You have selected the following Model: {args.model}")
|
logger.message(f"You have selected the following Model: {args.model}")
|
||||||
if args.path:
|
if args.path:
|
||||||
logger.message(f"You have selected the following path for your Model: {args.path}")
|
logger.message(f"You have selected the following path for your Model: {args.path}")
|
||||||
koboldai_vars.custmodpth = args.path;
|
model_backends["KoboldAI Old Colab Method"].colaburl = args.path + "/request"; # Lets just use the same parameter to keep it simple
|
||||||
koboldai_vars.colaburl = args.path + "/request"; # Lets just use the same parameter to keep it simple
|
|
||||||
|
|
||||||
#setup socketio relay queue
|
#setup socketio relay queue
|
||||||
koboldai_settings.queue = multiprocessing.Queue()
|
koboldai_settings.queue = multiprocessing.Queue()
|
||||||
@@ -1592,7 +1591,7 @@ def general_startup(override_args=None):
|
|||||||
exit()
|
exit()
|
||||||
arg_parameters['id'] = args.model
|
arg_parameters['id'] = args.model
|
||||||
arg_parameters['model'] = args.model
|
arg_parameters['model'] = args.model
|
||||||
arg_parameters['model_path'] = args.path
|
arg_parameters['path'] = args.path
|
||||||
arg_parameters['menu_path'] = ""
|
arg_parameters['menu_path'] = ""
|
||||||
model_backends[args.model_backend].set_input_parameters(arg_parameters)
|
model_backends[args.model_backend].set_input_parameters(arg_parameters)
|
||||||
koboldai_vars.model = args.model
|
koboldai_vars.model = args.model
|
||||||
|
@@ -338,9 +338,11 @@ class HFInferenceModel(InferenceModel):
|
|||||||
Returns a string of the model's path locally, or None if it is not downloaded.
|
Returns a string of the model's path locally, or None if it is not downloaded.
|
||||||
If ignore_existance is true, it will always return a path.
|
If ignore_existance is true, it will always return a path.
|
||||||
"""
|
"""
|
||||||
|
if os.path.exists(self.path):
|
||||||
|
return self.path
|
||||||
|
|
||||||
if self.model_name in ["NeoCustom", "GPT2Custom", "TPUMeshTransformerGPTJ", "TPUMeshTransformerGPTNeoX"]:
|
if self.model_name in ["NeoCustom", "GPT2Custom", "TPUMeshTransformerGPTJ", "TPUMeshTransformerGPTNeoX"]:
|
||||||
model_path = utils.koboldai_vars.custmodpth
|
model_path = self.path
|
||||||
assert model_path
|
assert model_path
|
||||||
|
|
||||||
# Path can be absolute or relative to models directory
|
# Path can be absolute or relative to models directory
|
||||||
|
Reference in New Issue
Block a user