Skip to content

Commit c9a51fb

Browse files
committed
fix(hf-inference): image segmentation
related: #1430 Signed-off-by: Raphael Glon <[email protected]>
1 parent 361a0fa commit c9a51fb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/inference/src/providers/hf-inference.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,7 @@ export class HFInferenceImageClassificationTask extends HFInferenceTask implemen
301301

302302
export class HFInferenceImageSegmentationTask extends HFInferenceTask implements ImageSegmentationTaskHelper {
303303
override async getResponse(response: ImageSegmentationOutput): Promise<ImageSegmentationOutput> {
304-
if (
305-
Array.isArray(response) &&
306-
response.every((x) => typeof x.label === "string" && typeof x.mask === "string" && typeof x.score === "number")
304+
if (Array.isArray(response) && response.every((x) => typeof x.label === "string" && typeof x.mask === "string")
307305
) {
308306
return response;
309307
}

0 commit comments

Comments
 (0)