Files
Vito bc14f29db7 fix(inspect): video metadata carrier parity between Images and Inspect (#275)
* fix(video): select one prompt carrier from per-key or comment tags

Current ComfyUI savers write one container tag per key (prompt, workflow,
parameters, comfyassets_prompt_pairs); only the old VideoHelperSuite comment
envelope was read. select_video_carrier picks exactly one carrier in the
order per-key tags, comment envelope, description: the first with a role
key wins, else the first with a workflow, and carriers never merge.
Matroska upper-cased tag names fold on our side; differing fold-duplicates
fail the read like duplicate PNG keys, identical ones are one record.
Per-key values stay original-text; envelope objects are reserialized.

* fix(inspect): read per-key video prompt tags

The inspector asked ffprobe only for comment and description, so videos
written by core SaveVideo/SaveWEBM and current VideoHelperSuite (one tag per
key) were inspected as having no metadata. It now asks for
prompt,workflow,parameters,comfyassets_prompt_pairs,comment,description and
hands the tags to the shared carrier selector. ffprobe stdout is bounded at
the role and workflow budgets plus 64 KiB of envelope; past that it probes
once more without the workflow tag within the role budget and marks the
per-key workflow limited, while an over-budget envelope still fails the
read. Differing fold-duplicate tags fail like duplicate PNG keys.

* fix(video): scan videos written by current ComfyUI savers

The output scan and live monitor read container tags through
metadata_from_tags, which now delegates to the shared carrier selector, so
per-key prompt, workflow, parameters and comfyassets_prompt_pairs tags
(including Matroska upper-cased names) are ingested with the default
resolver profile exactly like the same graph in a PNG. Fold-duplicate tags
and null markers are skipped quietly. Pins the behavior with a mocked
ffprobe scan test and real MP4/MKV/WebM round trips when ffmpeg is present.

* docs(testing): document video carrier selection

Record the shared video carrier order (per-key tags, comment envelope,
description), the fold-duplicate rule, the 6 MiB + 64 KiB probe bound with
the role-only re-probe and limited workflow, and that scans read the same
carrier as the inspector.

* fix(inspect): size video probe bounds for JSON escaping, exact-case envelopes

ffprobe JSON-escapes tag text, so bounds measured on its stdout could mark a
video workflow limited, or fail a role record, that the identical PNG reads
within its decoded budget. The first probe now allows twice the role and
workflow budgets plus 64 KiB (12 MiB + 64 KiB) and the role-only re-probe
twice the role budget plus 64 KiB, leaving the decoded per-record budgets as
the only gate; a reader-level test reads near-budget quote-dense records as
PNG and as video and asserts identical metadata and formats.

Envelope keys (comment, description) are matched exactly as the legacy
readers did; only the four per-key carriers fold Matroska case. Fixtures can
write the legacy ilst comment atom (metadata_tags=False), and the docs now
say the admin scan reads the carrier while the live monitor still processes
images only, with a follow-up recorded in TESTING.md.
2026-10-22 05:04:15 -07:00

2.4 KiB

Prompt inspection and sending

The opt-in workspace at /prompt_manager/workspace#/images shows full positive and negative prompts in both Image details and the full-image preview. Existing gallery and metadata tools remain available during the application rebuild.

Each prompt shows its evidence source: recorded execution, workflow inference, or embedded generation parameters. Path-only saved-library associations are marked unverified and cannot be sent: a filename alone cannot prove that an image has not been replaced. Missing, ambiguous, and unreadable prompts remain visible as distinct states. An explicitly empty negative is a resolved value and can clear a destination's negative field.

Use the blue paper-plane action beside a prompt, or Send prompt pair. Keep a ComfyUI tab open under the same origin and deployment prefix. Choose a window and compatible Prompt Manager node, select Preview changes, review the complete before/after text and preserved prepend/append composition, then Apply to ComfyUI. The dialog reports success only after a matching acknowledgement. It does not load workflows or queue generation. If confirmation is lost, inspect ComfyUI and preview again before another attempt. Closing the dialog cannot undo an update already sent.

Read-only API

GET /prompt_manager/images/inspect/{relative_path}?root={root_index} requires an explicit configured root, including when two roots contain the same filename. The response contains image identity and prompts.positive / prompts.negative. Each role has status (resolved, absent, unresolved, or ambiguous), text (string only when resolved, otherwise null), and source. Inspection does not index files, alter saved prompts, run scans, or decode image pixels. PNG text and video probe output are bounded; unsupported or malformed evidence remains unresolved rather than becoming sendable placeholder text. Videos are read from one container carrier: the per-key tags written by core SaveVideo/SaveWEBM and current VideoHelperSuite (prompt, workflow, parameters, comfyassets_prompt_pairs), else the old VideoHelperSuite comment envelope, else description. The admin scan reads the same carrier, so Images and ingestion agree on a video's prompts (see TESTING.md for the order and budgets; the live monitor processes images only).

Python route changes require restarting ComfyUI. Browser assets require a refresh.