aboutsummaryrefslogtreecommitdiffstats
path: root/modules/deepbooru.py
diff options
context:
space:
mode:
authorzhaohu xing <32668889+920232796@users.noreply.github.com>2022-11-30 02:13:17 +0000
committerGitHub <noreply@github.com>2022-11-30 02:13:17 +0000
commit0831ab476c626eb796b609acf8771177692bfab7 (patch)
treeebae98ea40ecc5b34497424bee19310e9fac4068 /modules/deepbooru.py
parentee3f5ea3eeb31f1ed72e2f0cbed2c00a782497d8 (diff)
parent4b3c5bc24bffdf429c463a465763b3077fe55eb8 (diff)
downloadstable-diffusion-webui-gfx803-0831ab476c626eb796b609acf8771177692bfab7.tar.gz
stable-diffusion-webui-gfx803-0831ab476c626eb796b609acf8771177692bfab7.tar.bz2
stable-diffusion-webui-gfx803-0831ab476c626eb796b609acf8771177692bfab7.zip
Merge branch 'master' into master
Diffstat (limited to 'modules/deepbooru.py')
-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 = {}