ComfyUI/app/assets/database/queries
Matt Miller 2d21956ac7 fix(assets): expand standalone bucket tag for nested category paths
Path-derived tags for nested model layouts (e.g.
models/checkpoints/flux/foo.safetensors) emitted only the slash-joined
shape `["models", "checkpoints/flux"]`, which broke the frontend
combo-widget set-membership filter `include_tags=models,checkpoints` —
the literal `checkpoints` token was no longer present in the asset's
tag set.

Add `expand_bucket_prefixes` at the tag-write layer. When a tag's first
slash segment is a registered model category (or input/output/temp
root), the bucket is inserted as a standalone token immediately after
the slash-joined form. This preserves tag[1] as the slash-joined
positional contract cloud emits while restoring the set-membership
token the frontend filter requires.

The expansion is bounded to known buckets so free-form user labels
with slashes (`my-org/team-a`) pass through unchanged. The helper is
applied uniformly in `set_reference_tags`, `add_tags_to_reference`,
and `batch_insert_seed_assets` so HTTP uploads, user-tag mutations,
and path-scanning ingest all converge on the same canonical shape.

Also align the upload-route category validator with
`resolve_destination_from_tags` by extracting the first slash segment
of tag[1], so HTTP uploads matching cloud's slash-joined emission
shape are no longer rejected as `unknown models category`.
2026-05-20 20:33:39 -07:00
..
__init__.py feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
asset_reference.py feat(assets): preserve insertion order on tag retrieval 2026-05-19 20:14:01 -07:00
asset.py feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
common.py feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
tags.py fix(assets): expand standalone bucket tag for nested category paths 2026-05-20 20:33:39 -07:00