Skip to content

Commit fed1f98

Browse files
fix(nodes): depth anything processor (#5956)
We were passing a PIL image when we needed to pass the np image. Closes #5956
1 parent a386544 commit fed1f98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

invokeai/backend/image_util/depth_anything/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def __call__(self, image: Image.Image, resolution: int = 512) -> Image.Image:
9090
np_image = np_image[:, :, ::-1] / 255.0
9191

9292
image_height, image_width = np_image.shape[:2]
93-
np_image = transform({"image": image})["image"]
94-
tensor_image = torch.from_numpy(image).unsqueeze(0).to(choose_torch_device())
93+
np_image = transform({"image": np_image})["image"]
94+
tensor_image = torch.from_numpy(np_image).unsqueeze(0).to(choose_torch_device())
9595

9696
with torch.no_grad():
9797
depth = self.model(tensor_image)

0 commit comments

Comments
 (0)