mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-11-05 00:27:30 +00:00
[GH-ISSUE #136] Support for Apple's MPS [?] #53
Labels
No labels
AMD/Intel
bug
bug
bug
colab
dependencies
documentation
duplicate
enhancement
following up
good first issue
help wanted
invalid
question
stale
stale
stale
todo list
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
RVC-Project/Retrieval-based-Voice-Conversion-WebUI#53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @escoolioinglesias on GitHub (Apr 23, 2023).
Original GitHub issue: https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/issues/136
Originally assigned to: @Tps-F on GitHub.
Will MPS be supported in the future and will it be possible to train models on Apple Silicon chips? 🙏
Thank you! 🙌
@Tps-F commented on GitHub (Apr 23, 2023):
Now I'm doing-
@IIIIIIIllllllllIIIII commented on GitHub (Apr 25, 2023):
cant wait!!!!!
@ricardo410 commented on GitHub (Jun 5, 2023):
hello any update on this?
@Naozumi520 commented on GitHub (Jun 7, 2023):
Isn't it supported?
@ricardo410 commented on GitHub (Jun 7, 2023):
@Naozumi520 only for infer, not for training.
@Tps-F commented on GitHub (Jun 7, 2023):
Train fixed
bf11700125@Naozumi520 commented on GitHub (Jun 7, 2023):
Yep forgot to mentioned. They haven't released in the package. I do it by copying
train_nsf_sim_cache_sid_load_pretrain.pyandtrain/process_ckpt.pyfrom repo to my folder and replace them.@ricardo410 commented on GitHub (Jun 7, 2023):
@Naozumi520 can you train? it gives me an error.
Retrieval-based-Voice-Conversion-WebUI-main/train/utils.py", line 206, in latest_checkpoint_path
x = f_list[-1]
IndexError: list index out of range
@Naozumi520 commented on GitHub (Jun 8, 2023):
That's weird. Yes I'm able to train.
@escoolioinglesias commented on GitHub (Jun 8, 2023):
@Naozumi520 Have you been able to use your trained models to successfully infer? What version of RVC do you have?
@Naozumi520 commented on GitHub (Jun 8, 2023):
Yes. I'm using the version updated0528v2
@ricardo410 commented on GitHub (Jun 8, 2023):
it is already working, but I thought that the training would be faster, because of the characteristics of my mac, but in reality it is slower than training online.
@Naozumi520 commented on GitHub (Jun 8, 2023):
Yeah so do I! I was wondering was mps running on my graphic card or cpu. Cuz I'm intel cpu.
@ricardo410 commented on GitHub (Jun 9, 2023):
Any idea how to solve this?
@Tps-F commented on GitHub (Jun 12, 2023):
I think one of the reasons is that some functions in Pytorch do not support mps.
and I am rewriting the code and will let you know if I find anything.
@ricardo410 commented on GitHub (Jun 12, 2023):
ok thank you!!!
@Naozumi520 commented on GitHub (Jun 12, 2023):
Yes! Like we have to set
PYTORCH_ENABLE_MPS_FALLBACKto 1 and it might actually use the cpu for some functions?And I'm not sure is MPS really using my AMD graphic card? I put
0-1in every options.@Tps-F commented on GitHub (Jun 12, 2023):
Sorry, AMD graphics cards are not supported.(from #272 )
@Naozumi520 commented on GitHub (Jun 13, 2023):
Wait no I'm talking about on a Mac, which supported by MPS.
https://developer.apple.com/metal/pytorch/
@ricardo410 commented on GitHub (Jun 13, 2023):
did it work for you?
@Naozumi520 commented on GitHub (Jun 13, 2023):
Yep as I said before I'm able to do train and inference.
However, the speed is slower than I thought as you mentioned.
@ricardo410 commented on GitHub (Jun 13, 2023):
I was referring to this https://developer.apple.com/metal/pytorch/
@Naozumi520 commented on GitHub (Jun 13, 2023):
No and we don't have to follow this. PyTorch have builtin support for MPS already.
@ricardo410 commented on GitHub (Jun 13, 2023):
if you have it, why is the training so slow? it took me 19 hours to train a 12 minute dataset with 300 epochs.
@Naozumi520 commented on GitHub (Jun 13, 2023):
If we have no MPS then we won't even be able to train the model. It's likely as @Tps-F mentioned, some functions in torch required cuda are not supported by MPS yet. Like I mentioned I was required to put the flag
PYTORCH_ENABLE_MPS_FALLBACKto1. This make those unsupported function use cpu as a fallback when MPS is not supported.@an-internet-user001 commented on GitHub (Sep 2, 2023):
Is anyone training successfully on an Apple Silicone system AND utilizing the GPUs?
@Tps-F commented on GitHub (Sep 2, 2023):
What device configuration do you have?
@an-internet-user001 commented on GitHub (Sep 2, 2023):
I have an M2 Max Mac Studio.
@an-internet-user001 commented on GitHub (Sep 2, 2023):
Apologies if I am behind on this issue, but it seems as though PyTorch supports MPS now, or is this not the case? Would you need to essentially "swap" this out for the currently implemented CUDA? (sorry if I sound a little ignorant on the topic as I am purely a hobbyist.
MPS BACKEND
mps device enables high-performance training on GPU for MacOS devices with Metal programming framework. It introduces a new device to map Machine Learning computational graphs and primitives on highly efficient Metal Performance Shaders Graph framework and tuned kernels provided by Metal Performance Shaders framework respectively.
The new MPS backend extends the PyTorch ecosystem and provides existing scripts capabilities to setup and run operations on GPU.
To get started, simply move your Tensor and Module to the mps device:
Check that MPS is available
if not torch.backends.mps.is_available():
if not torch.backends.mps.is_built():
print("MPS not available because the current PyTorch install was not "
"built with MPS enabled.")
else:
print("MPS not available because the current MacOS version is not 12.3+ "
"and/or you do not have an MPS-enabled device on this machine.")
else:
mps_device = torch.device("mps")
@Tps-F commented on GitHub (Sep 2, 2023):
PyTorchpartially supports mps.
Unfortunately, not all operations can be done in mps.
@an-internet-user001 commented on GitHub (Sep 4, 2023):
So my understanding then is it's not possible to leverage GPUs on Apple Silicone Mac for training. Is this correct or is it possible?
@an-internet-user001 commented on GitHub (Oct 30, 2023):
Was curious if there had been any update to this, or if GPU acceleration on Apple Silicon is still not possible. Hope all are well!
@maxamly commented on GitHub (Dec 24, 2023):
Hey guys! Are there any updates on this?
@Amusesmile commented on GitHub (Feb 26, 2024):
How fast is inference when using MPS compared to real time? I've seen CPU inference at about 2x real time.
@Excurl commented on GitHub (Apr 8, 2024):
any update?
@an-internet-user001 commented on GitHub (Apr 8, 2024):
I don’t think this GitHub is actively monitored or worked on any more sadly.
On Mon, Apr 8, 2024 at 1:50 PM Excurl @.***> wrote:
@rponeawa commented on GitHub (Nov 22, 2024):
Any update?
@saiisa commented on GitHub (Jun 13, 2025):
Training successfully with M4 max, but failed for inference, because failed for feature extraction, because the program cannot recognize Mac GPU ...