mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Merge pull request #4919 from brkirch/deepbooru-fix
Fix support for devices other than CUDA in DeepBooru
This commit is contained in:
commit
ef567b083c
@ -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…
Reference in New Issue
Block a user