TencentARC / PhotoMaker

PhotoMaker [CVPR 2024]
https://photo-maker.github.io/
Other
9.59k stars 769 forks source link

无法连接到huggingface,如何指向已经下载好的模型? #31

Open atiyit opened 10 months ago

atiyit commented 10 months ago

Traceback (most recent call last): File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\connection.py", line 159, in _new_conn conn = connection.create_connection( File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection raise err File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection sock.connect(sa) socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\connectionpool.py", line 978, in _validate_conn conn.connect() File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\connection.py", line 309, in connect conn = self._new_conn() File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\connection.py", line 164, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x0000018A193E0220>, 'Connection to huggingface.co timed out. (connect timeout=10)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\requests\adapters.py", line 440, in send resp = conn.urlopen( File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\connectionpool.py", line 726, in urlopen retries = retries.increment( File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\urllib3\util\retry.py", line 446, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /TencentARC/PhotoMaker/resolve/main/photomaker-v1.bin (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000018A193E0220>, 'Connection to huggingface.co timed out. (connect timeout=10)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\file_download.py", line 1238, in hf_hub_download metadata = get_hf_file_metadata( File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(args, kwargs) File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\file_download.py", line 1631, in get_hf_file_metadata r = _request_wrapper( File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\file_download.py", line 385, in _request_wrapper response = _request_wrapper( File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\file_download.py", line 408, in _request_wrapper response = get_session().request(method=method, url=url, params) File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\requests\sessions.py", line 529, in request resp = self.send(prep, send_kwargs) File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\requests\sessions.py", line 645, in send r = adapter.send(request, kwargs) File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\utils_http.py", line 67, in send return super().send(request, args, **kwargs) File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\requests\adapters.py", line 507, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /TencentARC/PhotoMaker/resolve/main/photomaker-v1.bin (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000018A193E0220>, 'Connection to huggingface.co timed out. (connect timeout=10)'))"), '(Request ID: d88ac3bf-fb95-4530-ae47-b0a18dc9d732)')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "gradio_demo/app.py", line 24, in photomaker_ckpt = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v1.bin", repo_type="model") File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "C:\Users\abc\anaconda3\envs\p\lib\site-packages\huggingface_hub\file_download.py", line 1371, in hf_hub_download raise LocalEntryNotFoundError( huggingface_hub.utils._errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.

Paper99 commented 10 months ago

You could directly download it from this link

Paper99 commented 10 months ago

Then, just edit the photomaker_ckpt to /path/to/photomaker-v1.bin