Small bug fix in /v1/internal/model/load

This commit is contained in:
oobabooga 2023-11-08 02:34:13 -03:00 committed by GitHub
parent 050ff36bd6
commit 881e8a6e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ def _load_model(data):
# Update shared.args with custom model loading settings # Update shared.args with custom model loading settings
if args: if args:
for k in args: for k in args:
if k in shared.args: if hasattr(shared.args, k):
setattr(shared.args, k, args[k]) setattr(shared.args, k, args[k])
shared.model, shared.tokenizer = load_model(model_name) shared.model, shared.tokenizer = load_model(model_name)