Skip to content

Commit 7b1b67b

Browse files
feat(nodes): accept neg coords for bbox
This actually works fine for SAM.
1 parent 44a51e4 commit 7b1b67b

File tree

1 file changed

+4
-4
lines changed
  • invokeai/backend/image_util/segment_anything

1 file changed

+4
-4
lines changed

invokeai/backend/image_util/segment_anything/shared.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66

77
class BoundingBox(BaseModel):
8-
x_min: int = Field(ge=0, description="The minimum x-coordinate of the bounding box (inclusive).")
9-
x_max: int = Field(ge=0, description="The maximum x-coordinate of the bounding box (exclusive).")
10-
y_min: int = Field(ge=0, description="The minimum y-coordinate of the bounding box (inclusive).")
11-
y_max: int = Field(ge=0, description="The maximum y-coordinate of the bounding box (exclusive).")
8+
x_min: int = Field(..., description="The minimum x-coordinate of the bounding box (inclusive).")
9+
x_max: int = Field(..., description="The maximum x-coordinate of the bounding box (exclusive).")
10+
y_min: int = Field(..., description="The minimum y-coordinate of the bounding box (inclusive).")
11+
y_max: int = Field(..., description="The maximum y-coordinate of the bounding box (exclusive).")
1212

1313
@model_validator(mode="after")
1414
def check_coords(self):

0 commit comments

Comments
 (0)