语音识别阶段出错[Qwen-ASR(本地内置)] CUDA out of memory. Tried to allocate 24.00 MiB. GPU 0 has a total capacity of 4.00 GiB of which 0 bytes is free. Of the allocated memory 3.42 GiB is allocated by PyTorch, and 37.81 MiB 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 544, in qwen3asr_fun
File "D:\download\pyVideoTrans\_internal\qwen_asr\inference\qwen3_asr.py", line 206, in from_pretrained
model = AutoModel.from_pretrained(pretrained_model_name_or_path, **kwargs)File "transformers\models\auto\auto_factory.py", line 604, in from_pretrained
return model_class.from_pretrained(File "transformers\modeling_utils.py", line 277, in _wrapper
return func(*args, **kwarg......
allocated by PyTorch, and 37.81 MiB 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\task\job.py", line 35, in run
File "videotrans\task\job.py", line 100, in process_task
File "videotrans\task\speech2text.py", line 97, in recogn
File "videotrans\recognition\__init__.py", line 191, in run
File "videotrans\recognition\_base.py", line 90, in run
File "videotrans\recognition\_qwenasrlocal.py", line 45, in _exec
File "videotrans\configure\base.py", line 272, in _new_process
videotrans.configure.excepts.VideoTransError: CUDA out of memory. Tried to allocate 24.00 MiB. GPU 0 has a total capacity of 4.00 GiB of which 0 bytes is free. Of the allocated memory 3.42 GiB is allocated by PyTorch, and 37.81 MiB 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 544, in qwen3asr_fun
File "D:\download\pyVideoTrans\_internal\qwen_asr\inference\qwen3_asr.py", line 206, in from_pretrained
model = AutoModel.from_pretrained(pretrained_model_name_or_path, **kwargs)File "transformers\models\auto\auto_factory.py", line 604, in from_pretrained
return model_class.from_pretrained(File "transformers\modeling_utils.py", line 277, in _wrapper
return func(*args, **kwargs)File "transformers\modeling_utils.py", line 5048, in from_pretrained
) = cls._load_pretrained_model(File "transformers\modeling_utils.py", line 5468, in _load_pretrained_model
_error_msgs, disk_offload_index = load_shard_file(args)File "transformers\modeling_utils.py", line 843, in load_shard_file
disk_offload_index = _load_state_dict_into_meta_model(File "torch\utils\_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)File "transformers\modeling_utils.py", line 750, in _load_state_dict_into_meta_model
param = param.to(casting_dtype)torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 24.00 MiB. GPU 0 has a total capacity of 4.00 GiB of which 0 bytes is free. Of the allocated memory 3.42 GiB is allocated by PyTorch, and 37.81 MiB 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=TaskCfgSTT(uuid='6f1ee0d9fa', name='D:/张建光/姜胡说/2021年/@姜胡说_20201008_我Z核心的底层方法之一_建议多看几遍_刻意练习_值....mp4', dirname='D:/张建光/姜胡说/2021年', noextname='@姜胡说_20201008_我Z核心的底层方法之一_建议多看几遍_刻意练习_值...', basename='@姜胡说_20201008_我Z核心的底层方法之一_建议多看几遍_刻意练习_值....mp4', ext='mp4', target_dir='D:/download/pyVideoTrans/output/recogn', cache_folder='D:/download/pyVideoTrans/tmp/10384/6f1ee0d9fa', is_cuda=True, source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code=None, target_sub='D:/download/pyVideoTrans/output/recogn/@姜胡说_20201008_我Z核心的底层方法之一_建议多看几遍_刻意练习_值....srt', target_wav=None, target_wav_output=None, detect_language='zh-cn', recogn_type=2, model_name='1.7B', shibie_audio='D:/download/pyVideoTrans/tmp/10384/6f1ee0d9fa/@姜胡说_20201008_我Z核心的底层方法之一_建议多看几遍_刻意练习_值...-1782386957.9285924.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=0)
=
system:Windows-10-10.0.26200-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/download/pyVideoTrans