Open cczw2010 opened 1 year ago
Got the same error. On Mac Mini M2
+1 mbp m1 pro
same error on Macbook M2 MAX
Same error on mbp m1 pro
https://github.com/Plachtaa/VALL-E-X/pull/102/files I commented out the codes. I am using CPUs that are working now.
https://github.com/Plachtaa/VALL-E-X/pull/102/files I commented out the codes. I am using CPUs that are working now.
but the same error. Does the running code need any modifications?
https://github.com/Plachtaa/VALL-E-X/pull/102/files I commented out the codes. I am using CPUs that are working now.
If I comment MPS support part, I will get no hardware supported error
https://github.com/Plachtaa/VALL-E-X/pull/102/files I commented out the codes. I am using CPUs that are working now.
It is working now to use CPU, is it still not possible today to utilize MPS in Vall-E?
I met the same error. Here is the output of the command line terminal.
/Users//work/study/exercises/VALL-E-X/venv/lib/python3.10/site-packages/torch/nn/utils/weight_norm.py:30: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
VALL-E EOS [0 -> 897]
libc++abi: terminating due to uncaught exception of type c10::Error: Unsupported type byte size: ComplexFloat
Exception raised from getGatherScatterScalarType at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/native/mps/operations/View.mm:744 (most recent call first):
frame #0: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) + 92 (0x100dd78d0 in libc10.dylib)
frame #1: at::native::mps::getGatherScatterScalarType(at::Tensor const&) + 400 (0x113a2b2e0 in libtorch_cpu.dylib)
frame #2: invocation function for block in at::native::mps::gatherViewTensor(at::Tensor const&, at::Tensor&) + 132 (0x113a2a220 in libtorch_cpu.dylib)
frame #3: _dispatch_client_callout + 20 (0x1873c0910 in libdispatch.dylib)
frame #4: _dispatch_lane_barrier_sync_invoke_and_complete + 56 (0x1873cfcc4 in libdispatch.dylib)
frame #5: at::native::mps::gatherViewTensor(at::Tensor const&, at::Tensor&) + 896 (0x113a28c90 in libtorch_cpu.dylib)
frame #6: at::native::mps::mps_copy_(at::Tensor&, at::Tensor const&, bool) + 3896 (0x113952e58 in libtorch_cpu.dylib)
frame #7: at::native::copy_impl(at::Tensor&, at::Tensor const&, bool) + 2592 (0x10f1ebec0 in libtorch_cpu.dylib)
frame #8: at::native::copy_(at::Tensor&, at::Tensor const&, bool) + 100 (0x10f1eb3e0 in libtorch_cpu.dylib)
frame #9: at::_ops::copy_::call(at::Tensor&, at::Tensor const&, bool) + 292 (0x10ff71960 in libtorch_cpu.dylib)
frame #10: at::native::clone(at::Tensor const&, c10::optional<c10::MemoryFormat>) + 456 (0x10f56f018 in libtorch_cpu.dylib)
frame #11: at::_ops::clone::call(at::Tensor const&, c10::optional<c10::MemoryFormat>) + 280 (0x10fc35bd0 in libtorch_cpu.dylib)
frame #12: at::_ops::contiguous::call(at::Tensor const&, c10::MemoryFormat) + 280 (0x1100b8230 in libtorch_cpu.dylib)
frame #13: at::TensorBase::__dispatch_contiguous(c10::MemoryFormat) const + 40 (0x10f0321ac in libtorch_cpu.dylib)
frame #14: at::native::mps::binaryOpTensor(at::Tensor const&, at::Tensor const&, c10::Scalar const&, at::Tensor const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, MPSGraphTensor* (at::native::mps::BinaryOpCachedGraph*, MPSGraphTensor*, MPSGraphTensor*) block_pointer) + 940 (0x1139386b8 in libtorch_cpu.dylib)
frame #15: at::native::structured_mul_out_mps::impl(at::Tensor const&, at::Tensor const&, at::Tensor const&) + 112 (0x11393b3e4 in libtorch_cpu.dylib)
frame #16: c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, at::Tensor const&), &at::(anonymous namespace)::wrapper_MPS_mul_Tensor(at::Tensor const&, at::Tensor const&)>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, at::Tensor const&>>, at::Tensor (at::Tensor const&, at::Tensor const&)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, at::Tensor const&) + 136 (0x110d36ac8 in libtorch_cpu.dylib)
frame #17: at::_ops::mul_Tensor::call(at::Tensor const&, at::Tensor const&) + 288 (0x10fa3336c in libtorch_cpu.dylib)
frame #18: torch::autograd::THPVariable_mul(_object*, _object*, _object*) + 408 (0x102f5cc14 in libtorch_python.dylib)
frame #19: _object* torch::autograd::TypeError_to_NotImplemented_<&torch::autograd::THPVariable_mul(_object*, _object*, _object*)>(_object*, _object*, _object*) + 12 (0x102eb5384 in libtorch_python.dylib)
frame #20: method_vectorcall_VARARGS_KEYWORDS + 156 (0x10132b9c0 in Python)
frame #21: slot_nb_multiply + 236 (0x1013b3430 in Python)
frame #22: binary_op1 + 228 (0x1012f7ab0 in Python)
frame #23: PyNumber_Multiply + 36 (0x1012f80c0 in Python)
frame #24: _PyEval_EvalFrameDefault + 3844 (0x101446698 in Python)
frame #25: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #26: method_vectorcall + 288 (0x101320c64 in Python)
frame #27: _PyEval_EvalFrameDefault + 1472 (0x101445d54 in Python)
frame #28: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #29: method_vectorcall + 288 (0x101320c64 in Python)
frame #30: _PyEval_EvalFrameDefault + 1472 (0x101445d54 in Python)
frame #31: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #32: _PyObject_FastCallDictTstate + 96 (0x10131cfb0 in Python)
frame #33: slot_tp_call + 196 (0x1013afccc in Python)
frame #34: _PyObject_MakeTpCall + 136 (0x10131ccf8 in Python)
frame #35: call_function + 380 (0x101453238 in Python)
frame #36: _PyEval_EvalFrameDefault + 23772 (0x10144b470 in Python)
frame #37: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #38: PyVectorcall_Call + 140 (0x10131d800 in Python)
frame #39: _PyEval_EvalFrameDefault + 1472 (0x101445d54 in Python)
frame #40: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #41: method_vectorcall + 124 (0x101320bc0 in Python)
frame #42: call_function + 132 (0x101453140 in Python)
frame #43: _PyEval_EvalFrameDefault + 17484 (0x101449be0 in Python)
frame #44: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #45: _PyEval_EvalFrameDefault + 1472 (0x101445d54 in Python)
frame #46: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #47: call_function + 132 (0x101453140 in Python)
frame #48: _PyEval_EvalFrameDefault + 17352 (0x101449b5c in Python)
frame #49: _PyEval_Vector + 360 (0x101443f28 in Python)
frame #50: pyrun_file + 308 (0x1014aec54 in Python)
frame #51: _PyRun_SimpleFileObject + 336 (0x1014ae398 in Python)
frame #52: _PyRun_AnyFileObject + 216 (0x1014ad9e4 in Python)
frame #53: pymain_run_file_obj + 180 (0x1014d9dd0 in Python)
frame #54: pymain_run_file + 72 (0x1014d9470 in Python)
frame #55: pymain_run_python + 300 (0x1014d8a58 in Python)
frame #56: Py_RunMain + 24 (0x1014d88ec in Python)
frame #57: pymain_main + 56 (0x1014d9f78 in Python)
frame #58: Py_BytesMain + 40 (0x1014da23c in Python)
frame #59: start + 2360 (0x1871f10e0 in dyld)
zsh: abort python test1.py
I attached the runtime environment information for you to refer to.
Collecting environment information...
PyTorch version: 2.1.2
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 14.2 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.1.0.2.5)
CMake version: version 3.27.8
Libc version: N/A
Python version: 3.10.11 (v3.10.11:7d4cc5aa85, Apr 4 2023, 19:05:19) [Clang 13.0.0 (clang-1300.0.29.30)] (64-bit runtime)
Python platform: macOS-14.2-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Apple M3 Max
Versions of relevant libraries:
[pip3] numpy==1.26.2
[pip3] torch==2.1.2
[pip3] torchaudio==2.1.2
[pip3] torchvision==0.16.2
[conda] numpy 1.24.3 py311hb57d4eb_0
[conda] numpy-base 1.24.3 py311h1d85a46_0
[conda] numpydoc 1.5.0 py311hca03da5_0
[conda] open-clip-torch 2.23.0 pypi_0 pypi
[conda] pytorch 2.2.0.dev20231206 py3.11_0 pytorch-nightly
[conda] pytorch-lightning 2.1.2 pypi_0 pypi
[conda] pytorch-optimizer 2.12.0 pypi_0 pypi
[conda] torch 2.1.1 pypi_0 pypi
[conda] torchaudio 2.1.1 pypi_0 pypi
[conda] torchdiffeq 0.2.3 pypi_0 pypi
[conda] torchmetrics 1.2.0 pypi_0 pypi
[conda] torchsde 0.2.6 pypi_0 pypi
[conda] torchvision 0.16.1 pypi_0 pypi
Here is the test1.py code that I ran:
from utils.generation import SAMPLE_RATE, generate_audio, preload_models
from scipy.io.wavfile import write as write_wav
from IPython.display import Audio
# download and load all models
preload_models()
# generate audio from text
text_prompt = """
Hello, my name is Nose. And uh, and I like hamburger. Hahaha... But I also have other interests such as playing tactic toast.
"""
audio_array = generate_audio(text_prompt)
# save audio to disk
write_wav("vallex_generation.wav", SAMPLE_RATE, audio_array)
# play text in notebook
Audio(audio_array, rate=SAMPLE_RATE)
Get same error +1
Just found a way around, it works now for me.
utils/generation.py
line 30:
Force the device to CPU
device = torch.device("cpu")
if torch.cuda.is_available():
device = torch.device("cuda", 0)
# if torch.backends.mps.is_available():
# device = torch.device("mps")
@KodeurKubik yep. But not all the relevant code is commented out. plz check that comment and PR: https://github.com/Plachtaa/VALL-E-X/issues/109#issuecomment-1785520107
System : Apple (mac pro m2) Use 12 cpu cores for computing 。
when i use Infer from prompt show this error