Merge pull request #4919 from brkirch/deepbooru-fix

Fix support for devices other than CUDA in DeepBooru
master
AUTOMATIC1111 3 years ago committed by GitHub
commit ef567b083c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,7 +58,7 @@ class DeepDanbooru:
a = np.expand_dims(np.array(pic, dtype=np.float32), 0) / 255
with torch.no_grad(), devices.autocast():
x = torch.from_numpy(a).cuda()
x = torch.from_numpy(a).to(devices.device)
y = self.model(x)[0].detach().cpu().numpy()
probability_dict = {}

Loading…
Cancel
Save