Skip to content

Commit 95dde80

Browse files
fix: assert the return depth map to be a PIL image
1 parent b4cf78a commit 95dde80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

invokeai/backend/image_util/depth_anything/depth_anything_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self, pipeline: DepthEstimationPipeline) -> None:
1717
def generate_depth(self, image: Image.Image, resolution: int = 512):
1818
image_width, image_height = image.size
1919
depth_map = self.pipeline(image)["depth"]
20-
depth_map = cast(Image.Image, depth_map)
20+
assert isinstance(depth_map, Image.Image)
2121

2222
new_height = int(image_height * (resolution / image_width))
2323
depth_map = depth_map.resize((resolution, new_height))

0 commit comments

Comments
 (0)