From 2cd994c3d1339ec2df709d314017759157ac600c Mon Sep 17 00:00:00 2001 From: Yixiao Fang <36138628+fangyixiao18@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:41:07 +0800 Subject: [PATCH] [Fix] add import check of multimodal (#352) --- opencompass/multimodal/models/__init__.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/opencompass/multimodal/models/__init__.py b/opencompass/multimodal/models/__init__.py index f62458a4..dfe7caca 100644 --- a/opencompass/multimodal/models/__init__.py +++ b/opencompass/multimodal/models/__init__.py @@ -8,9 +8,19 @@ if satisfy_requirement('salesforce-lavis'): if osp.exists('opencompass/multimodal/models/minigpt_4/MiniGPT-4'): from .minigpt_4 import * # noqa: F401, F403 -from .llama_adapter_v2_multimodal import * # noqa: F401, F403 +if osp.exists( + 'opencompass/multimodal/models/llama_adapter_v2_multimodal/LLaMA-Adapter' # noqa +): + from .llama_adapter_v2_multimodal import * # noqa: F401, F403 + from .llava import * # noqa: F401, F403 -from .mplug_owl import * # noqa: F401, F403 + +if osp.exists('opencompass/multimodal/models/mplug_owl/mPLUG-Owl'): + from .mplug_owl import * # noqa: F401, F403 + from .openflamingo import * # noqa: F401, F403 -from .otter import * # noqa: F401, F403 + +if osp.exists('opencompass/multimodal/models/otter/Otter'): + from .otter import * # noqa: F401, F403 + from .visualglm import * # noqa: F401, F403