aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-27 16:59:22 +0300
committerGitHub <noreply@github.com>2022-11-27 16:59:22 +0300
commitef567b083cd7241f5215abdd0daa8775b1065ef8 (patch)
tree08cbd9bebcf66d36a6e74ad3f6352d6ff42f1a49
parent554787231a6b96bd19d90462daccb8719c5793c2 (diff)
parent563ea3f6ff66e0eba44033163d24e42297465a47 (diff)
Merge pull request #4919 from brkirch/deepbooru-fix
Fix support for devices other than CUDA in DeepBooru
-rw-r--r--modules/deepbooru.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/deepbooru.py b/modules/deepbooru.py
index b9066d81..31ec7e17 100644
--- a/modules/deepbooru.py
+++ b/modules/deepbooru.py
@@ -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 = {}