mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(nodes): depth anything processor (#5956)
We were passing a PIL image when we needed to pass the np image. Closes #5956
This commit is contained in:
parent
a386544a1d
commit
fed1f983db
@ -90,8 +90,8 @@ class DepthAnythingDetector:
|
|||||||
np_image = np_image[:, :, ::-1] / 255.0
|
np_image = np_image[:, :, ::-1] / 255.0
|
||||||
|
|
||||||
image_height, image_width = np_image.shape[:2]
|
image_height, image_width = np_image.shape[:2]
|
||||||
np_image = transform({"image": image})["image"]
|
np_image = transform({"image": np_image})["image"]
|
||||||
tensor_image = torch.from_numpy(image).unsqueeze(0).to(choose_torch_device())
|
tensor_image = torch.from_numpy(np_image).unsqueeze(0).to(choose_torch_device())
|
||||||
|
|
||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
depth = self.model(tensor_image)
|
depth = self.model(tensor_image)
|
||||||
|
Loading…
Reference in New Issue
Block a user