streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError
2023-09-08 04:40:57.495 Uncaught app exception Traceback (most recent call last): File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 263, in _get_or_create_cached_value cached_result = cache.read_result(value_key) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/streamlit/runtime/caching/cache_resource_api.py", line 500, in read_result raise CacheKeyNotFoundError() streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/streamlit/runtime/caching/cache_utils.py", line 311, in _handle_cache_miss cached_result = cache.read_result(value_key) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/streamlit/runtime/caching/cache_resource_api.py", line 500, in read_result raise CacheKeyNotFoundError() streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1053, in validate_conn conn.connect() File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrap_socket( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/ssl.py", line 501, in wrap_socket return self.sslsocket_class._create( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/ssl.py", line 1041, in _create self.do_handshake() File "/home/software/miniconda3/envs/dl_base/lib/python3.9/ssl.py", line 1310, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connectionpool.py", line 798, in urlopen retries = retries.increment( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1053, in validate_conn conn.connect() File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/connection.py", line 419, in connect self.sock = ssl_wrap_socket( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/home/software/miniconda3/envs/dl_base/lib/python3.9/ssl.py", line 501, in wrap_socket return self.sslsocket_class._create( File "/home/software/miniconda3/envs/dl_base/lib/python3.9/ssl.py", line 1041, in _create self.do_handshake() File "/home/software/miniconda3/envs/dl_base/lib/python3.9/ssl.py", line 1310, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/software/miniconda3/envs/dl_base/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/home/fengxue/Codes/text2img/generative-models/scripts/demo/sampling.py", line 277, in
请问,有人见过这个错误吗?
我也遇到了差不多的错误,看起来是要从huggingface中下载一些模型到torch的缓存文件夹,但是网络超时了,得科学上网或者手动将模型下载下来放到缓存文件夹
Thanksfully, I have solved this problem.
For those who can not dirrectly attach huggingface.co, you need to download two more models manually.
The first is https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k/resolve/main/open_clip_pytorch_model.bin
For the second it is clip.load("ViT-L/14", device=device)
Place them into the right place, and there you go.
Thanksfully, I have solved this problem. For those who can not dirrectly attach huggingface.co, you need to download two more models manually. The first is https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k/resolve/main/open_clip_pytorch_model.bin For the second it is
clip.load("ViT-L/14", device=device)Place them into the right place, and there you go.
where should i place them?
Thanksfully, I have solved this problem. For those who can not dirrectly attach huggingface.co, you need to download two more models manually. The first is https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k/resolve/main/open_clip_pytorch_model.bin For the second it is
clip.load("ViT-L/14", device=device)Place them into the right place, and there you go.where should i place them?
+1
+2
+2+1
find path, like this: ~/.cache/huggingface/hub/models--laion--CLIP-ViT-bigG-14-laion2B-39B-b160k
Thanksfully, I have solved this problem. For those who can not dirrectly attach huggingface.co, you need to download two more models manually. The first is https://huggingface.co/laion/CLIP-ViT-bigG-14-laion2B-39B-b160k/resolve/main/open_clip_pytorch_model.bin For the second it is
clip.load("ViT-L/14", device=device)Place them into the right place, and there you go.
where is the code clip.load("ViT-L/14", device=device) .
clip.load("ViT-L/14", device=device)在anaconda3/envs/pytorch/lib/python3.10/site-packages/clip-1.0-py3.10.egg/clip/clip.py的120行,可以更改其路径model_path = _download(_MODELS[name], download_root or os.path.expanduser("yourpath_root/clip"))
CLIP-ViT-bigG-14-laion2B-39B-b160k/open_clip_pytorch_model.bin好像是在anaconda3/envs/pytorch/lib/python3.10/site-packages/open_clip/factory.py文件的create_model方法279行的if pretrained:判断语句下加下面的代码
if pretrained == 'laion2b_s39b_b160k' and model_name == 'ViT-bigG-14': pretrained = 'yourpath/CLIP-ViT-bigG-14-laion2B-39B-b160k/open_clip_pytorch_model.bin'