mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Improve error handling while loading GPTQ models
This commit is contained in:
parent
39dab18307
commit
9d5025f531
@ -140,7 +140,7 @@ def load_quantized(model_name):
|
||||
if shared.args.model_type is None:
|
||||
logging.error("The model could not be loaded because its type could not be inferred from its name.")
|
||||
logging.error("Please specify the type manually using the --model_type argument.")
|
||||
return
|
||||
return None
|
||||
|
||||
# Select the appropriate load_quant function
|
||||
model_type = shared.args.model_type.lower()
|
||||
|
@ -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…
Reference in New Issue
Block a user