Issue 270 fix (#274)

* check if torch.backends has mps before calling it

* Fixes issue 270

Co-authored-by: James Reynolds <magnsuviri@me.com>
This commit is contained in:
James Reynolds 2022-08-31 22:59:20 -06:00 committed by GitHub
parent 0433b3d625
commit 70119602a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,7 +200,7 @@ def main():
config = OmegaConf.load(f"{opt.config}")
model = load_model_from_config(config, f"{opt.ckpt}")
device = choose_torch_device()
device = torch.device(choose_torch_device())
model = model.to(device)
if opt.plms: