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
|
@ -2266,6 +2266,9 @@ def loadmodelsettings():
|
|||
try:
|
||||
model_js_config = str(model_config).partition(' ')[2]
|
||||
js = json.loads(model_js_config)
|
||||
except Exception as e:
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue