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

Demucs 报错 #234

Open
colin4k opened this issue Nov 6, 2024 · 4 comments
Open

Demucs 报错 #234

colin4k opened this issue Nov 6, 2024 · 4 comments

Comments

@colin4k
Copy link

colin4k commented Nov 6, 2024

内存爆了,但是我64G 内存。。。
Traceback (most recent call last):
File "D:\Soft\anaconda3\envs\videolingo\lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
File "D:\Soft\anaconda3\envs\videolingo\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 590, in code_to_exec
exec(code, module.dict)
File "D:\workspace\VideoLingo-1.7.0\st.py", line 117, in
main()
File "D:\workspace\VideoLingo-1.7.0\st.py", line 113, in main
text_processing_section()
File "D:\workspace\VideoLingo-1.7.0\st.py", line 30, in text_processing_section
process_text()
File "D:\workspace\VideoLingo-1.7.0\st.py", line 45, in process_text
step2_whisper.transcribe()
File "D:\workspace\VideoLingo-1.7.0\core\step2_whisper.py", line 13, in transcribe
ts(video_file)
File "D:\workspace\VideoLingo-1.7.0\core\all_whisper_methods\whisperX.py", line 126, in transcribe
demucs_main(
File "D:\workspace\VideoLingo-1.7.0\core\all_whisper_methods\demucs_vl.py", line 61, in demucs_main
_, outputs = separator.separate_audio_file(music_file)
File "D:\Soft\anaconda3\envs\videolingo\lib\site-packages\demucs\api.py", line 308, in separate_audio_file
return self.separate_tensor(self._load_audio(file), self.samplerate)
File "D:\Soft\anaconda3\envs\videolingo\lib\site-packages\demucs\api.py", line 271, in separate_tensor
out = apply_model(
File "D:\Soft\anaconda3\envs\videolingo\lib\site-packages\demucs\apply.py", line 216, in apply_model
res = apply_model(sub_model, mix, **kwargs, callback_arg=callback_arg)
File "D:\Soft\anaconda3\envs\videolingo\lib\site-packages\demucs\apply.py", line 253, in apply_model
out += shifted_out[..., max_shift - offset:]
RuntimeError: [enforce fail at ..\c10\core\impl\alloc_cpu.cpp:72] data. DefaultCPUAllocator: not enough memory: you tried to allocate 42681172032 bytes.

@colin4k
Copy link
Author

colin4k commented Nov 6, 2024

重新启动看了下,系统本身日常占用 6G 多内存,启动 Videilingo 后变成 12G 多,开始Demucs 后马上把 60G+内存全部占满,然后报错
截屏2024-11-06 10 28 59

@Huanshere
Copy link
Owner

这很奇怪,这是个很成熟的库,而且用法也很简单,我暂时没有复现过

@colin4k
Copy link
Author

colin4k commented Nov 8, 2024

这很奇怪,这是个很成熟的库,而且用法也很简单,我暂时没有复现过

我估计是因为处理的对象是一个 2g 多时长 8 个多小时的文件

@Huanshere
Copy link
Owner

没有测试过这么长的文件,但是在处理的时候是会切分音频的,理论上也不会爆内存()

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