lowfuel / progrock-stable

Stable Diffusion with some Proggy Enhancements
Other
167 stars 19 forks source link

Cannot get it to work on an Apple M1 #38

Open Monokai opened 2 years ago

Monokai commented 2 years ago

Trying to get this to work on an Apple M1. Following the installation instructions, I'm first getting:

No matching distribution found for opencv-python==4.1.2.30

Changing the mac-environment.yaml to update opencv-python to the latest version (4.6.0.66) fixes the installation.

But after activating the conda environment and running a simple python prs.py, it gives me this error:

PROG ROCK STABLE
----------------

Parsing settings.json
Applying settings file: settings.json
Using k_lms sampling method.
Loading the model and checkpoint (./models/sd-v1-4.ckpt)...
Loading model from ./models/sd-v1-4.ckpt
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Pytorch is using device: mps
Saving output to ./out/Default
Starting render!
Global seed set to 9875084
Traceback (most recent call last):
  File "***/prs.py", line 1067, in <module>
    main()
  File "***/prs.py", line 1049, in main
    gobig_init = do_run(device, model, opt)
  File "***/prs.py", line 186, in do_run
    sampler = DDIMSampler(model)
TypeError: DDIMSampler.__init__() missing 1 required positional argument: 'device'

I've successfully got the repository https://github.com/bfirsh/stable-diffusion to work on an M1, and I've tried to use pieces of code from that repository, but it only lead to different errors.

Any ideas?

milezzz commented 2 years ago

Confirmed, I have the exact same issue on M1 Max 32GB. Spent a few hours trying to resolve this but this is 100% the issue I had as well. Really desperate to start playing with this :/