New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conv3D is not supported on MPS #2044
Comments
Did you find solution? I have same problem.... |
Same here, needs solution thanks~ |
This may help pytorch/pytorch#114183 and gets me past an error that looks similar to yours. |
I also found that but don’t know what to do with it. 🫣 Some tip for a noobie…? |
@groovybits it works but then there are other errors like [MPSNDArray initWithDevice:descriptor:] Error: total bytes of NDArray > 2**32 MPS is alpha not beta 😢 |
@Theodor800 I installed that pull request with: pip install git+https://github.com/pytorch/pytorch@refs/pull/114183/head. Takes A WHILE. I get this error now on the KSampler: `Error occurred when executing KSampler: unsupported operand type(s) for *=: 'int' and 'NoneType' File "/Users/jackwooldridge/StableDiffusion/ComfyUI/execution.py", line 153, in recursive_execute |
@jwooldridge234 Thank you. Have to try that soon. I had also that operand type error, but you'll solve that by uninstalling FreeU_Advanced node. |
@Theodor800 Thanks- that solved that error. Now just crashes on render (running the first img2vid workflow from the examples):
|
@jwooldridge234 Errors after errors everyday. 😀 I hope you find solution for that one. I got mine to work now. So thank you very much! And thanks @groovybits! |
I'm working on that PR. I found an issue in the Conv3D implementation and I need to debug it and write tests for it before making the PR as ready for review. |
Try something like:
At least until @LucasSte 's PR is merged. |
Error occurred when executing KSampler: Conv3D is not supported on MPS Hi All, anyone able to solve this one please. |
Please help on this issue |
I dont know if this helps but I just found it https://github.com/cocktailpeanut/mac-svd-install |
I tried pip install git+https://github.com/pytorch/pytorch@refs/pull/114183/head git+https://github.com/pytorch/vision git+https://github.com/pytorch/audio Its taking almost 2 hours and showing below command Preparing metadata (pyproject.toml) ... | |
Finally end up with below error. Resolved https://github.com/pytorch/audio to commit ccd78ffba3208b4a9f5face4bd76e942ddc2d4a3 × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. |
Pytorch issue. I had similar error and I couldnt even run comfyUI anymore after trying it so had to uninstall torch and re-install. Comfy works now but still cannot get SVD to run. Probably best to wait till its resolved. |
@thekannanmca i'm also experiencing the same exact error. please let me know if you figure out a workaround |
A workaround would be using the code from my PR (pytorch/pytorch#114183). You would need to clone the repository, fetch my PR's changes and build PyTorch from scratch. This is a bit time consuming.
|
The core issue encountered was that the Conv3D operation is currently not supported on Apple's Metal Performance Shaders (MPS) through PyTorch. To utilize Conv3D with MPS, we must await an update from PyTorch that extends support for this functionality. In the interim, I devised a workaround to circumvent this limitation. The modification was made in the model_management.py file within the ComfyUI directory: The original function get_torch_device() contained logic to determine and return the appropriate compute device based on the current environment's capabilities: def get_torch_device(): def get_torch_device(): By applying this change, the Conv3D operation and other computations are forced to run on the CPU. While this resolves the immediate compatibility issue, it's important to note that computation will be slower due to the CPU's comparative performance limitations. The model will function correctly, albeit with increased processing times for generating the output. This solution is a temporary measure until PyTorch introduces MPS support for the Conv3D operation, after which full hardware acceleration can be leveraged for improved efficiency. |
I'm getting a segmentation fault 11 once it gets to the ksampler (Running on a mac m2 with 24G). I also saw that someone running on an M1 Ultra studio has the same issue. Stability-AI/StableSwarmUI#185 (comment). |
@jwooldridge234 I have the same error that you had last week. UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown Did you ever find a solution? |
@mynameisbill Afraid not- going to wait until pytorch gets patched to get this working locally. |
As of now I am using AnimatedDiff, I am hoping for the best for this issue to be resolved |
Bumping as this appears to have been fixed in pytorch #pytorch/pytorch#114183 |
FWIW I just tried running SVD using ComfyUI with the latest PyTorch nightly that includes Conv3D support on a 16gb M1. I am no longer getting the Conv3D not supported error, but I am running out of memory:
I ran ComfyUI using |
Running ComfyUI with SVD XT on MBP M1 32GB. Installed pytorch versions: Using the Although it's the 25 frames model, I too get The only way I get it to work without errors is to configure the conditioning node to |
What about Macbook M1 Air with 8GB RAM? |
@KarthikDani haven't tried with the M1 Air 8GB, I believe there's not enough RAM, and with the pro it takes over 20 minutes so yeah... |
It works for me but Too slow to apply it... |
I had the same error in Stable Diffusion Forge installed inside Pinokio. It was solved by reinstalling Torch, i.e. doing the following: Close Pinokio By the way, both Automatic1111 and ComfyUI are too slow on Mac Silicon. |
thx a lot, this approach really worked. after several hours trying. Tried on M3, python 3.11.7. 24/03/28 |
Thx too. It works. but 'ConvTranspose 3D is not supported on MPS' has not fix in pre version |
failed to run SVD(stable video diffusion) on macOS
anyone can help?
Conv3D support on macOS
The text was updated successfully, but these errors were encountered: