draggan部署最后一步运行python -m draggan.web时出错,内容如下
```python
ada/afhqcat.pkl not found
Try to download from huggingface: https://huggingface.co/aaronb/StyleGAN2-pkl/resolve/main/ada/afhqcat.pkl
afhqcat.pkl: 0.00B [00:00, ?B/s]
Traceback (most recent call last):
File "D:\Program Files\Python\Lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "D:\Program Files\Python\Lib\http\client.py", line 1286, in request
self._send_request(method, url, body, headers, encode_chunked)
File "D:\Program Files\Python\Lib\http\client.py", line 1332, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "D:\Program Files\Python\Lib\http\client.py", line 1281, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "D:\Program Files\Python\Lib\http\client.py", line 1041, in _send_output
self.send(msg)
File "D:\Program Files\Python\Lib\http\client.py", line 979, in send
self.connect()
File "D:\Program Files\Python\Lib\http\client.py", line 1458, in connect
self.sock = self._context.wrap_socket(self.sock,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\ssl.py", line 1075, in _create
self.do_handshake()
File "D:\Program Files\Python\Lib\ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "D:\Program Files\Python\Lib\site-packages\draggan\web.py", line 317, in <module>
demo = main()
^^^^^^
File "D:\Program Files\Python\Lib\site-packages\draggan\web.py", line 240, in main
G = draggan.load_model(utils.get_path(DEFAULT_CKPT), device=device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\site-packages\draggan\utils.py", line 43, in get_path
download_url(url, save_path)
File "D:\Program Files\Python\Lib\site-packages\draggan\utils.py", line 33, in download_url
urllib.request.urlretrieve(url, filename=output_path, reporthook=t.update_to)
File "D:\Program Files\Python\Lib\urllib\request.py", line 241, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 525, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 634, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 557, in error
result = self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 749, in http_error_302
return self.parent.open(new, timeout=req.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10054] 远程主机强迫关闭了一个现有的连接。>
```
有一个模块没有下载成功
这个错误是在尝试从huggingface下载 afhqcat.pkl 文件时,出现了网络问题。错误消息 <urlopen error [WinError 10054] 远程主机强迫关闭了一个现有的连接。> 指示了远程服务器在尝试下载时强制关闭了连接。这可能是由于网络不稳定,或者服务器端的问题。
有一些可能的解决方案:
检查你的网络连接,确保你的网络稳定,并且能够访问huggingface网站。
尝试手动从https://huggingface.co/aaronb/StyleGAN2-pkl/resolve/main/ada/afhqcat.pkl 下载 afhqcat.pkl 文件,并将其放在正确的位置。
如果上述方法都不行,可能是由于服务器端的问题,你可以尝试等待一段时间,然后再次尝试下载。
如果你有任何进一步的问题或者疑问,欢迎继续提问。