get deepbooru to run with --precision-half
This commit is contained in:
parent
42ca30d6c1
commit
06fe174c74
|
@ -57,7 +57,7 @@ class DeepDanbooru:
|
||||||
a = np.expand_dims(np.array(pic, dtype=np.float32), 0) / 255
|
a = np.expand_dims(np.array(pic, dtype=np.float32), 0) / 255
|
||||||
|
|
||||||
with torch.no_grad(), devices.autocast():
|
with torch.no_grad(), devices.autocast():
|
||||||
x = torch.from_numpy(a).to(devices.device)
|
x = torch.from_numpy(a).to(devices.device, devices.dtype)
|
||||||
y = self.model(x)[0].detach().cpu().numpy()
|
y = self.model(x)[0].detach().cpu().numpy()
|
||||||
|
|
||||||
probability_dict = {}
|
probability_dict = {}
|
||||||
|
|
Loading…
Reference in New Issue