mirror of
https://github.com/Comfy-Org/embedded-docs.git
synced 2026-11-05 00:17:31 +00:00
[PR #197] [MERGED] Fix node discovery and doc matching in scan_missing_nodes #195
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/embedded-docs#195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/embedded-docs/pull/197
Author: @comfyui-wiki
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @comfyui-wiki
Base:
main← Head:fix/node-scanner-discovery📝 Commits (4)
022d424Fix node discovery and doc matching in scan_missing_nodes2b6a58eTighten discovery: registration membership, schema precedence, base resolution8b33976Read schemas by registered node id in generate_docs3fc70a0Keep reverted and non-backend pages out of the stale list📊 Changes
5 files changed (+888 additions, -215 deletions)
View changed files
📝
docs-generation/README.md(+1 -1)➕
docs-generation/config/non_backend_nodes.json(+34 -0)📝
docs-generation/scripts/generate_docs.py(+104 -3)📝
docs-generation/scripts/scan_missing_nodes.py(+636 -211)➕
docs-generation/tests/test_generate_docs_schema.py(+113 -0)📄 Description
Problem
scan_missing_nodes.pyfound nodes only through a literalnode_id="X"regex plus classes exposingINPUT_TYPES. Everything else was invisible, the same loose regex also matchedold_node_id=, and a class being defined was treated as being registered, so nodes that are commented out of the registry were reported as missing docs.Measured against
mainon the same tree (ComfyUI80c8e77d4),main's scanner reports 43 missing / 96 unclassified extra folders, and it is wrong in both directions:node_id=cls.NODE_ID(Flux2Pro/Max,FluxKontextPro/Max), schema factories with the id as the first positional argument (_cloud_schema("ComfyCloudMiniMax…"), 4 nodes), old-styleNodeId = "X"attributes (CombineHooks2/4/8,ConditioningSetDefaultCombine,PairConditioningSetDefaultCombine), and mapping aliases ("ModelMergeSD2": ModelMergeSD1— the value→key reverse lookup only returned the first key).ConditioningAverage(trailing space),SDV_img2vid_Conditioning,T2IAdapterLoader— all three only exist asold_node_id=.ComboOptionTestNode,DCTestNode,InvertBooleanNode,Autogrow*TestNode,ComfySoftSwitchNode,ConvertStringToComboNode,MultiGPU_Options,RecraftStyleV3VectorIllustrationNode, …) plusComfyCloudMiniMaxH3ReferenceToVideoNode, which is commented out inget_node_listwith “Disabled until the server-side issue is fixed”.docs/ClipLoader/does not satisfyCLIPLoader,docs/VaeDecode/does not satisfyVAEDecode, and so on for every acronym-named node.Fix
Discovery mirrors
nodes.py:init_extra_nodes: a module is either V1 (NODE_CLASS_MAPPINGSkeys are the node types, including loop-built maps and aliases) or V3 (comfy_entrypoint+get_node_list, where the node type isschema.node_id, spellednode_id="X",node_id=cls.NODE_ID,schema.node_id = "X"aftersuper().define_schema(), a schema-factory positional argument, or aNodeIdclass attribute). Registration membership is mandatory — a class that is not returned byget_node_list/node_listis not a node, however complete its schema looks. Base classes resolve only by plain name inside the module, socomfy.samplers.CFGGuidernever resolves to a same-named local class.io.NodeReplaceis read into a rename registry and used for classification, not discovery. Doc folders match on a normalized key (case/underscore/space-insensitive; ids that collide on that key only accept an exact match) and every leftover folder is classified:duplicaterenamednon_backendconfig/non_backend_nodes.jsonretiredNodeReplace, or never registered)Result on the same tree
main's scannerVerification
COMFYUI_PATH=… python3 scripts/scan_missing_nodes.pyonorigin/main→ exit 0, numbers above; the same tree withmain's script gives the “before” column.ClipLoader/,VAEDecode/,SvdImg2vidConditioning/,CLIPLoader/,VAEEncode/reports 2 spelling mismatches and 0 extras;mainreports both nodes as missing.comfy_extras/nodes_logic.pylists 5 registered classes vs 14 defined (DCTestNode,InvertBooleanNode, … commented out);nodes_recraft.py19 of 22 (RecraftStyleV3VectorIllustrationNodenever returned);nodes_comfy_cloud.pyexcludes the disabled reference-to-video node.prepare_ai_input.py node CombineHooks2,… node ComfyCloudMiniMaxH3TextToVideoNode,… node Flux2MaxImageNodeall succeed — they only neededclass_namefrom the report, which discovery now fills in.docs-generation/tests/*: all pass (test_translation_fixes.pyhas one pre-existing fa-heading failure, unrelated), including six new regression tests for schema resolution.Review
An independent review (Codex CLI, on this branch) flagged: unconditional explicit-id registration, module-qualified base resolution, class attributes outranking the returned schema, additive schema candidates, and loop membership not being resolved. All are fixed in the second commit; the count differences it reported were a stale local checkout on my side, corrected here against
origin/main. Its remaining item —generate_docs.pyonly reading literalnode_id="X"— is fixed in the third commit: the extractor resolves the owning class through the scanner's AST helpers, keeps the literal fast path first, and 19 of 19 currently missing nodes now extract with inputs (was 0), with the sampled 60 documented nodes unchanged.Out of scope (follow-ups)
retiredand 7duplicatefolders are only reported — deleting/renaming them changes live docs URLs, so it needs its own PR.mainare title-cased (ClipLoader/,VaeDecode/,UnetLoader/, …) instead of matching the node id, which is exactly the “docs exist but the scanner says missing” pattern. Whoever generates the folders should take the node id verbatim; this PR only makes it visible.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.