git-cloner / aliendao

huggingface mirror download
https://aliendao.cn
MIT License
539 stars 55 forks source link

TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' #15

Closed billcsm closed 6 months ago

billcsm commented 6 months ago

运行 python model_download.py --repo_id stabilityai/stable-video-diffusion-img2vid-xt 时发生以下错误,请教如何解决。谢谢!!

Traceback (most recent call last): File "/home/ubuntu/aliendao/model_download.py", line 221, in download_model_from_mirror( File "/home/ubuntu/aliendao/model_download.py", line 199, in download_model_from_mirror if _download_model_from_mirror(_repo_id, _repo_type, _token, _e): File "/home/ubuntu/aliendao/model_download.py", line 193, in _download_model_from_mirror if not _download_file_resumable(url, file_name, i, len(files)): File "/home/ubuntu/aliendao/model_download.py", line 135, in _download_file_resumable total_length = int(r.headers.get('content-length')) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

little51 commented 6 months ago

是因为没有这模型,从head请求中没取到content-length而报错,e.aliendao.cn有,两边数据不同步,现已正常。

billcsm commented 6 months ago

谢谢您的回复。以前的版本可以多文件同时下载,现在新版只能一个一个文件下载,速度很慢。请教如何提高下载速度。谢谢。

little51 commented 6 months ago

受带宽限制,这个是在后台nginx加了并发控制参数,建议用model_download.py脚本下载,这样就不用值守了,如果模型很大,下载时间过长,可以考虑用e.aliendao.cn