Lurker News
Back to discussion

Comment by smcleod

smcleod2 replies#
Working now!
julien_c1 reply#
what's the inference time on M1?
tomduncalf4 replies#
Running the "alien life" example from the README took 30 seconds on my M1 Max. I don't think it uses the GPU at all.

I couldn't get the "mega" option to work, I got an error "TypeError: lax.dynamic_update_slice requires arguments to have the same dtypes, got float32, float16" (looks like a known issue https://github.com/kuprel/min-dalle/issues/2)
Edit: installing flax 0.4.2 fixes this issue, thank all!

klohto2 replies#
The thread now has a fix. As for the GPU, it's possible to get it working with some extra steps https://github.com/google/jax/issues/8074

Macbook Pro M1 Pro numbers (CPU):

    python3 image_from_text.py --text='court sketch of godzilla on trial' --mega   640.24s user 179.30s system 544% cpu 2:30.39 total

Continue this thread — 2 replies

NhanH1 reply#
Change the flax version to 0.4.2 (currently 0.5.2) will work

So much for semver :(

Continue this thread — 1 reply

kuprel#
Thanks for catching this. I just updated it so that it should work with the latest flax.
pmarreck1 reply#
Can anyone give instructions for M1 Max MBP? I had a compilation issue in building the wheel for psutil that looks like "gcc-11: error: this compiler does not support 'root:xnu-8020.121.3~4/RELEASE_ARM64_T6000'" (gcc doesn't support ARM yet?)

What toolchain will get it working on Mac?

smcleod1 reply#
Which GCC are you using?

~ which gcc

  /usr/bin/gcc
~ gcc --version

  Apple clang version 13.1.6 (clang-1316.0.21.2.5)
  Target: arm64-apple-darwin21.5.0
  Thread model: posix
  InstalledDir: /Library/Developer/CommandLineTools/usr/bin
pmarreck#
Exact same results!