尝试最新大模型MiniCPM-V,题主的3080Ti 16G显存,CUDA12.3,选用模型openbmb/MiniCPM-Llama3-V-2_5
。
踩坑经过
- Could not create share link. Please check your internet connection or our status page: https://status.gradio.app
解决方法:关闭防火墙,然后 解决方法,也可能本地文件就有这个文件,修改名字赋予权限就可以了,windows10下的修改权限
icacls "D:\software\anaconda\anaconda\envs\MiniCPMV\Lib\site-packages\gradio\frpc_linux_amd64_v0.2"
删了windows的文件,后来又出现了这个bug
Could not create share link. Missing file: D:\software\anaconda\anaconda\envs\MiniCPMV\lib\site-packages\gradio\frpc_windows_amd64_v0.2.
Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps:
1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_windows_amd64.exe
2. Rename the downloaded file to: frpc_windows_amd64_v0.2
3. Move the file to this location: D:\software\anaconda\anaconda\envs\MiniCPMV\lib\site-packages\gradio
Keyboard interruption in main thread... closing server.
icacls "D:\software\anaconda\anaconda\envs\MiniCPMV\Lib\site-packages\gradio\frpc_windows_amd64_v0.2" /grant Everyone:F
- KeyError: ‘Event not found in queue. If you are deploying this Gradio app with multiple replicas, please enable stickiness to ensure that all requests from the same user are routed to the same instance.’
解决方法:
pip -q install --force-reinstall gradio==3.50.2
web_demo_2.5.py
中,改为
demo.launch(share=True, enable_queue=False, debug=True, show_api=False, server_port=8080, server_name="0.0.0.0")
- web显示Error, please retry查看是前向传播出了问题
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: “slow_conv2d_cpu” not implemented for ‘Half’
查了一下,“这通常意味着您的代码试图在CPU上使用半精度浮点数(float16)进行某些操作,但当前环境或库版本不支持这种操作。”
解决方案:好家伙,requirements.txt默认安装了个cpu版的torch
conda install pytorch==2.1.2 torchvision==0.16.2 -c pytorch -c nvidia