問題1:安裝torch==1.13.1 torchvision==0.14.1 報錯
解決方法:
使用鏡像安裝
(切記一定要在python虛擬環(huán)境中安裝锨亏。性含。一定要是pip3.10執(zhí)行命令) 不知道虛擬環(huán)境的話看
pip3.10 install torch==1.13.1 -i http://mirrors.aliyun.com/pypi/simple/
pip3.10 install?torchvision==0.14.1?-i http://mirrors.aliyun.com/pypi/simple/
如果想知道更多鏡像的話橱乱,看:https://www.runoob.com/w3cnote/pip-cn-mirror.html
問題2:安裝open_clip蒜田,超時
解決方案:
從github下載open_clip后安裝。github地址:https://github.com/mlfoundations/open_clip.git
具體步驟:
- 克隆open_clip:git clone https://github.com/mlfoundations/open_clip.git
(隨便一個位置都行我抠,我是下載到venv目錄下的)
- 啟動venv虛擬環(huán)境:source bin/activate
- cd 到 open_clip目錄下:cd open_clip
- 執(zhí)行 pip3.10??install open_clip_torch
問題3:
報錯:requests.exceptions.ProxyError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /openai/clip-vit-large-patch14/resolve/main/vocab.json (Caused by ProxyError('Cannot connect to proxy.', TimeoutError('timed out')))
原因:huggingface網(wǎng)站證書問題
解決:在webui.py 文件中增加:import os? ? os.environ['CURL_CA_BUNDLE'] = ''