pharmapsychotic / clip-interrogator

Image to prompt with BLIP and CLIP
MIT License
2.71k stars 431 forks source link

bug 0.5.4 #87

Open ucasiggcas opened 1 year ago

ucasiggcas commented 1 year ago

Traceback (most recent call last): File "/bin/image2text.py", line 5, in from clip_interrogator import Config, Interrogator, list_caption_models, list_clip_models File "/lib/python3.9/site-packages/clip_interrogator/init.py", line 1, in from .clip_interrogator import Interrogator, Config File "python3.9/site-packages/clip_interrogator/clip_interrogator.py", line 30, in class Config: File "/lib/python3.9/site-packages/clip_interrogator/clip_interrogator.py", line 53, in Config device: str = ("mps" if torch.backends.mps.is_available() else "cuda" if torch.cuda.is_available() else "cpu") AttributeError: module 'torch.backends' has no attribute 'mps'

import torch torch.version '1.11.0'

pharmapsychotic commented 1 year ago

ah sorry looks like mps backend was added in pytorch 1.13, I'll update the requirement to reflect the minimum version