diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-27 13:59:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 13:59:22 +0000 |
commit | ef567b083cd7241f5215abdd0daa8775b1065ef8 (patch) | |
tree | 08cbd9bebcf66d36a6e74ad3f6352d6ff42f1a49 /modules | |
parent | 554787231a6b96bd19d90462daccb8719c5793c2 (diff) | |
parent | 563ea3f6ff66e0eba44033163d24e42297465a47 (diff) | |
download | stable-diffusion-webui-gfx803-ef567b083cd7241f5215abdd0daa8775b1065ef8.tar.gz stable-diffusion-webui-gfx803-ef567b083cd7241f5215abdd0daa8775b1065ef8.tar.bz2 stable-diffusion-webui-gfx803-ef567b083cd7241f5215abdd0daa8775b1065ef8.zip |
Merge pull request #4919 from brkirch/deepbooru-fix
Fix support for devices other than CUDA in DeepBooru
Diffstat (limited to 'modules')
-rw-r--r-- | modules/deepbooru.py | 2 |
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 = {} |