Preprocessing Error on CPU
Hi. I'm trying to preprocess audio data for my test model -- with RMVPE, hubertsoft, and nsf_hifigan -- since there aren't any new sample models I could see.
I'm running Miniconda 3 using Python 3.8 on Windows 10 with CPU versions of torch 2.0.0 and torchaudio 2.0.1 installed. I have an NVIDIA GPU (GTX1050), but I believe 4GB of VRAM isn't sufficient to run audio projects like this, or any AI project at all.
It seems from my understanding that torch is trying to load a CUDA device when I only installed the CPU versions.
Here's my traceback (edited for anonymity):
> (_ddsp-miniconda1) D:\My Downloads\AI Audio Projects\DDSP-SVC-5.0>python preprocess.py -c configs/combsub.yaml
> 2025-01-05 17:56:13 | INFO | fairseq.tasks.text_to_speech | Please install tensorboardX: pip install tensorboardX
> Traceback (most recent call last):
> File "preprocess.py", line 159, in <module>
> f0_extractor = F0_Extractor(
> File "D:\My Downloads\AI Audio Projects\DDSP-SVC-5.0\ddsp\vocoder.py", line 37, in __init__
> F0_KERNEL['rmvpe'] = RMVPE('pretrain/rmvpe/model.pt', hop_length=160)
> File "D:\My Downloads\AI Audio Projects\DDSP-SVC-5.0\encoder\rmvpe\inference.py", line 14, in __init__
> ckpt = torch.load(model_path)
> File "D:\Programs\Miniconda3\envs\_ddsp-miniconda1\lib\site-packages\torch\serialization.py", line 809, in load
> return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
> File "D:\Programs\Miniconda3\envs\_ddsp-miniconda1\lib\site-packages\torch\serialization.py", line 1172, in _load
> result = unpickler.load()
> File "D:\Programs\Miniconda3\envs\_ddsp-miniconda1\lib\site-packages\torch\serialization.py", line 1142, in persistent_load
> typed_storage = load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
> File "D:\Programs\Miniconda3\envs\_ddsp-miniconda1\lib\site-packages\torch\serialization.py", line 1116, in load_tensor
> wrap_storage=restore_location(storage, location),
> File "D:\Programs\Miniconda3\envs\_ddsp-miniconda1\lib\site-packages\torch\serialization.py", line 217, in default_restore_location
> result = fn(storage, location)
> File "D:\Programs\Miniconda3\envs\_ddsp-miniconda1\lib\site-packages\torch\serialization.py", line 182, in _cuda_deserialize << (I don't know where _that_ came from.)
> device = validate_cuda_device(location)
> File "D:\Programs\Miniconda3\envs\_ddsp-miniconda1\lib\site-packages\torch\serialization.py", line 166, in validate_cuda_device
> raise RuntimeError('Attempting to deserialize object on a CUDA '
> RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
How do I map the torch.load function to CPU, or what might have I done wrong?
I do apologize if I missed any FAQs, closed issues, or general traditions in GitHub; it's my first time ever opening an issue.
Thank you for reading, and have a good (rest of your) day!
关闭于 2025-01-12 4 条评论