Compare commits
merge into: nodes/ComfyAssets-ComfyUI_PromptManager:feat/240-node-support
nodes/ComfyAssets-ComfyUI_PromptManager:main
nodes/ComfyAssets-ComfyUI_PromptManager:fix/240-legacy-parity
nodes/ComfyAssets-ComfyUI_PromptManager:feat/240-node-support
nodes/ComfyAssets-ComfyUI_PromptManager:fix/242-windows-concurrency
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-chronological-history
nodes/ComfyAssets-ComfyUI_PromptManager:fix/223-refuse-unsafe-restore-fallback
nodes/ComfyAssets-ComfyUI_PromptManager:fix/218-close-owned-log-handlers
nodes/ComfyAssets-ComfyUI_PromptManager:feat/216-full-inspector
nodes/ComfyAssets-ComfyUI_PromptManager:feat/215-workspace-visual-parity
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-execution-output-references
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-execution-contexts
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-durable-prompt-history
nodes/ComfyAssets-ComfyUI_PromptManager:feat/208-native-library
nodes/ComfyAssets-ComfyUI_PromptManager:feat/204-prompt-inspector
nodes/ComfyAssets-ComfyUI_PromptManager:feat/202-prompt-send-bridge
nodes/ComfyAssets-ComfyUI_PromptManager:feat/200-images-workspace
nodes/ComfyAssets-ComfyUI_PromptManager:feat/197-workspace-shell
nodes/ComfyAssets-ComfyUI_PromptManager:feat/193-reusable-prompt-pairs
nodes/ComfyAssets-ComfyUI_PromptManager:feat/186-split-node
nodes/ComfyAssets-ComfyUI_PromptManager:feat/186-focused-node
nodes/ComfyAssets-ComfyUI_PromptManager:feat/186-classic-toolkit
nodes/ComfyAssets-ComfyUI_PromptManager:test/real-comfyui-foundation
nodes/ComfyAssets-ComfyUI_PromptManager:docs/shared-ui-adoption
nodes/ComfyAssets-ComfyUI_PromptManager:fix/quiet-console-logging
nodes/ComfyAssets-ComfyUI_PromptManager:test/data-safety-workflows
nodes/ComfyAssets-ComfyUI_PromptManager:test/browser-workflows
nodes/ComfyAssets-ComfyUI_PromptManager:fix/review-followups
nodes/ComfyAssets-ComfyUI_PromptManager:test/gallery-review-fixes
nodes/ComfyAssets-ComfyUI_PromptManager:fix/gallery-thumbnail-startup
nodes/ComfyAssets-ComfyUI_PromptManager:feat/viewerjs-vendoring
nodes/ComfyAssets-ComfyUI_PromptManager:fix/gallery-infinite-scroll-performance
nodes/ComfyAssets-ComfyUI_PromptManager:fix/review-hardening
nodes/ComfyAssets-ComfyUI_PromptManager:feature/3.2.4-recently-used
nodes/ComfyAssets-ComfyUI_PromptManager:fix/quick-bugs-3.2.3
nodes/ComfyAssets-ComfyUI_PromptManager:feature/prompt-search-batch-linking
nodes/ComfyAssets-ComfyUI_PromptManager:feature/52-lora-manager-integration
..
pull from: nodes/ComfyAssets-ComfyUI_PromptManager:main
nodes/ComfyAssets-ComfyUI_PromptManager:fix/240-legacy-parity
nodes/ComfyAssets-ComfyUI_PromptManager:main
nodes/ComfyAssets-ComfyUI_PromptManager:feat/240-node-support
nodes/ComfyAssets-ComfyUI_PromptManager:fix/242-windows-concurrency
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-chronological-history
nodes/ComfyAssets-ComfyUI_PromptManager:fix/223-refuse-unsafe-restore-fallback
nodes/ComfyAssets-ComfyUI_PromptManager:fix/218-close-owned-log-handlers
nodes/ComfyAssets-ComfyUI_PromptManager:feat/216-full-inspector
nodes/ComfyAssets-ComfyUI_PromptManager:feat/215-workspace-visual-parity
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-execution-output-references
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-execution-contexts
nodes/ComfyAssets-ComfyUI_PromptManager:feat/209-durable-prompt-history
nodes/ComfyAssets-ComfyUI_PromptManager:feat/208-native-library
nodes/ComfyAssets-ComfyUI_PromptManager:feat/204-prompt-inspector
nodes/ComfyAssets-ComfyUI_PromptManager:feat/202-prompt-send-bridge
nodes/ComfyAssets-ComfyUI_PromptManager:feat/200-images-workspace
nodes/ComfyAssets-ComfyUI_PromptManager:feat/197-workspace-shell
nodes/ComfyAssets-ComfyUI_PromptManager:feat/193-reusable-prompt-pairs
nodes/ComfyAssets-ComfyUI_PromptManager:feat/186-split-node
nodes/ComfyAssets-ComfyUI_PromptManager:feat/186-focused-node
nodes/ComfyAssets-ComfyUI_PromptManager:feat/186-classic-toolkit
nodes/ComfyAssets-ComfyUI_PromptManager:test/real-comfyui-foundation
nodes/ComfyAssets-ComfyUI_PromptManager:docs/shared-ui-adoption
nodes/ComfyAssets-ComfyUI_PromptManager:fix/quiet-console-logging
nodes/ComfyAssets-ComfyUI_PromptManager:test/data-safety-workflows
nodes/ComfyAssets-ComfyUI_PromptManager:test/browser-workflows
nodes/ComfyAssets-ComfyUI_PromptManager:fix/review-followups
nodes/ComfyAssets-ComfyUI_PromptManager:test/gallery-review-fixes
nodes/ComfyAssets-ComfyUI_PromptManager:fix/gallery-thumbnail-startup
nodes/ComfyAssets-ComfyUI_PromptManager:feat/viewerjs-vendoring
nodes/ComfyAssets-ComfyUI_PromptManager:fix/gallery-infinite-scroll-performance
nodes/ComfyAssets-ComfyUI_PromptManager:fix/review-hardening
nodes/ComfyAssets-ComfyUI_PromptManager:feature/3.2.4-recently-used
nodes/ComfyAssets-ComfyUI_PromptManager:fix/quick-bugs-3.2.3
nodes/ComfyAssets-ComfyUI_PromptManager:feature/prompt-search-batch-linking
nodes/ComfyAssets-ComfyUI_PromptManager:feature/52-lora-manager-integration
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6d2213ead5 |
feat(inspect): declarative node support matrix (#250)
* feat(inspect): add a declarative inspection node semantics table
* fix(inspect): bound and isolate the semantics table
Bound the semantics loader: at most 1 MiB is read, containers may nest
at most eight levels, and a RecursionError from the JSON parser becomes
a SemanticsError instead of escaping.
The table is no longer loaded at import. get_semantics() reads it on
first use and caches only a valid result, and the resolver imports it
lazily, only for a profile with semantics on. The default ingestion
profile never imports the module, so a missing or corrupt table cannot
break scan, monitor or admin import. Inspection of a prompt graph with
an unusable table is unresolved with the reason "Inspection node
semantics are unavailable" and an error log, rather than a crash.
INSPECTION_PROFILE now has semantics on; no strategy consumes the table
yet, so resolution is unchanged.
* feat(inspect): resolve guider-based samplers
Under INSPECTION_PROFILE the resolver discovers samplers from the
semantics table and follows SamplerCustomAdvanced through its guider
link (Reroutes allowed) to a listed guider:
- CFGGuider: positive and negative, so the pair resolves.
- BasicGuider: positive only. The state is "absent" with the reason
"Guider has no negative input", the existing missing-negative path.
- Any other guider, including DualCFGGuider (D17), is unsupported-node
and names that guider.
Guider hops draw visits, scan and depth from the existing budgets. A
SamplerCustomAdvanced upstream in latent ancestry is an earlier stage,
so the result stays multistage-ambiguous. Positive and negative
provenance record guider_id. FaceDetailer (detailer-stage) is not a
candidate yet: deciding it needs output ancestry. DEFAULT_PROFILE never
loads the table and is unchanged.
Vector changes (inspection profile only, default vectors unchanged):
- f07b: no-sampler -> resolved (CFGGuider).
- f17: no-sampler -> unsupported-node (FluxGuidance, Task 2.3).
- f01b: no-sampler -> unsupported-node (EmptyFlux2LatentImage latent,
Task 2.5).
- f01: no-sampler -> ambiguous (24 SamplerCustomAdvanced branches).
The no-sampler tests (resolver and inspect route) now use a sampler
class the inspector does not know, because f17 has a supported one.
* feat(inspect): trace conditioning through supported pass-through and selector nodes
* feat(inspect): treat detailers as sampler stages
* fix(inspect): choose selectors that share one condition together
* fix(inspect): bound detailer stage chains by the depth limit
* feat(inspect): support common text encoders and string sources
* fix(inspect): keep pair execution evidence behind unreadable string sources
* feat(inspect): accept any non-sampler latent origin
* fix(inspect): queue each node once in breadth-first ancestry walks
The latent and detailer image walks queued every link before checking
whether its node was already seen, and popped from the list head. A dense
shared fan-in grew the queue far past the visit budget before any visit
was charged. Both walks now use a deque and enqueue each node at most
once, charging every examined edge as scanned work; outcomes are
unchanged.
* fix(inspect): treat unlisted pipe and embed samplers as possible stages
The latent and detailer ancestry walks only flagged unlisted nodes with a
linked latent_image, guider, positive or negative input, so easy-use pipe
samplers, Impact pipe detailers and embed-driven video samplers were walked
through and the final sampler's prompt resolved silently. A separate
stage-shaped input set (adding pipes, embeds and custom-sampler parts)
now makes such nodes unsupported-node, named.
* fix(inspect): walk each sampler's latent ancestry once per resolution
Every selector branch run and candidate re-walked the same latent
ancestry, so conditioning-carrying origins such as WanImageToVideo turned
a three-selector graph from ambiguous into work-limit. The walk outcome is
now cached per sampler; branch runs of one candidate pay for it once and
other candidates are charged its visit cost, as the text memo does. Walks
that ran out of work are not cached. Every link input is still walked.
* fix(inspect): treat unlisted model-driven samplers as possible stages
Unlisted samplers that link a model with conditioning or a latent under
other input names (XlabsSampler, generic video samplers) were still walked
through, so the final sampler's prompt resolved silently. An unlisted node
with a linked model plus conditioning, neg_conditioning, samples or latent
is now unsupported-node, named; model patches such as LoraLoader and
ModelSampling nodes are not.
* feat(inspect): compute facts from the resolved sampler
* fix(inspect): merge facts across sampler branches when ambiguous
* fix(inspect): merge facts over unresolved stages and share stage inputs via the table
* feat(inspect): explain why a prompt could not be resolved
* feat(inspect): port legacy parser rules the new resolver missed (PromptManager)
R1: before 3.2.3 a save patch overwrote every PromptManager node's saved
text with the last-run node's prompt. The legacy viewer recognizes the
signature (comfy-metadata.js createContext: two or more PromptManager
workflow nodes with one API text and different widget values). Inspection
now refuses those nodes as malformed instead of resolving to another
node's prompt; the inspector hands the parsed workflow to the resolver for
this check only. Lands before the new pass-throughs (R6) that would
otherwise make these graphs resolve to the wrong text.
R7: this repository's node classes up to 07a5af3 (PromptManagerV2,
Positive, Negative, Detailer, V2Text, PositiveText, NegativeText) resolve
with their own outputs and their exact strip and ", " join.
The default (ingestion) profile ignores both.
* feat(inspect): port legacy parser rules the new resolver missed (A1111)
R3: an accumulating batch saver repeats the A1111 parameters record once
per batch item, identical except "Batch index: N". The bounded PNG reader
now keeps the last copy (Pillow's rule, which #165 relied on) instead of
calling the file unreadable. Any other difference, including a missing or
second batch index, is still a conflict, and decoding the copies draws from
the duplicate role budget.
R4: parameters text that starts with "Negative prompt:" has an empty
positive (#165), instead of showing the delimiter line as the positive.
R5: the settings footer may be followed by sd-dynamic-prompts' one-line
"Template:" and "Negative Template:" records, and may be "Steps: N" alone
when there is no full footer.
R10: commas inside A1111's quoted settings values no longer split them, so
an "ADetailer prompt" with a comma keeps the other facts known.
The facts' A1111 reader mirrors R4, R5 and R10; the default (ingestion)
profile keeps the historical split. Also from the Task 2.7 review: a guard
test fails on any uncoded unresolved reason without a user line (M1), and
the encoder bounds role lines to the client's 512 code units (M4).
* feat(inspect): port legacy parser rules the new resolver missed (installed nodes)
R6 and R9 for nodes whose sources are installed beside ComfyUI, each
entry's input names and output slots read from the node's code (the task
report lists file and line):
- detailer stages UltimateSDUpscale (image), UltimateSDUpscaleNoUpscale
(upscaled_image) and DetailerForEach (image), judged with their upstream
samplers like FaceDetailer;
- pass-throughs ControlNetInpaintingAliMamaApply and LTXVConditioning
(positive 0, negative 1) and FluxKontextMultiReferenceLatentMethod;
- encoder Text to Conditioning, strings TextInput and DisplayText;
- facts model pass-throughs Lora Loader (LoraManager), Power Lora Loader
(rgthree), ModelPatchTorchSettings, CFGNorm, PerturbedAttentionGuidance.
Impact Pack encodes a detailer's non-empty wildcard instead of its positive
input, so FaceDetailer and DetailerForEach now list it as a prompt
override: a literal wildcard is decided at run time and a linked one names
its source, instead of resolving to the positive input. The overwritten
PromptManager refusal (R1) still holds behind the new pass-throughs. The
default profile does not read the table.
* feat(inspect): port legacy parser rules the new resolver missed (upstream nodes)
R6 and R9 for nodes not installed beside ComfyUI here. Their input names
and output slots come from each pack's source at the commit the saved
workflows record in the node's cnr_id and ver properties (the task report
lists repository, commit, file and line):
- samplers ClownsharKSampler_Beta (RES4LYF), KSampler (Efficient) and
ttN KSampler_v2 (latent input "latent");
- pass-throughs SeedVarianceEnhancer and ApplyInstantIDAdvanced (positive
1, negative 2; output 0 is the model);
- selector Switch conditioning [Crystools];
- encoder smZ CLIPTextEncode: its text when with_SDXL is false; when true
the connected CLIP decides at run time which inputs are read, so the
prompt is known only when text, text_g and text_l agree;
- strings ttN text, CR Text, CR Prompt Text and TextBoxMira;
- facts model pass-through CR Apply LoRA Stack.
Inputs that replace what a sampler reads are not followed: RES4LYF options
(may carry a guider, and with sigmas replace the settings), an Efficiency
script and a ttN XY plot leave the prompt unsupported and the facts
unresolved. The overwritten PromptManager refusal (R1) still holds behind
SeedVarianceEnhancer. The default profile does not read the table.
* test(inspect): cover batch copies past the role budget and orphan widgets
* fix(inspect): match the batch index only in the settings footer
Review I-1: duplicate A1111 parameters copies were compared after blanking
"Batch index: N" anywhere in the record, so copies whose prompts differ
only by that phrase were accepted. The field is now blanked only inside
the record's one "Steps: N, ..." footer line, which must hold it exactly
once; any other difference stays a conflict.
Review M-4: the inspector parses the workflow record only when the API
graph can show the overwritten-PromptManager signature (a PromptManager
class, or a node with PromptManager's search_text input).
* fix(inspect): refuse overwritten PromptManager text inside subgraphs
Controller ruling on review M-1: PromptManager nodes inside subgraphs run
as "<instance>:<inner>" API IDs, nested instances chaining their IDs. The
overwritten-text check now walks subgraph instances (bounded in depth and
nodes) and reads a text widget stored by name, so these nodes are refused
like top-level ones, anchored or not. A definition without an instance
runs nothing and is ignored.
Review M-5: the historical adapters skip an explicit null prepend or append,
as the 07a5af3 code's "if prepend_text:" did.
* test(inspect): import unittest one way in the inspection suites
Code scanning flagged the mixed 'import unittest' and 'from unittest import
mock' forms. Use 'import unittest' plus 'import unittest.mock' everywhere.
* fix(history): name the recorded run's current-file prompts apart from its frozen fields
Now that the inspector resolves more saved files, the Recorded run dialog can
hold two regions named "Positive prompt" (and two of each Copy/Send action):
the frozen run field and the inline current file's prompt. Assistive
technology could not tell them apart, and the real-host chronology test read
two <pre> elements.
Prompt blocks take an optional context label. The inline current file inside
a recorded run names its regions "Current file positive prompt" and its
actions "Copy/Send current file positive prompt"; the visible headings stay
as in the concept. The real-host test now also scopes its frozen-field reads
to the "Frozen run prompt texts" section, and a disposable-server workflow
pins the distinct names with a resolved current file.
* fix(inspect): drop preview-only stages from unanchored candidates
A stage whose outputs reach only non-file outputs (PreviewImage and the other
non_file_outputs) cannot have written a saved file, yet it stayed an
unanchored candidate, so a preview-only FaceDetailer made the saved branch
ambiguous (f01b).
The inspection profile now drops such stages before detailer absorption,
using two linear backward passes over the graph (charged like the consumer
map; a failed pass keeps every stage). A stage without consumers, or one that
also reaches any other terminal, is kept, and nothing is dropped when every
stage is preview-only. Raw plus detailed double saves both write files and
stay ambiguous. A file in the host temp folder may itself be a preview, so it
is inspected with PREVIEW_INSPECTION_PROFILE, which keeps those stages.
Workspace facts follow the same choice: an absent or unresolved result that
names a sampler merges facts across that sampler's stages only, so the
dropped detailer's settings no longer blur the saved file's facts.
f01b now resolves (absent negative, guider has none); its vector is updated
and the expected failure removed. The default profile is unchanged:
differential against
|