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

macos implementation notes - fp32 on m1, maybe fp8 should just raise, use watermark env vars #6227

Open
doctorpangloss opened this issue Dec 26, 2024 · 2 comments
Labels
MacOS MPS device related issues

Comments

@doctorpangloss
Copy link

if (device is not None and is_device_mps(device)) or mps_mode():

it's worth reading https://news.ycombinator.com/item?id=36576673

test fp32 versus fp16 versus bf16 on M1 macs, because there's no hardware bf16 support on M1. i don't know if apple's emulation on m1 actually provides memory or performance gains.

if the user tries to run an fp8 workflow, maybe raise because it is not supported on macos at all

@doctorpangloss
Copy link
Author

reserve vram should use the watermark envs - https://github.com/pytorch/pytorch/blob/bf8da4c145f0b11ad19daa451d923ab3594ff6ce/docs/source/mps_environment_variables.rst#L27

you can also consider the same for CUDA configuration on windows

@comfyanonymous
Copy link
Owner

comfyanonymous commented Dec 26, 2024

On an M4 mac at least it does reduce memory usage.

@ltdrdata ltdrdata added the MacOS MPS device related issues label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS MPS device related issues
Projects
None yet
Development

No branches or pull requests

3 participants