mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes torch.load() for MPS/CPU
This commit is contained in:
parent
ed9307f469
commit
bfa65560eb
@ -121,11 +121,11 @@ try:
|
||||
model = CLIPDensePredT(version='ViT-B/16', reduce_dim=64, )
|
||||
model.eval()
|
||||
model.load_state_dict(
|
||||
torch.load('src/clipseg/weights/rd64-uni-refined.pth'),
|
||||
model.load_state_dict(torch.load('src/clipseg/weights/rd64-uni-refined.pth'),
|
||||
map_location=torch.device('cpu'),
|
||||
strict=False,
|
||||
)
|
||||
torch.load(
|
||||
'src/clipseg/weights/rd64-uni-refined.pth',
|
||||
map_location=torch.device('cpu')
|
||||
),
|
||||
strict=False,
|
||||
)
|
||||
except Exception:
|
||||
print('Error installing clipseg model:')
|
||||
|
Loading…
Reference in New Issue
Block a user