Skip to content

Commit c6d49e8

Browse files
committed
Shorten SegmentAnythingInvocation and GroundingDinoInvocatino docstrings, since they are used as the invocation descriptions in the UI.
1 parent e6a512a commit c6d49e8

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

invokeai/app/invocations/grounding_dino.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323
version="1.0.0",
2424
)
2525
class GroundingDinoInvocation(BaseInvocation):
26-
"""Runs a Grounding DINO model (https://arxiv.org/pdf/2303.05499). Performs zero-shot bounding-box object detection
27-
from a text prompt.
26+
"""Runs a Grounding DINO model. Performs zero-shot bounding-box object detection from a text prompt."""
2827

29-
Reference:
30-
- https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
31-
- https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
32-
"""
28+
# Reference:
29+
# - https://arxiv.org/pdf/2303.05499
30+
# - https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
31+
# - https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
3332

3433
prompt: str = InputField(description="The prompt describing the object to segment.")
3534
image: ImageField = InputField(description="The image to segment.")

invokeai/app/invocations/segment_anything.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
version="1.0.0",
2727
)
2828
class SegmentAnythingInvocation(BaseInvocation):
29-
"""Runs a Segment Anything Model (https://arxiv.org/pdf/2304.02643).
29+
"""Runs a Segment Anything Model."""
3030

31-
Reference:
32-
- https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
33-
- https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
34-
"""
31+
# Reference:
32+
# - https://arxiv.org/pdf/2304.02643
33+
# - https://huggingface.co/docs/transformers/v4.43.3/en/model_doc/grounding-dino#grounded-sam
34+
# - https://github.com/NielsRogge/Transformers-Tutorials/blob/a39f33ac1557b02ebfb191ea7753e332b5ca933f/Grounding%20DINO/GroundingDINO_with_Segment_Anything.ipynb
3535

3636
image: ImageField = InputField(description="The image to segment.")
3737
bounding_boxes: list[BoundingBoxField] = InputField(description="The bounding boxes to prompt the SAM model with.")

0 commit comments

Comments
 (0)