语音识别阶段出错[阿里FunASR(本地)(本地内置)] CUDA out of memory. Tried to allocate 3.42 GiB. GPU 0 has a total capacity of 7.96 GiB of which 0 bytes is free. Of the allocated memory 10.50 GiB is allocated by PyTorch, and 1.65 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables):Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 636, in funasr_mlt
File "funasr\auto\auto_model.py", line 324, in generate
return self.inference(File "funasr\auto\auto_model.py", line 381, in inference
res = model.inference(**batch, **kwargs)File "D:\Tool/win-pyvideotrans-v4.03-0622/videotrans/codes\model.py", line 610, in inference
return self.inference_llm(File "D:\Tool/win-pyvideotrans-v4.03-0622/videotrans/codes\model.py", line 628,
......
task
File "videotrans\task\trans_create.py", line 319, in recogn
File "videotrans\recognition\__init__.py", line 191, in run
File "videotrans\recognition\_base.py", line 90, in run
File "videotrans\recognition\_funasr.py", line 61, in _exec
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: CUDA out of memory. Tried to allocate 3.42 GiB. GPU 0 has a total capacity of 7.96 GiB of which 0 bytes is free. Of the allocated memory 10.50 GiB is allocated by PyTorch, and 1.65 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables):Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 636, in funasr_mlt
File "funasr\auto\auto_model.py", line 324, in generate
return self.inference(File "funasr\auto\auto_model.py", line 381, in inference
res = model.inference(**batch, **kwargs)File "D:\Tool/win-pyvideotrans-v4.03-0622/videotrans/codes\model.py", line 610, in inference
return self.inference_llm(File "D:\Tool/win-pyvideotrans-v4.03-0622/videotrans/codes\model.py", line 628, in inference_llm
inputs_embeds, contents, batch, source_ids, meta_data = self.inference_prepare(File "D:\Tool/win-pyvideotrans-v4.03-0622/videotrans/codes\model.py", line 496, in inference_prepare
encoder_out, encoder_out_lens = self.audio_adaptor(File "torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "D:\Tool\win-pyvideotrans-v4.03-0622\_internal\funasr\models\llm_asr\adaptor.py", line 153, in forward
x, masks = block(x, masks)File "torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "D:\Tool\win-pyvideotrans-v4.03-0622\_internal\funasr\models\transformer\encoder.py", line 122, in forward
x = residual + stoch_layer_coeff * self.dropout(self.self_attn(x_q, x, x, mask))File "torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "D:\Tool\win-pyvideotrans-v4.03-0622\_internal\funasr\models\transformer\attention.py", line 120, in forward
return self.forward_attention(v, scores, mask)File "D:\Tool\win-pyvideotrans-v4.03-0622\_internal\funasr\models\transformer\attention.py", line 90, in forward_attention
attn = torch.softmax(scores, dim=-1).masked_fill(torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 3.42 GiB. GPU 0 has a total capacity of 7.96 GiB of which 0 bytes is free. Of the allocated memory 10.50 GiB is allocated by PyTorch, and 1.65 GiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: G:/七天(1)/2020.10.8(第一场)极品00后小萝莉奶声奶气,苗条清新沙发啪啪激情无限.mp4,
输出结果保存到文件夹: G:/七天(1)/_video_out/2020.10.8(第一场)极品00后小萝莉奶声奶气,苗条清新沙发啪啪激情无限-mp4,
临时文件夹: D:/Tool/win-pyvideotrans-v4.03-0622/tmp/23908/31ed3580c8
已选 清理已存在
已选 启用CUDA加速
未选 降噪
语音识别:阿里FunASR(本地)(本地内置), model_name: Fun-ASR-Nano-2512, 发音语言: 简体中文, 断句方式:默认断句
发音语言和目标语言相同,不翻译字幕
已选 将生成的字幕复制到视频目录下
输出字幕格式: 单字幕
代理地址:
=
system:Windows-10-10.0.26200-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/Tool/win-pyvideotrans-v4.03-0622