mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-20 15:40:23 +01:00
mtmd: Better way to detect if an EXL3 model is multimodal
This commit is contained in:
parent
fa9be444fa
commit
f396b82a4f
|
|
@ -98,13 +98,16 @@ class Exllamav3Model:
|
|||
|
||||
# Load vision model component (ExLlamaV3 native)
|
||||
vision_model = None
|
||||
try:
|
||||
logger.info("Loading vision model component...")
|
||||
vision_model = Model.from_config(config, component="vision")
|
||||
vision_model.load(progressbar=True)
|
||||
logger.info("Vision model loaded successfully")
|
||||
except Exception as e:
|
||||
logger.warning(f"Vision model loading failed (multimodal disabled): {e}")
|
||||
if "vision_config" in config.config_dict:
|
||||
logger.info("Vision component detected in model config. Attempting to load...")
|
||||
try:
|
||||
vision_model = Model.from_config(config, component="vision")
|
||||
vision_model.load(progressbar=True)
|
||||
logger.info("Vision model loaded successfully.")
|
||||
except Exception as e:
|
||||
logger.warning(f"Vision model loading failed (multimodal disabled): {e}")
|
||||
else:
|
||||
logger.info("No vision component in model config. Skipping multimodal setup.")
|
||||
|
||||
generator = Generator(
|
||||
model=model,
|
||||
|
|
|
|||
Loading…
Reference in a new issue