codeformer-pip icon indicating copy to clipboard operation
codeformer-pip copied to clipboard

Input type (MPSFloatType) and weight type (torch.FloatTensor) should be the same

Open lunatolun opened this issue 2 years ago • 0 comments

Hello, I am on M1 Mac, with MPS, and the solution is here in case somebody encounters the same issue (just a quick, dirty workaround) is go to site-packages/codeformer/app.py

replace line 71:

# REPLACE THIS LINE
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
device = torch.device('mps')

lunatolun avatar Nov 24 '23 13:11 lunatolun