Improve error handling while loading GPTQ models
This commit is contained in:
parent
39dab18307
commit
9d5025f531
2 changed files with 5 additions and 2 deletions
|
@ -97,7 +97,10 @@ def load_model(model_name):
|
|||
model, tokenizer = output
|
||||
else:
|
||||
model = output
|
||||
tokenizer = load_tokenizer(model_name, model)
|
||||
if model is None:
|
||||
return None, None
|
||||
else:
|
||||
tokenizer = load_tokenizer(model_name, model)
|
||||
|
||||
# Hijack attention with xformers
|
||||
if any((shared.args.xformers, shared.args.sdp_attention)):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue