#M1 Mac NotImplementedError The operator 'atenindex.Tensor' is not current implemented for the MPS

5 messages · Page 1 of 1 (latest)

hollow iron
#

On an M1 Macbook Pro I am getting:
NotImplementedError: The operator 'aten::index.Tensor' is not current implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1 to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

Sorry this may be a dumb question, but exactly where do I put PYTORCH_ENABLE_MPS_FALLBACK=1 ?

hard ibex
#

on the Terminal,
export PYTORCH_ENABLE_MPS_FALLBACK=1
then start invoke in your preferred manner .

hollow iron
#

Wonderful. Thanks for responding. ⭐️

hard ibex
#

@tropic plover any chance of sticking this in invoke.py as it seems to still trip people up. I've had a quick play and

#!/usr/bin/env python
import os

Set environment variables

os.environ['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'

import ldm.invoke.CLI
ldm.invoke.CLI.main()

works fine for both with and without --web, obviously needs an os guard so its not run for non macOS etc.

rose harbor