Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tarinhaig opened this issue Sep 10, 2022 · 1 comment
Open

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

tarinhaig opened this issue Sep 10, 2022 · 1 comment

Comments

@tarinhaig
Copy link

tarinhaig commented Sep 10, 2022

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:

  • Ubuntu 22.04 LTS
  • AWS c5d.2xlarge image
@l1jiahao
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants