Open slashdottir opened 1 year ago
hey I just finally got around to playing with it on M1 mac. it looks like it does work with pytorch 2 and fast mode is works well but "best" is very slow. if you haven't yet try updating to latest torch (pip install --upgrade torch)
I tried it out with the latest code and set the torch.device to 'mps' and it worked! The 'flavor chain' part is very slow, but it seemed to finish even with flavor chain only at 28% mark? Anyway. If there is a recommended way to set it to maximize use of M1 capabilities, please advise.
Seems like this bit of code here overrides the device setting and sets the torch device back to 'cuda' which of course defaults back to 'cpu'
Looks like there is a recent bug to fix this in pytorch (active 2 days ago): https://github.com/pytorch/pytorch/pull/99272
Thank you! ❤️
There is already a PR suggesting autocast changes for a more recent version, but no fp16 is mentioned. Just wanna add that fp16 also works on mps. It reduces RAM usage in half. Here is a hardcoded fp16 mps code for clip-interrogator==0.5.4
I love this proggie so much, wish I could run it on my M1 laptop.
Trying your readme example:
It fails with this error:
stacktrace:
Tried setting device to 'cpu' instead of 'cuda', same error.
Thanks for any clues