Skip to content
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

Apple M2 uses model "sam_vit_l_0b3195.pth" error #138

Open
WKnight233 opened this issue Mar 1, 2024 · 1 comment
Open

Apple M2 uses model "sam_vit_l_0b3195.pth" error #138

WKnight233 opened this issue Mar 1, 2024 · 1 comment

Comments

@WKnight233
Copy link

Apple M2 uses model "sam_vit_l_0b3195.pth", and after clicking "Segment anything", the error is reported as follows:
loc("mps_not_equal"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/0032d1ee-80fd-11ee-8227-6aecfccc70fe/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":253:0)): error: 'anec.not_equal_zero' op Invalid configuration for the following reasons: Tensor dimensions N1D1C1H1W21757869 are not within supported range, N[1-65536]D[1-16384]C[1-65536]H[1-16384]W[1-16384].
loc("mps_select"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/0032d1ee-80fd-11ee-8227-6aecfccc70fe/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":294:0)): error: 'anec.not_equal_zero' op Invalid configuration for the following reasons: Tensor dimensions N1D1C1H1W21757869 are not within supported range, N[1-65536]D[1-16384]C[1-65536]H[1-16384]W[1-16384].
I think tensor dimension N1D1C1H1W21757869, is not a normal value

@Uminosachi
Copy link
Owner

It appears that using an older version of torch can cause errors on Mac OS. I have confirmed that upgrading to torch version 2.1.0 or higher resolves the issue. You can delete the venv folder under stable-diffusion-webui, and then run webui.sh to install the new version of torch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants