aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrkirch <brkirch@users.noreply.github.com>2022-11-21 07:56:00 +0000
committerbrkirch <brkirch@users.noreply.github.com>2022-11-21 07:56:00 +0000
commit563ea3f6ff66e0eba44033163d24e42297465a47 (patch)
treebcd0cff562e321c8d0f3b82271c2cd21c2049e0a
parent828438b4a190759807f9054932cae3a8b880ddf1 (diff)
downloadstable-diffusion-webui-gfx803-563ea3f6ff66e0eba44033163d24e42297465a47.tar.gz
stable-diffusion-webui-gfx803-563ea3f6ff66e0eba44033163d24e42297465a47.tar.bz2
stable-diffusion-webui-gfx803-563ea3f6ff66e0eba44033163d24e42297465a47.zip
Change .cuda() to .to(devices.device)
-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 = {}