Compatiblity with PyTorch 2.4+ (weights_only default value changed) - #619
const-volatile wants to merge 1 commit into
Conversation
Starting from version 2.4 PyTorch introduces a stricter check for the objects which can be loaded with torch.load(); to use bark successfully with PyTorch>=2.4 the weights_only attribute needs to be set explicitly
|
Same here. For the time being, or in case the PR does not get merged, a workaround as explained here would be to set TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD environment variable to "1". You can do it in your operating system or just in python code (e.g. However, you'll get a warning like this: As const-volatile pointed out, starting in version 2.4, pytorch wants you to explicitly pass weights_only parameter. If you do so, it would ignore the variable. |
|
When will this be merged? |
|
please merge it thanks! |
|
Wish I had seen this. I monkeypatched the torch.load and got it to work. |
|
Isn't it possible to make this project work with |
Starting from version 2.4 PyTorch introduces a stricter check for the objects which can be loaded with torch.load(); to use bark successfully with PyTorch>=2.4 the weights_only attribute needs to be set explicitly.
Without this change the following error will occur:
python3 -m bark --text "Hello, my name is Suno." --output_filename "example.wav"