mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
Safer check for is_multimodal when loading models
Avoids unrelated multimodal error when a model fails to load due to lack of memory.
This commit is contained in:
parent
cfc83745ec
commit
cb8780a4ce
|
|
@ -57,7 +57,7 @@ def load_model(model_name, loader=None):
|
|||
shared.settings['truncation_length'] = shared.args.ctx_size
|
||||
|
||||
shared.is_multimodal = False
|
||||
if loader.lower() in ('exllamav3', 'llama.cpp'):
|
||||
if loader.lower() in ('exllamav3', 'llama.cpp') and hasattr(model, 'is_multimodal'):
|
||||
shared.is_multimodal = model.is_multimodal()
|
||||
|
||||
logger.info(f"Loaded \"{model_name}\" in {(time.time()-t0):.2f} seconds.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue