update one2n.py

This commit is contained in:
王庆刚
2025-02-24 18:56:54 +08:00
parent 64248b1557
commit b657be729b
22 changed files with 279 additions and 123 deletions

View File

@ -72,10 +72,11 @@ class FeatsInterface:
new_img.paste(img, (paste_x, paste_y))
patch = self.transform(new_img)
if str(self.device) != "cpu":
patch = patch.to(device=self.device).half()
else:
patch = patch.to(device=self.device)
patch = patch.to(device=self.device)
# if str(self.device) != "cpu":
# patch = patch.to(device=self.device).half()
# else:
# patch = patch.to(device=self.device)
patches.append(patch)
if (i + 1) % self.batch_size == 0: