From 6ca8a9684da3081dbe42b9f0a755939363836077 Mon Sep 17 00:00:00 2001 From: SnoopyDevelops <54778084+SnoopyDevelops@users.noreply.github.com> Date: Mon, 5 Jun 2023 01:17:16 -0400 Subject: [PATCH] not limited to gpu --- .gitignore | 2 +- draggan/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 01945aa..fb1e224 100644 --- a/.gitignore +++ b/.gitignore @@ -157,6 +157,6 @@ cython_debug/ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +.idea/ checkpoints/ tmp/ \ No newline at end of file diff --git a/draggan/api.py b/draggan/api.py index d3c8362..35d4800 100644 --- a/draggan/api.py +++ b/draggan/api.py @@ -168,7 +168,7 @@ def neighbor(x, y, d): points = [] for i in range(x - d, x + d): for j in range(y - d, y + d): - points.append(torch.tensor([i, j]).float().cuda()) + points.append(torch.tensor([i, j]).float().to(latent.device)) return points F0 = F.detach().clone()