Fix for --path

This commit is contained in:
ebolam
2023-05-26 20:10:11 -04:00
parent acf5b40cd8
commit 9723154bed
2 changed files with 6 additions and 5 deletions

View File

@@ -338,9 +338,11 @@ class HFInferenceModel(InferenceModel):
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 os.path.exists(self.path):
return self.path
if self.model_name in ["NeoCustom", "GPT2Custom", "TPUMeshTransformerGPTJ", "TPUMeshTransformerGPTNeoX"]:
model_path = utils.koboldai_vars.custmodpth
model_path = self.path
assert model_path
# Path can be absolute or relative to models directory