lowfuel / progrock-stable

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

AttributeError: module 'torch.backends' has no attribute 'mps' #37

Open tarinhaig opened 2 years ago

tarinhaig commented 2 years ago

After following the installation instructions, and running 'python prs.py', the following error occurrs:

(prs) >:~/stablediffusion/prs$ python prs.py

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
Downloading: 100%|█████████████████████████| 4.41k/4.41k [00:00<00:00, 4.82MB/s]
Traceback (most recent call last):
  File "prs.py", line 1067, in <module>
    main()
  File "prs.py", line 946, in main
    elif ("mps" in cl_args.device) or (torch.backends.mps.is_available()):
AttributeError: module 'torch.backends' has no attribute 'mps'

Steps to reproduce:

  1. git clone https://github.com/lowfuel/progrock-stable prs
  2. cd prs
  3. conda env create -f environment.yaml
  4. conda activate prs
  5. python prs.py

Environment:

l1jiahao commented 1 year ago

"mps" referes to the Apple M1 GPU device on MacOS, so it didn't work on Ubuntu 22.04 LTS👀