语音识别阶段出错[Qwen-ASR(内置)] CUDA out of memory. Tried to allocate 15.83 GiB. GPU 0 has a total capacity of 8.00 GiB of which 0 bytes is free. Of the allocated memory 5.17 GiB is allocated by PyTorch, and 1.68 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_qwen.py", line 83, in qwen3asr_fun
File "C:\SOFT\pyvideotrans\_internal\torch\utils\_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\generation\utils.py", line 2645, in generate
result = decoding_method(File "C:\SOFT\pyvideotrans\_internal\transformers\generation\utils.py", line 2845, in _sample
outputs = self._prefill(File "C:\SOFT\pyvideotrans\_internal\transformers\generation\utils.py", line 3896, in _prefill
return self(**model_inputs, return_dict=True)File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\utils\generic.py", line 911, in w
......
n3_asr\modeling_qwen3_asr.py", line 649, in forward
outputs = self.model(File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\utils\generic.py", line 911, in wrapper
output = func(self, *args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\models\qwen3_asr\modeling_qwen3_asr.py", line 557, in forward
outputs = self.language_model(File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\utils\generic.py", line 1040, in wrapper
output = func(self, *args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\utils\output_capturing.py", line 252, in wrapper
outputs = func(self, *args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\models\qwen3\modeling_qwen3.py", line 424, in forward
hidden_states = decoder_layer(File "C:\SOFT\pyvideotrans\_internal\transformers\modeling_layers.py", line 93, in call
return super().__call__(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\models\qwen3\modeling_qwen3.py", line 318, in forward
hidden_states, _ = self.self_attn(File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1751, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\torch\nn\modules\module.py", line 1762, in _call_impl
return forward_call(*args, **kwargs)File "C:\SOFT\pyvideotrans\_internal\transformers\models\qwen3\modeling_qwen3.py", line 277, in forward
attn_output, attn_weights = attention_interface(File "C:\SOFT\pyvideotrans\_internal\transformers\integrations\sdpa_attention.py", line 93, in sdpa_attention_forward
attn_output = torch.nn.functional.scaled_dot_product_attention(torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 15.83 GiB. GPU 0 has a total capacity of 8.00 GiB of which 0 bytes is free. Of the allocated memory 5.17 GiB is allocated by PyTorch, and 1.68 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)
trk=语音转录
self.cfg.name='I:/25 715-719/R_MIC_250715-165653.mp3',
self.cfg.target_dir='c:/soft/pyvideotrans/output/recogn',
self.cfg.cache_folder='C:/SOFT/pyvideotrans/tmp/30412/5de016679a'
self.cfg.is_cuda=True
Selected 恢复标点(cn/en)
Selected 识别说话人: 不限数量
语音识别:Qwen-ASR(内置), 0.6B, 发音语言: zh
max_speech_duration_s_title: 10s
min_speech_duration_ms_title: 3000ms
min_silence_duration_ms_title: 140ms
threshold_title: 0.45
vad_type_title: silero
输出格式: srt
cjk_len_title:20, other_len_title:60
Selected: 保存到原位置
self.cfg=TaskCfgSTT(uuid='5de016679a', name='I:/25 715-719/R_MIC_250715-165653.mp3', dirname='I:/25 715-719', noextname='R_MIC_250715-165653', basename='R_MIC_250715-165653.mp3', ext='mp3', target_dir='c:/soft/pyvideotrans/output/recogn', cache_folder='C:/SOFT/pyvideotrans/tmp/30412/5de016679a', is_cuda=True, source_language='', source_language_code='', source_sub=None, source_wav=None, source_wav_output=None, target_language='', target_language_code='', target_sub='c:/soft/pyvideotrans/output/recogn/R_MIC_250715-165653.srt', target_wav=None, target_wav_output=None, detect_language='zh', recogn_type=2, model_name='0.6B', shibie_audio='C:/SOFT/pyvideotrans/tmp/30412/5de016679a/R_MIC_250715-165653-1794224476.633673.wav', remove_noise=False, enable_diariz=True, nums_diariz=0, rephrase=False, fix_punc=1)
=
system:Windows-10-10.0.26300-SP0
version:v4.18
frozen:True
language:zh
root_dir:C:/SOFT/pyvideotrans