Fix attention_outputs error and alpha parameter issues
1. Fix 'attention_outputs' not defined error: - Change 'return attention_outputs' to 'return self.attention_outputs' - This fixes the NameError in ConceptAttention extraction 2. Fix alpha parameter validation issues: - Move alpha from 'required' to 'optional' in ConceptAttentionVisualizerNode - Remove alpha input from workflow JSON since it's now optional with default value - This resolves the 'Required input is missing: alpha' validation error These changes ensure the workflow runs without validation errors while maintaining the default alpha value of 0.5 for overlay blending.
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user