Skip to content

Commit 63581ec

Browse files
committed
(minor) Add None check to fix static type checking error.
1 parent f5cfdcf commit 63581ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

invokeai/backend/image_util/grounding_dino/grounding_dino_pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def __init__(self, pipeline: ZeroShotObjectDetectionPipeline):
1818

1919
def detect(self, image: Image.Image, candidate_labels: list[str], threshold: float = 0.1) -> list[DetectionResult]:
2020
results = self._pipeline(image=image, candidate_labels=candidate_labels, threshold=threshold)
21+
assert results is not None
2122
results = [DetectionResult.model_validate(result) for result in results]
2223
return results
2324

0 commit comments

Comments
 (0)