Skip to content

feat: add bboxes input to Create Bounding Boxes node#14724

Open
jtydhr88 wants to merge 1 commit into
masterfrom
feat/create-bounding-boxes-input
Open

feat: add bboxes input to Create Bounding Boxes node#14724
jtydhr88 wants to merge 1 commit into
masterfrom
feat/create-bounding-boxes-input

Conversation

@jtydhr88

@jtydhr88 jtydhr88 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Improved Create Bounding Boxes node with:

  • Optional bboxes socket seeds/overrides the editor state
  • Mark as output node and echo incoming bboxes to the UI
  • Detect per-node input changes for same-run output

FE is

screenshot

2026-07-01.14-23-51.mp4

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a3458b8c-519d-44da-ad37-64c1a6941c83

📥 Commits

Reviewing files that changed from the base of the PR and between 2a38582 and b82c8c7.

📒 Files selected for processing (1)
  • comfy_extras/nodes_bounding_boxes.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • comfy_extras/nodes_bounding_boxes.py

📝 Walkthrough

Walkthrough

This PR adds optional upstream bboxes support to CreateBoundingBoxes. Incoming box payloads are normalized into a standard list shape, cached per node unique_id, and used to decide whether the node seeds from incoming boxes or editor_state. The node schema now accepts the optional input, marks the node as an output node, and keeps it experimental. The UI output now includes input_bboxes when incoming boxes are provided.

Changes

Cohort: Bboxes input support
Scope: comfy_extras/nodes_bounding_boxes.py

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant CreateBoundingBoxes
  participant NormalizeIncomingBoxes
  participant LastIncomingCache

  Caller->>CreateBoundingBoxes: execute(width, height, editor_state, background, bboxes)
  CreateBoundingBoxes->>NormalizeIncomingBoxes: normalize_incoming_boxes(bboxes)
  NormalizeIncomingBoxes-->>CreateBoundingBoxes: incoming
  CreateBoundingBoxes->>LastIncomingCache: compare incoming vs cached value (unique_id)
  LastIncomingCache-->>CreateBoundingBoxes: changed / unchanged
  CreateBoundingBoxes->>LastIncomingCache: update cache with incoming
  CreateBoundingBoxes-->>Caller: NodeOutput with ui (input_bboxes if incoming present)
Loading

Estimated code review effort: High

Related PRs: None identified from provided context.

Suggested labels: enhancement, comfy_extras

Suggested reviewers: None identified from provided context.

Poem
A rabbit hopped into the box-drawing scene, 🐰
With bboxes fresh, sharp and clean,
It cached the last shape it once knew,
Compared it, and chose what to do—
Incoming or editor's own hue,
Now bounding boxes seed anew!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a bboxes input to the Create Bounding Boxes node.
Description check ✅ Passed The description matches the PR by describing the new bboxes input, UI echoing, output-node marking, and same-run change detection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@comfy_extras/nodes_bounding_boxes.py`:
- Line 228: The bbox state handling in the node class is conflating “socket
present” with “non-empty list,” so empty lists from upstream or an intentionally
empty editor state get ignored. Update the logic around the incoming/editor
merge in the bounding-box node methods so presence is tracked separately from
list contents, and let an explicit empty list override the current canvas state
instead of falling back to the previous value. Use the existing bbox state
fields and merge path around the incoming cache/editor_state handling to
preserve clears correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c93a28e9-7f22-4723-b256-6ef8674754be

📥 Commits

Reviewing files that changed from the base of the PR and between 2c935de and 2a38582.

📒 Files selected for processing (1)
  • comfy_extras/nodes_bounding_boxes.py

Comment thread comfy_extras/nodes_bounding_boxes.py
@jtydhr88 jtydhr88 closed this Jul 2, 2026
@jtydhr88 jtydhr88 deleted the feat/create-bounding-boxes-input branch July 2, 2026 01:41
@jtydhr88 jtydhr88 restored the feat/create-bounding-boxes-input branch July 2, 2026 01:46
@jtydhr88 jtydhr88 reopened this Jul 2, 2026
@jtydhr88 jtydhr88 force-pushed the feat/create-bounding-boxes-input branch from 2a38582 to b82c8c7 Compare July 2, 2026 02:18
@jtydhr88 jtydhr88 marked this pull request as draft July 2, 2026 03:01
@jtydhr88 jtydhr88 marked this pull request as ready for review July 4, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant