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:
parent
2bb263c65d
commit
987e78f980
|
@ -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"]
|
||||||
|
|
Loading…
Reference in New Issue