mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-09 15:30:16 -03:00
fix: correct return_types propagation to GenericNodeExtractor
Two bugs prevented type-signature-based fallback from working: - metadata_hook.py used getattr(obj.__class__, 'RETURN_TYPES') which fails when _async_map_node_over_list is called with a class (not instance) — obj.__class__ is the metaclass 'type', which has no RETURN_TYPES. Fixed: getattr(obj, ...). - metadata_registry.py used type(extractor) is GenericNodeExtractor to dispatch return_types. NODE_EXTRACTORS stores class references, not instances; type(Class) is always 'type', never the class. Fixed: extractor is GenericNodeExtractor.
This commit is contained in:
@@ -172,7 +172,7 @@ class MetadataRegistry:
|
||||
|
||||
# Extract node-specific metadata
|
||||
extractor = NODE_EXTRACTORS.get(class_type, GenericNodeExtractor)
|
||||
if type(extractor) is GenericNodeExtractor:
|
||||
if extractor is GenericNodeExtractor:
|
||||
extractor.extract(node_id, processed_inputs, outputs,
|
||||
self.prompt_metadata[self.current_prompt_id],
|
||||
return_types=return_types)
|
||||
@@ -194,7 +194,7 @@ class MetadataRegistry:
|
||||
# Use the same extractor to update with outputs
|
||||
extractor = NODE_EXTRACTORS.get(class_type, GenericNodeExtractor)
|
||||
if hasattr(extractor, "update"):
|
||||
if type(extractor) is GenericNodeExtractor:
|
||||
if extractor is GenericNodeExtractor:
|
||||
extractor.update(
|
||||
node_id, processed_outputs,
|
||||
self.prompt_metadata[self.current_prompt_id],
|
||||
|
||||
Reference in New Issue
Block a user