From fed1f983db105dfd11cdbfaf050205dfb7d666c1 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 14 Mar 2024 20:14:47 +1100 Subject: [PATCH] fix(nodes): depth anything processor (#5956) We were passing a PIL image when we needed to pass the np image. Closes #5956 --- invokeai/backend/image_util/depth_anything/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invokeai/backend/image_util/depth_anything/__init__.py b/invokeai/backend/image_util/depth_anything/__init__.py index af30f538a8..0cd2614bdb 100644 --- a/invokeai/backend/image_util/depth_anything/__init__.py +++ b/invokeai/backend/image_util/depth_anything/__init__.py @@ -90,8 +90,8 @@ class DepthAnythingDetector: np_image = np_image[:, :, ::-1] / 255.0 image_height, image_width = np_image.shape[:2] - np_image = transform({"image": image})["image"] - tensor_image = torch.from_numpy(image).unsqueeze(0).to(choose_torch_device()) + np_image = transform({"image": np_image})["image"] + tensor_image = torch.from_numpy(np_image).unsqueeze(0).to(choose_torch_device()) with torch.no_grad(): depth = self.model(tensor_image)