-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cant find ”load_model_and_preprocess“ #619
Comments
Hi, maybe you can just add this before you import it. import sys
sys.path.append("/your/path/to/LAVIS") |
load_model_and_preprocess are in /your/path/to/LAVIS/init.py My question is how to use this funcion offline, which is without network. |
I have tried it in my Jupyter Notebook supported by Auto DL platform, but it doesn't work and confuse me as well. If you have got any possible solution, please reply me and I will appreciate it a lot. |
I come and comment again. I dug in the source code and found the reason for the error caused by the function
The above code is from lavis/models/base_model.py. |
不知道是否符合你的解决办法,我已经搞成了。 后者在翻墙电脑下载好,2G一个,挪到服务器里,然后yaml里改成路径就行 可以变为国内镜像自动下载,或者找到加载bert代码那行,load_from_pretrain 地方改成路径即可 |
感谢您的帮助!谢谢!
------------------ Original ------------------
From: "Macqueen Ma";
Date: 2024年4月10日(星期三) 晚上6:00
To: "salesforce/LAVIS";
Cc: ***@***.***>; "Comment";
Subject: Re: [salesforce/LAVIS] cant find ”load_model_and_preprocess“ (Issue #619)
不知道是否符合你的解决办法,我已经搞成了。
我看一共两个地方需要下载模型,bert的特征提取器,是huggingface里下载的。
其余blip模型是google drive下载的,yaml里可以找到链接。
后者在翻墙电脑下载好,2G一个,挪到服务器里,然后yaml里改成路径就行
前者 通过命令行里 export HF_ENDPOINT=https://hf-mirror.com
可以变为国内镜像自动下载,或者找到加载bert代码那行,load_from_pretrain 地方改成路径即可
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
from lavis.models import load_model_and_preprocess
i dont know where the load_model_and_preprocess is,thanks!
The text was updated successfully, but these errors were encountered: