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

m1pro 安装完启动时报错 #95

Open
oldfishoh opened this issue Jun 26, 2023 · 2 comments
Open

m1pro 安装完启动时报错 #95

oldfishoh opened this issue Jun 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@oldfishoh
Copy link

image
@paulluuk
Copy link

Try running this in CLI:

export PYTORCH_ENABLE_MPS_FALLBACK=1
python gradio_app.py --device mps

@oldfishoh
Copy link
Author

Try running this in CLI:

export PYTORCH_ENABLE_MPS_FALLBACK=1
python gradio_app.py --device mps

Loading networks from "/Users/laoyu/draggan/checkpoints-pkl/ada/afhqcat.pkl"...
Registering hook for: b256
_imported_module_1af704f46e18456fb60d0bfa9754f9e9:240: UserWarning: The operator 'aten::lerp.Scalar_out' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance implications. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/mps/MPSFallback.mm:11.)
Registering hook for: b256
Traceback (most recent call last):
File "gradio_app.py", line 317, in
demo = main()
File "gradio_app.py", line 249, in main
img, F0 = draggan.generate_image(W, G, device=device)
File "/Users/laoyu/Documents/code/DragGAN/draggan/draggan.py", line 181, in generate_image
img, features = forward_G(G, W, device)
File "/Users/laoyu/Documents/code/DragGAN/draggan/draggan.py", line 138, in forward_G
img = G.synthesis(W, noise_mode="const", force_fp32=True)
File "/Users/laoyu/miniconda3/envs/draggan/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "", line 463, in forward
File "/Users/laoyu/miniconda3/envs/draggan/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "", line 397, in forward
File "/Users/laoyu/miniconda3/envs/draggan/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "", line 292, in forward
File "/Users/laoyu/Documents/code/DragGAN/draggan/stylegan2/torch_utils/misc.py", line 101, in decorator
return fn(*args, **kwargs)
File "", line 72, in modulated_conv2d
File "/Users/laoyu/Documents/code/DragGAN/draggan/stylegan2/torch_utils/misc.py", line 101, in decorator
return fn(*args, kwargs)
File "/Users/laoyu/Documents/code/DragGAN/draggan/stylegan2/torch_utils/ops/conv2d_resample.py", line 139, in conv2d_resample
x = upfirdn2d.upfirdn2d(x=x, f=f, padding=[px0+pxt,px1+pxt,py0+pyt,py1+pyt], gain=up
2, flip_filter=flip_filter)
File "/Users/laoyu/Documents/code/DragGAN/draggan/stylegan2/torch_utils/ops/upfirdn2d.py", line 164, in upfirdn2d
return _upfirdn2d_ref(x, f, up=up, down=down, padding=padding, flip_filter=flip_filter, gain=gain)
File "/Users/laoyu/Documents/code/DragGAN/draggan/stylegan2/torch_utils/misc.py", line 101, in decorator
return fn(*args, **kwargs)
File "/Users/laoyu/Documents/code/DragGAN/draggan/stylegan2/torch_utils/ops/upfirdn2d.py", line 185, in _upfirdn2d_ref
x = torch.nn.functional.pad(x, [0, upx - 1, 0, 0, 0, upy - 1])
TypeError: Cannot convert a float64 Tensor to MPS as the MPS framework doesn't support float64. Please use float32 instead.

@Zeqiang-Lai Zeqiang-Lai added the bug Something isn't working label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants