"...composable_kernel-1.git" did not exist on "4a99f54c31c67c219736c12554de6678611f61da"
Unverified Commit 6e315201 authored by Yuan Liu's avatar Yuan Liu Committed by GitHub
Browse files

[Feature]: To be compatible with the latest version of MiniGPT-4 (#539)



* [Feature]: To be compatible with the latest version of MiniGPT-4

* [Feature]: User try and except
Co-authored-by: default avatarFengzhe Zhou <zfz-960727@163.com>

* [Fix]: Fix lint

---------
Co-authored-by: default avatarbensenliu <bensenliu@tencent.com>
Co-authored-by: default avatarFengzhe Zhou <zfz-960727@163.com>
parent f25a9800
...@@ -27,7 +27,13 @@ def load_package(): ...@@ -27,7 +27,13 @@ def load_package():
current_folder_path = os.path.dirname(current_file_path) current_folder_path = os.path.dirname(current_file_path)
sys.path.append(os.path.join(current_folder_path, 'MiniGPT-4')) # noqa sys.path.append(os.path.join(current_folder_path, 'MiniGPT-4')) # noqa
from minigpt4.models.mini_gpt4 import MiniGPT4
try:
# the latest version of MiniGPT4
from minigpt4.models.minigpt4 import MiniGPT4
except ImportError:
# the old version of MiniGPT4
from minigpt4.models.mini_gpt4 import MiniGPT4
sys.path.pop(-1) sys.path.pop(-1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment