mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 14:10:13 -03:00
feat: add type-signature-based fallback for unregistered nodes
GenericNodeExtractor (previously a no-op) now inspects RETURN_TYPES to detect MODEL loaders and CONDITIONING encoders in nodes not registered in NODE_EXTRACTORS. - Propagate return_types from the hook layer through the registry to GenericNodeExtractor.extract() and update(). - MODEL detection: scan ckpt_name/unet_name/model_path/ model_name/gguf_name fields, validate by extension. - CONDITIONING detection: scan text/clip_l/t5xxl/prompt fields, store prompt text and conditioning tensor. - _fill_missing_metadata also checks node_cache, so GenericNodeExtractor-handled nodes survive cache.
This commit is contained in:
@@ -30,10 +30,10 @@ def test_metadata_hook_installs_and_traces_execution(monkeypatch, metadata_regis
|
||||
|
||||
calls = []
|
||||
|
||||
def record_stub(self, node_id, class_type, inputs, outputs):
|
||||
def record_stub(self, node_id, class_type, inputs, outputs, return_types=None):
|
||||
calls.append(("record", node_id, class_type, inputs))
|
||||
|
||||
def update_stub(self, node_id, class_type, outputs):
|
||||
def update_stub(self, node_id, class_type, outputs, return_types=None):
|
||||
calls.append(("update", node_id, class_type, outputs))
|
||||
|
||||
monkeypatch.setattr(MetadataRegistry, "record_node_execution", record_stub)
|
||||
|
||||
Reference in New Issue
Block a user