Met a problem when running this code
chbw818 opened this issue · 3 comments
chbw818 commented
Hi!Great Work!
I ran this work a few months ago,it worked well at that time.But when i ran this work today,i met a problem as follows:
`C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
urllib3.exceptions.SSLError: TLS/SSL connection has been closed (EOF) (_ssl.c:1135)
The above exception was the direct cause of the following exception:
urllib3.exceptions.ProxyError: ('Unable to connect to proxy', SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)')))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\urllib3\connectionpool.py", line 847, in urlopen
retries = retries.increment(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /stabilityai/stable-diffusion-2-1-base/resolve/main/scheduler/scheduler_config.json (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\diffusers\configuration_utils.py", line 326, in load_config
config_file = hf_hub_download(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\file_download.py", line 1221, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\file_download.py", line 1282, in _hf_hub_download_to_cache_dir
(url_to_download, etag, commit_hash, expected_size, head_call_error) = _get_metadata_or_catch_error(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\file_download.py", line 1722, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(url=url, proxies=proxies, timeout=etag_timeout, headers=headers)
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\file_download.py", line 1645, in get_hf_file_metadata
r = _request_wrapper(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\file_download.py", line 372, in _request_wrapper
response = _request_wrapper(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\file_download.py", line 395, in _request_wrapper
response = get_session().request(method=method, url=url, **params)
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\huggingface_hub\utils\_http.py", line 66, in send
return super().send(request, *args, **kwargs)
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\requests\adapters.py", line 513, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /stabilityai/stable-diffusion-2-1-base/resolve/main/scheduler/scheduler_config.json (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))))"), '(Request ID: 6af51b5b-214b-42b4-9dd8-6bbd92e52cef)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run_tree_ring_watermark.py", line 218, in <module>
main(args)
File "run_tree_ring_watermark.py", line 28, in main
scheduler = DPMSolverMultistepScheduler.from_pretrained(args.model_id, subfolder='scheduler')
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\diffusers\schedulers\scheduling_utils.py", line 118, in from_pretrained
config, kwargs = cls.load_config(
File "C:\Users\Asus\.conda\envs\tree\lib\site-packages\diffusers\configuration_utils.py", line 371, in load_config
raise EnvironmentError(
OSError: Can't load config for 'stabilityai/stable-diffusion-2-1-base'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'stabilityai/stable-diffusion-2-1-base' is the correct path to a directory containing a scheduler_config.json file`
Do you know how to solve this problem?Thanks!
YuxinWenRick commented
Hi, I haven't received this before, but according to this issue, you probably want to login first through huggingface-cli login
.
Let me know if you have further questions!
chbw818 commented
THanks,I will try it!
chbw818 commented
This problem has been solved.The network problem caused the problem.