You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MOSS-Image bboxes template: character_boxes value has no effect #17174
The shipped template image_moss_image_t2i_bboxes.json sets MOSSImageLayoutPrompt's character_boxes to "1", but box 1 is a text box, so no element is ever labelled character. The knight — the template's only obj box — is box 2 and comes out as object. The template demonstrates the feature with a value that does nothing.
Repro
fromcomfy_extras.nodes_bounding_boxesimportboxes_to_regions, build_elements# editor_state / width / height taken from the shipped templateels=build_elements(boxes_to_regions(editor_state, 1024, 1024))
# element types: ['text', 'obj', 'text', 'text', 'text', 'text']MOSSImageLayoutPrompt.execute(prompt="x", element=els, width=1024, height=1024,
character_boxes=cb)
That is consistent with the Create Bounding Boxes preview, which tags every box
1-based regardless of type (nodes_bounding_boxes.py: tag = str(i + 1).zfill(2)).
The input's tooltip, though, reads:
Numbers of the object boxes to label as characters instead of objects, as tagged in
the Create Bounding Boxes preview
"Numbers of the object boxes" invites counting among object boxes only — under which
the knight is #1, exactly the value the template uses. The second clause is the
correct one, but the first is what the template appears to have followed.
Suggested fix
Set character_boxes to "2" in image_moss_image_t2i_bboxes.json (and check image_moss_image_base_t2i_bboxes.json, which shares the layout).
Optionally reword the tooltip to make the indexing unambiguous, e.g. "Numbers of
the boxes to label as characters instead of objects, as tagged in the Create
Bounding Boxes preview (counting all boxes, not just object boxes)."
Only the template value affects output; the tooltip change is cosmetic.
Activity
Clarify MOSS-Image character_boxes tooltip numbering