bravekingzhang / text2video

半个神器👉一键文本转视频的工具
MIT License
961 stars 170 forks source link

requirements.txt是不是少了python-dotenv #2

Closed skykis closed 7 months ago

skykis commented 1 year ago

requirements.txt是不是少了python-dotenv

skykis commented 1 year ago

还有edge-tts好像也要额外pip

skykis commented 1 year ago

顺便问一下,现在只有使用pollinations-ai可以正常生成成功,换其他模型会报错,huggingface的api已经填了 [2023-08-08 18:29:35,871] ERROR in app: Exception on /convert [POST] Traceback (most recent call last): File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen httplib_response = self._make_request( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 1053, in _validate_conn conn.connect() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1071, in _create self.do_handshake() File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1342, 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 "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\adapters.py", line 487, in send resp = conn.urlopen( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen retries = retries.increment( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\packages\six.py", line 769, in reraise raise value.with_traceback(tb) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen httplib_response = self._make_request( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 1053, in _validate_conn conn.connect() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connection.py", line 419, in connect self.sock = ssl_wrapsocket( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1071, in _create self.do_handshake() File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接 。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 2190, in wsgi_app response = self.full_dispatch_request() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) File "d:\git\python\text2video\app.py", line 21, in convert_text_to_video video_path = convertTextToVideo(validate_model(model), text) File "d:\git\python\text2video\text_to_video.py", line 105, in convertTextToVideo generateImage(model, sentence.strip()) File "d:\git\python\text2video\text_to_video.py", line 40, in generateImage r = requests.post("https://api-inference.huggingface.co/models/" + model, File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\adapters.py", line 502, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)) 127.0.0.1 - - [08/Aug/2023 18:29:35] "POST /convert HTTP/1.1" 500 -

zicheqingluo commented 1 year ago

是缺少上面两个包,并且ffmpeg版本没有写,装了6.0发现很多语法都不同了,还有libx264解码器还要编译进去,打算写个教程。

zicheqingluo commented 1 year ago

顺便问一下,现在只有使用pollinations-ai可以正常生成成功,换其他模型会报错,huggingface的api已经填了 [2023-08-08 18:29:35,871] ERROR in app: Exception on /convert [POST][2023-08-08 18:29:35,871]应用程序中的错误:/转换 [POST] 时出现异常 Traceback (most recent call last):回溯(最近一次调用): File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py”,第 714 行,在 urlopen 中 httplib_response = self._make_request(httplib_response = self._make_request( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 403, in _make_request文件“D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py”,第 403 行,_make_request self._validate_conn(conn)self._validate_conn(连接) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 1053, in _validate_conn conn.connect() conn.connect() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connection.py", line 419, in connect文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connection.py”,第 419 行,在连接中 self.sock = ssl_wrap_socket(self.sock = ssl_wrap_socket( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl_文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py”,第 1053 行,validate_conn.py", line 449, in ssl_wrap_socket文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py”,第 449 行,ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl_ssl_sock = ssl_wrap_socket_impl(.py", line 493, in _ssl_wrap_socket_impl文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py”,第 493 行,_ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname)返回 ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 513, in wrap_socket文件 “D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py”,第 513 行,wrap_socket return self.sslsocket_class._create(返回 self.sslsocket_class._create( File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1071, in _create文件“D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py”,第 1071 行,_create self.do_handshake() self.do_handshake() File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1342, in do_handshake文件 “D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py”,第 1342 行,do_handshake self._sslobj.do_handshake()self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

During handling of the above exception, another exception occurred:在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):回溯(最近一次调用): File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\adapters.py", line 487, in send文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\adapters.py”,第 487 行,发送中 resp = conn.urlopen( resp = conn.urlopen( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 798, in urlopen文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py”,第 798 行,在 urlopen 中 retries = retries.increment(重试次数 = retries.increment( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\retry.py", line 550, in increment文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\retry.py”,第 550 行,增量 raise six.reraise(type(error), error, _stacktrace)提高六.重新提高(类型(错误),错误,_stacktrace) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\packages\six.py", line 769, in reraise文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\packages\six.py”,第 769 行,重新引发 raise value.with_traceback(tb)提高value.with_traceback(TB) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 714, in urlopen文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py”,第 714 行,在 urlopen 中 httplib_response = self._make_request(httplib_response = self._make_request( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 403, in _make_request文件“D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py”,第 403 行,_make_request self._validate_conn(conn)self._validate_conn(连接) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py", line 1053, in _validate_conn conn.connect() conn.connect() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connection.py", line 419, in connect文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connection.py”,第 419 行,在连接中 self.sock = ssl_wrap_socket(self.sock = ssl_wrap_socket( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl_文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\connectionpool.py”,第 1053 行,validate_conn.py", line 449, in ssl_wrap_socket文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py”,第 449 行,ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl( File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl_ssl_sock = ssl_wrap_socket_impl(.py", line 493, in _ssl_wrap_socket_impl文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\urllib3\util\ssl.py”,第 493 行,_ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname)返回 ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 513, in wrap_socket文件 “D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py”,第 513 行,wrap_socket return self.sslsocket_class._create(返回 self.sslsocket_class._create( File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1071, in _create文件“D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py”,第 1071 行,_create self.do_handshake() self.do_handshake() File "D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py", line 1342, in do_handshake文件 “D:\Program Files\miniconda3\envs\pytorch\lib\ssl.py”,第 1342 行,do_handshake self._sslobj.do_handshake()self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接 。', None, 10054, None)) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接 。 ', None, 10054, None))

During handling of the above exception, another exception occurred:在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):回溯(最近一次调用): File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 2190, in wsgi_app文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py”,第 2190 行,wsgi_app response = self.full_dispatch_request()响应 = self.full_dispatch_request() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 1486, in full_dispatch_request文件“D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py”,第 1486 行,full_dispatch_request rv = self.handle_user_exception(e)rv = self.handle_user_exception(e) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 1484, in full_dispatch_request文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py”,第 1484 行,full_dispatch_request rv = self.dispatch_request()rv = self.dispatch_request() File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py", line 1469, in dispatch_request文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\flask\app.py”,第 1469 行,dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args)返回self.ensure_sync(self.view_functions[规则.端点])(view_args) File "d:\git\python\text2video\app.py", line 21, in convert_text_to_video文件 “d:\git\python\text2video\app.py”,第 21 行,convert_text_to_video video_path = convertTextToVideo(validate_model(model), text)video_path = 转换文本到视频(validate_model(模型), 文本) File "d:\git\python\text2video\text_to_video.py", line 105, in convertTextToVideo文件 “d:\git\python\text2video\text_to_video.py”,第 105 行,在 convertTextToVideo 中 generateImage(model, sentence.strip())generateImage(model, sentence.strip()) File "d:\git\python\text2video\text_to_video.py", line 40, in generateImage文件 “d:\git\python\text2video\text_to_video.py”,第 40 行,在生成图像中 r = requests.post("https://api-inference.huggingface.co/models/" + model,r = requests.post(“ https://api-inference.huggingface.co/models/” + 模型, File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\api.py", line 115, in post文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\api.py”,第 115 行,在帖子中 return request("post", url, data=data, json=json, kwargs)return request(“post”, url, data=data, json=json, kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\api.py", line 59, in request文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\api.py”,第 59 行,在请求中 return session.request(method=method, url=url, kwargs)return session.request(method=method, url=url, kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\sessions.py", line 587, in request文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\sessions.py”,第 587 行,在请求中 resp = self.send(prep, send_kwargs)resp = self.send(prep, send_kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\sessions.py", line 701, in send文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\sessions.py”,第 701 行,发送中 r = adapter.send(request, kwargs)r = adapter.send(request, kwargs) File "D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\adapters.py", line 502, in send文件 “D:\Program Files\miniconda3\envs\pytorch\lib\site-packages\requests\adapters.py”,第 502 行,发送中 raise ConnectionError(err, request=request)引发连接错误(错误,请求=请求) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', 无, 10054, 无)) 127.0.0.1 - - [08/Aug/2023 18:29:35] "POST /convert HTTP/1.1" 500 -127.0.0.1 - - [08/Aug/2023 18:29:35] “发布/转换 HTTP/1.1” 500 -

是不是网不行无法下载模型

bravekingzhang commented 7 months ago

依赖已经更新了一波