Skip to content

Commit

Permalink
Issue 270 fix (#274)
Browse files Browse the repository at this point in the history
* check if torch.backends has mps before calling it

* Fixes issue 270

Co-authored-by: James Reynolds <magnsuviri@me.com>
  • Loading branch information
magnusviri and James Reynolds authored Sep 1, 2022
1 parent 0433b3d commit 7011960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/orig_scripts/img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7011960

Please sign in to comment.