diff --git a/concept_attention.py b/concept_attention.py index 2f81a5c..e36db6b 100644 --- a/concept_attention.py +++ b/concept_attention.py @@ -52,7 +52,7 @@ class ConceptAttention: logger.warning("Could not access named_modules, using fallback method") self._register_hooks_fallback(actual_model, hook_fn) - return attention_outputs + return self.attention_outputs def _register_hooks_fallback(self, model, hook_fn): """ diff --git a/example_workflow.json b/example_workflow.json index 5511468..1130fe8 100644 --- a/example_workflow.json +++ b/example_workflow.json @@ -101,14 +101,13 @@ "mode": 0, "inputs": [ {"name": "concept_maps", "type": "CONCEPT_MAPS", "link": 4}, - {"name": "image", "type": "IMAGE", "link": 1}, - {"name": "alpha", "type": "FLOAT", "link": null} + {"name": "image", "type": "IMAGE", "link": 1} ], "outputs": [ {"name": "visualized_image", "type": "IMAGE", "links": [11], "slot_index": 0} ], "properties": {"Node name for S&R": "ConceptAttentionVisualizerNode"}, - "widgets_values": [0.5] + "widgets_values": [] }, { "id": 7, diff --git a/nodes.py b/nodes.py index 39918ce..8f24a6f 100644 --- a/nodes.py +++ b/nodes.py @@ -686,6 +686,8 @@ class ConceptAttentionVisualizerNode: "required": { "concept_maps": ("CONCEPT_MAPS",), "image": ("IMAGE",), + }, + "optional": { "alpha": ("FLOAT", { "default": 0.5, "min": 0.0,