mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
More loading fixes
My last attempt at fixing this caused GPT2 to break, since the other fix is an edge case we assume that the GPT2 method should be used, and if that fails we try the other one to catch rare errors with bad model config's.
This commit is contained in:
@ -2267,7 +2267,10 @@ def loadmodelsettings():
|
|||||||
model_js_config = str(model_config).partition(' ')[2]
|
model_js_config = str(model_config).partition(' ')[2]
|
||||||
js = json.loads(model_js_config)
|
js = json.loads(model_js_config)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
model_js_config = open(vars.custmodpth.replace('/', '_') + "/config.json", "r")
|
try:
|
||||||
|
model_js_config = open(vars.custmodpth + "/config.json", "r")
|
||||||
|
except Exception as e:
|
||||||
|
model_js_config = open(vars.custmodpth.replace('/', '_') + "/config.json", "r")
|
||||||
js = json.load(model_js_config)
|
js = json.load(model_js_config)
|
||||||
if("badwordsids" in js):
|
if("badwordsids" in js):
|
||||||
vars.badwordsids = js["badwordsids"]
|
vars.badwordsids = js["badwordsids"]
|
||||||
|
Reference in New Issue
Block a user