Enhanced embeddings extraction: Improved workflow widget scanning for Power Prompt embeddings
This commit is contained in:
+1
-26
@@ -993,36 +993,11 @@ class MetaManLoadImage:
|
||||
})
|
||||
|
||||
print(f"MetaMan Universal: Found text in {node_id}.{field_name} ({class_type}): {len(field_value)} chars")
|
||||
|
||||
# CRITICAL: Also scan widget_values for text content (this is where Power Prompt embeddings are stored)
|
||||
widget_values = node_data.get('widget_values', [])
|
||||
print(f"MetaMan Widget Debug: Node {node_id} ({class_type}) widget_values: {widget_values}")
|
||||
|
||||
if isinstance(widget_values, list) and len(widget_values) > 0:
|
||||
for i, widget_value in enumerate(widget_values):
|
||||
print(f"MetaMan Widget Debug: Checking widget_{i}: type={type(widget_value)}, value='{str(widget_value)[:50]}...'")
|
||||
if isinstance(widget_value, str) and len(widget_value.strip()) > 5:
|
||||
text_candidates.append({
|
||||
'text': widget_value,
|
||||
'source': f"{node_id}.widget_{i}",
|
||||
'node_id': node_id,
|
||||
'field_name': f"widget_{i}",
|
||||
'node_type': class_type,
|
||||
'length': len(widget_value),
|
||||
'is_text_field': True, # Widget values often contain prompts/embeddings
|
||||
'is_processed_field': False
|
||||
})
|
||||
|
||||
print(f"MetaMan Universal: Found text in {node_id}.widget_{i} ({class_type}): {len(widget_value)} chars")
|
||||
else:
|
||||
print(f"MetaMan Widget Debug: Skipping widget_{i} - not string or too short")
|
||||
else:
|
||||
print(f"MetaMan Widget Debug: Node {node_id} has no widget_values or empty list")
|
||||
|
||||
return text_candidates
|
||||
|
||||
def _scan_workflow_widget_values(self) -> list:
|
||||
"""Scan workflow data for widgets_values - this is where Power Prompt embeddings are stored!"""
|
||||
"""Enhanced workflow data scanning for widgets_values - critical for Power Prompt embeddings!"""
|
||||
text_candidates = []
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user