Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows conda 环境 tensorrt问题 #877

Open
kawae0709 opened this issue Jan 12, 2025 · 2 comments
Open

windows conda 环境 tensorrt问题 #877

kawae0709 opened this issue Jan 12, 2025 · 2 comments

Comments

@kawae0709
Copy link

python webui.py --port 50000 --model_dir pretrained_models/CosyVoice2-0.5B

2025-01-12 22:55:20,338 - modelscope - INFO - PyTorch version 2.3.1+cu121 Found.
2025-01-12 22:55:20,342 - modelscope - INFO - Loading ast index from C:\Users\kawae.cache\modelscope\ast_indexer
2025-01-12 22:55:21,549 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 4055a8dd19698e8003c68c14549359b5 and a total number of 980 components indexed
failed to import ttsfrd, use WeTextProcessing instead
Traceback (most recent call last):
File "D:\AIgithub\CosyVoice\webui.py", line 25, in
from cosyvoice.cli.cosyvoice import CosyVoice, CosyVoice2
File "D:\AIgithub\CosyVoice\cosyvoice\cli\cosyvoice.py", line 21, in
from cosyvoice.cli.model import CosyVoiceModel, CosyVoice2Model
File "D:\AIgithub\CosyVoice\cosyvoice\cli\model.py", line 23, in
from cosyvoice.utils.file_utils import convert_onnx_to_trt
File "D:\AIgithub\CosyVoice\cosyvoice\utils\file_utils.py", line 17, in
import tensorrt as trt
ModuleNotFoundError: No module named 'tensorrt'

以前是正常的,最近几天的更新,好像必须tensorrt了,win11 conda环境破不了

@aluminumbox
Copy link
Collaborator

更新代码,已修复

@kawae0709
Copy link
Author

2025-01-14 13:14:33,962 INFO get zero_shot inference request
0%| | 0/12 [00:00<?, ?it/s]2025-01-14 13:14:34,368 INFO synthesis text 有人曾说:你的气质里,藏着你走过的路,读过的书和爱过的人。或许董宇辉就是这样的人,生而平凡没有神的光环,但是只要通过不懈的坚持,也总归能够坦坦荡荡,落落大方。
2025-01-14 13:14:39,148 INFO yield speech len 13.72, rtf 0.34841314696709547
2025-01-14 13:14:39,183 DEBUG subprocess.call(['ffmpeg', '-y', '-read_ahead_limit', '-1', '-i', 'cache:pipe:0', '-acodec', 'pcm_s16le', '-vn', '-f', 'wav', '-'])
2025-01-14 13:14:39,305 DEBUG subprocess.call(['ffmpeg', '-y', '-f', 'wav', '-i', 'C:\Users\kawae\AppData\Local\Temp\tmpm0we9alt', '-f', 'adts', 'C:\Users\kawae\AppData\Local\Temp\tmpnrtxngtq'])
2025-01-14 13:14:39,377 DEBUG subprocess output: b'ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers'
2025-01-14 13:14:39,377 DEBUG subprocess output: b' built with clang version 19.1.0'
2025-01-14 13:14:39,377 DEBUG subprocess output: b' configuration: --prefix=/d/bld/ffmpeg_1728332459246/_h_env/Library --cc=clang.exe --cxx=clang++.exe --nm=llvm-nm --ar=llvm-ar --disable-doc --enable-openssl --enable-demuxer=dash --enable-hardcoded-tables --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig --enable-libopenh264 --enable-libdav1d --ld=lld-link --target-os=win64 --enable-cross-compile --toolchain=msvc --host-cc=clang.exe --extra-libs=ucrt.lib --extra-libs=vcruntime.lib --extra-libs=oldnames.lib --strip=llvm-strip --disable-stripping --host-extralibs= --disable-libopenvino --enable-gpl --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-pic --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libopus --pkg-config=/d/bld/ffmpeg_1728332459246/_build_env/Library/bin/pkg-config'
2025-01-14 13:14:39,377 DEBUG subprocess output: b' libavutil 59. 39.100 / 59. 39.100'
2025-01-14 13:14:39,377 DEBUG subprocess output: b' libavcodec 61. 19.100 / 61. 19.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' libavformat 61. 7.100 / 61. 7.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' libavdevice 61. 3.100 / 61. 3.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' libavfilter 10. 4.100 / 10. 4.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' libswscale 8. 3.100 / 8. 3.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' libswresample 5. 3.100 / 5. 3.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' libpostproc 58. 3.100 / 58. 3.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b'[aist#0:0/pcm_s16le @ 0000028AE08684C0] Guessed Channel Layout: mono'
2025-01-14 13:14:39,378 DEBUG subprocess output: b"Input #0, wav, from 'C:\Users\kawae\AppData\Local\Temp\tmpm0we9alt':"
2025-01-14 13:14:39,378 DEBUG subprocess output: b' Duration: 00:00:13.72, bitrate: 384 kb/s'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s'
2025-01-14 13:14:39,378 DEBUG subprocess output: b'Stream mapping:'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))'
2025-01-14 13:14:39,378 DEBUG subprocess output: b'Press [q] to stop, [?] for help'
2025-01-14 13:14:39,378 DEBUG subprocess output: b"Output #0, adts, to 'C:\Users\kawae\AppData\Local\Temp\tmpnrtxngtq':"
2025-01-14 13:14:39,378 DEBUG subprocess output: b' Metadata:'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' encoder : Lavf61.7.100'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' Stream #0:0: Audio: aac (LC), 24000 Hz, mono, fltp, 69 kb/s'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' Metadata:'
2025-01-14 13:14:39,378 DEBUG subprocess output: b' encoder : Lavc61.19.100 aac'
2025-01-14 13:14:39,378 DEBUG subprocess output: b'[out#0/adts @ 0000028AE089ADC0] video:0KiB audio:122KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 1.804815%'
2025-01-14 13:14:39,378 DEBUG subprocess output: b'size= 125KiB time=00:00:13.72 bitrate= 74.4kbits/s speed= 256x'
2025-01-14 13:14:39,378 DEBUG subprocess output: b'[aac @ 0000028AE08C1500] Qavg: 400.077'
8%|████████ | 1/12 [00:05<00:58, 5.30s/it]2025-01-14 13:14:39,664 INFO synthesis text 今天给大家整理了一些董宇辉的金句,希望我们都能学会表达,闪闪发光。当你背单词时,阿拉斯加的鳕鱼正跃出水面;当你算数学时,南太平洋的海鸥正掠过海岸;
2025-01-14 13:14:44,299 INFO yield speech len 14.24, rtf 0.32548554492800424
2025-01-14 13:14:44,333 DEBUG subprocess.call(['ffmpeg', '-y', '-read_ahead_limit', '-1', '-i', 'cache:pipe:0', '-acodec', 'pcm_s16le', '-vn', '-f', 'wav', '-'])
2025-01-14 13:14:44,354 DEBUG subprocess.call(['ffmpeg', '-y', '-f', 'wav', '-i', 'C:\Users\kawae\AppData\Local\Temp\tmpvev_bx3n', '-f', 'adts', 'C:\Users\kawae\AppData\Local\Temp\tmptxh6gz8i'])
2025-01-14 13:14:44,442 DEBUG subprocess output: b'ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers'
2025-01-14 13:14:44,442 DEBUG subprocess output: b' built with clang version 19.1.0'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' configuration: --prefix=/d/bld/ffmpeg_1728332459246/_h_env/Library --cc=clang.exe --cxx=clang++.exe --nm=llvm-nm --ar=llvm-ar --disable-doc --enable-openssl --enable-demuxer=dash --enable-hardcoded-tables --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig --enable-libopenh264 --enable-libdav1d --ld=lld-link --target-os=win64 --enable-cross-compile --toolchain=msvc --host-cc=clang.exe --extra-libs=ucrt.lib --extra-libs=vcruntime.lib --extra-libs=oldnames.lib --strip=llvm-strip --disable-stripping --host-extralibs= --disable-libopenvino --enable-gpl --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-pic --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libopus --pkg-config=/d/bld/ffmpeg_1728332459246/_build_env/Library/bin/pkg-config'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libavutil 59. 39.100 / 59. 39.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libavcodec 61. 19.100 / 61. 19.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libavformat 61. 7.100 / 61. 7.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libavdevice 61. 3.100 / 61. 3.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libavfilter 10. 4.100 / 10. 4.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libswscale 8. 3.100 / 8. 3.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libswresample 5. 3.100 / 5. 3.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' libpostproc 58. 3.100 / 58. 3.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b'[aist#0:0/pcm_s16le @ 000001F79FFE42C0] Guessed Channel Layout: mono'
2025-01-14 13:14:44,443 DEBUG subprocess output: b"Input #0, wav, from 'C:\Users\kawae\AppData\Local\Temp\tmpvev_bx3n':"
2025-01-14 13:14:44,443 DEBUG subprocess output: b' Duration: 00:00:14.24, bitrate: 384 kb/s'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s'
2025-01-14 13:14:44,443 DEBUG subprocess output: b'Stream mapping:'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))'
2025-01-14 13:14:44,443 DEBUG subprocess output: b'Press [q] to stop, [?] for help'
2025-01-14 13:14:44,443 DEBUG subprocess output: b"Output #0, adts, to 'C:\Users\kawae\AppData\Local\Temp\tmptxh6gz8i':"
2025-01-14 13:14:44,443 DEBUG subprocess output: b' Metadata:'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' encoder : Lavf61.7.100'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' Stream #0:0: Audio: aac (LC), 24000 Hz, mono, fltp, 69 kb/s'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' Metadata:'
2025-01-14 13:14:44,443 DEBUG subprocess output: b' encoder : Lavc61.19.100 aac'
2025-01-14 13:14:44,443 DEBUG subprocess output: b'[out#0/adts @ 000001F79FFF9100] video:0KiB audio:131KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 1.744247%'
2025-01-14 13:14:44,443 DEBUG subprocess output: b'size= 134KiB time=00:00:14.24 bitrate= 76.8kbits/s speed= 206x'
2025-01-14 13:14:44,443 DEBUG subprocess output: b'[aac @ 000001F7A0026900] Qavg: 982.323'
17%|████████████████ | 2/12 [00:10<00:51, 5.16s/it]2025-01-14 13:14:44,730 INFO synthesis text 当你晚自习时,地球的极圈正五彩斑斓;但少年,梦要你亲自实现,世界你要亲自去看。未来可期,拼尽全力!当你为未来付出踏踏实实努力的时候,那些你觉得看不到的人和遇不到的风景都终将在你的生命里出现。
2025-01-14 13:14:50,730 INFO yield speech len 17.72, rtf 0.3385955001107726
2025-01-14 13:14:50,764 DEBUG subprocess.call(['ffmpeg', '-y', '-read_ahead_limit', '-1', '-i', 'cache:pipe:0', '-acodec', 'pcm_s16le', '-vn', '-f', 'wav', '-'])
2025-01-14 13:14:50,787 DEBUG subprocess.call(['ffmpeg', '-y', '-f', 'wav', '-i', 'C:\Users\kawae\AppData\Local\Temp\tmpqbm9mcyf', '-f', 'adts', 'C:\Users\kawae\AppData\Local\Temp\tmphts7pwc4'])
2025-01-14 13:14:51,015 DEBUG subprocess output: b'ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers'
2025-01-14 13:14:51,015 DEBUG subprocess output: b' built with clang version 19.1.0'
2025-01-14 13:14:51,015 DEBUG subprocess output: b' configuration: --prefix=/d/bld/ffmpeg_1728332459246/_h_env/Library --cc=clang.exe --cxx=clang++.exe --nm=llvm-nm --ar=llvm-ar --disable-doc --enable-openssl --enable-demuxer=dash --enable-hardcoded-tables --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig --enable-libopenh264 --enable-libdav1d --ld=lld-link --target-os=win64 --enable-cross-compile --toolchain=msvc --host-cc=clang.exe --extra-libs=ucrt.lib --extra-libs=vcruntime.lib --extra-libs=oldnames.lib --strip=llvm-strip --disable-stripping --host-extralibs= --disable-libopenvino --enable-gpl --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-pic --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libopus --pkg-config=/d/bld/ffmpeg_1728332459246/_build_env/Library/bin/pkg-config'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libavutil 59. 39.100 / 59. 39.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libavcodec 61. 19.100 / 61. 19.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libavformat 61. 7.100 / 61. 7.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libavdevice 61. 3.100 / 61. 3.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libavfilter 10. 4.100 / 10. 4.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libswscale 8. 3.100 / 8. 3.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libswresample 5. 3.100 / 5. 3.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' libpostproc 58. 3.100 / 58. 3.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b'[aist#0:0/pcm_s16le @ 0000021DBE24ABC0] Guessed Channel Layout: mono'
2025-01-14 13:14:51,016 DEBUG subprocess output: b"Input #0, wav, from 'C:\Users\kawae\AppData\Local\Temp\tmpqbm9mcyf':"
2025-01-14 13:14:51,016 DEBUG subprocess output: b' Duration: 00:00:17.72, bitrate: 384 kb/s'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s'
2025-01-14 13:14:51,016 DEBUG subprocess output: b'Stream mapping:'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))'
2025-01-14 13:14:51,016 DEBUG subprocess output: b'Press [q] to stop, [?] for help'
2025-01-14 13:14:51,016 DEBUG subprocess output: b"Output #0, adts, to 'C:\Users\kawae\AppData\Local\Temp\tmphts7pwc4':"
2025-01-14 13:14:51,016 DEBUG subprocess output: b' Metadata:'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' encoder : Lavf61.7.100'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' Stream #0:0: Audio: aac (LC), 24000 Hz, mono, fltp, 69 kb/s'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' Metadata:'
2025-01-14 13:14:51,016 DEBUG subprocess output: b' encoder : Lavc61.19.100 aac'
2025-01-14 13:14:51,016 DEBUG subprocess output: b'[out#0/adts @ 0000021DBE288180] video:0KiB audio:167KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 1.705801%'
2025-01-14 13:14:51,016 DEBUG subprocess output: b'size= 170KiB time=00:00:17.72 bitrate= 78.6kbits/s speed= 176x'
2025-01-14 13:14:51,016 DEBUG subprocess output: b'[aac @ 0000021DBE2B0B80] Qavg: 940.423'
25%|████████████████████████ | 3/12 [00:16<00:52, 5.81s/it]2025-01-14 13:14:51,304 INFO synthesis text 短期拼智力、中期拼毅力、长期拼体力。不要觉得自己落后了,用马拉松的心态,过自己的一生,你慢

新版本windows conda虽然能运行了,但是推理阶段一堆的输出,对比之前的版本是干净的,速度也比之前gradio==4.32.2 的时候慢了10%左右

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants