✅ REMOVED unused code and nodes:
- MetaManLoadAndConvert (obsolete - replaced by Load Image + Extract Components)
- MetaManUniversalNodeV2 (obsolete - replaced by three-node architecture)
- MetaManWorkflowSaver (specialized node - not part of core)
- MetaManDependencyResolver (specialized node - not part of core)
- specialized_nodes.py (entire file removed)
- api_integration.py (only used by removed specialized nodes)
- metadata_parser.py (only used by removed specialized nodes)
- validation.py (testing file for removed features)
- templates/ directory (universal schema system not used by core nodes)
- test_installation.py (obsolete testing file)
✅ KEPT only three core nodes:
- MetaManLoadImage: Load images and extract metadata
- MetaManExtractComponents: Extract individual workflow parameters for reuse
- MetaManEmbedAndSave: Convert metadata formats and save with embedded metadata
✅ UPDATED configuration:
- __init__.py: Only registers three core nodes
- requirements.txt: Simplified to only essential dependencies
- metaman.py: Clean, self-contained implementation with all necessary functionality
✅ ENHANCED features maintained:
- Universal metadata extraction from any platform
- Tensor.AI EMS de-obfuscation
- Target service format conversion (A1111, ComfyUI, Civitai, Forge, etc.)
- Directory-based file organization
- Complete workflow component extraction
Result: Clean, focused codebase with 1,200+ lines of production-ready code
covering all essential metadata management functionality.
- Add target_service dropdown for choosing output format (automatic1111, comfyui, civitai, forge, tensor.ai, leonardo.ai)
- Replace filename_prefix with directory parameter for subdirectory creation
- Add comprehensive format conversion methods for each target service
- Files now saved as MetaMan_{service}_{timestamp}.png in specified subdirectories
- Enhanced metadata embedding with service-specific formatting
- Embeddings are stored in comfyui_workflow.nodes[].widgets_values, not comfyui_prompt
- Added _scan_workflow_widget_values() method to scan workflow data structure
- Store current metadata in self._current_metadata for cross-method access
- This should finally detect Power Prompt embeddings correctly
Fixes: Session 8 embeddings detection issue
- Added debug logs to show widget_values for each node
- Added type checking and value preview for widget contents
- Will help identify why Power Prompt embeddings are not being found
- Added debug logs to _extract_embeddings_from_text to show regex matches
- Added debug logs to _extract_embeddings_universal to show text candidates
- Will help identify why embeddings are not being detected
- Extract width/height from image_size field instead of defaulting to 512x512
- Add widget_values scanning to detect embeddings in Power Prompt nodes
- Resolves Session 8 Priority 1 & 2 issues
- Modified MetaManExtractComponents to return simplified LoRA list
- Enhanced LoRAs: Only real_name and weight fields
- Regular LoRAs: name mapped to real_name, weight preserved
- Removes unnecessary hash, label, and other metadata fields
- Cleaner output for workflow integration
- Updated logging to show simplified LoRA counts
MAJOR IMPROVEMENTS:
- Enhanced negative prompt detection with embedding syntax recognition
- Added _is_clearly_negative_content() to exclude obvious negative content from positive prompts
- Reduced length scoring weight for very long text (prevents negative prompts from dominating)
- Added comprehensive embeddings extraction with _extract_embeddings_universal()
- Updated MetaMan Extract Components to output LoRAs and embeddings as lists instead of strings
- Added well-known negative embedding detection (BadDream, FastNegative, etc.)
- Enhanced negative keyword density analysis with ratio-based scoring
This should fix the issue where negative prompts appear in both positive and negative outputs
by properly excluding content with high negative keyword density or embedding syntax.
- Added _is_lora_only_content() to detect LoraTagLoader nodes and LoRA-only text
- Added _extract_human_readable_content() to separate human prompts from LoRA tags
- Modified _score_as_positive_prompt() to exclude LoRA-only content (return 0.0)
- Reduced LoRA scoring weight and made it conditional on human content presence
- This fixes the issue where LoRA tags were being selected instead of actual human prompts
Test case: '10010.text (LoraTagLoader)' should now be excluded, allowing
'10024.text (CLIPTextEncode)' with actual prompt to be selected.
- Priority 4: Added missing _extract_loras_from_text method to MetaManLoadImage class
- Priority 1: Enhanced _score_as_positive_prompt with better detection for processed fields (populated_text, formatted, etc.)
- Priority 2: Improved _parse_parameter_line to handle complex prompts with nested parentheses and brackets
- Increased scoring weight for LoRA presence and processed text fields
- Better handling of ImpactWildcardEncode and custom node outputs
Features implemented:
- MetaManExtractComponents: Extract individual workflow components from metadata JSON
- MetaManLoadAndConvert: Combined load + conversion functionality
- MetaManEmbedAndSave: Clean metadata embedding and save functionality
- Updated node registrations in __init__.py
Priority 2 delivers the most valuable workflow: 'stealing' specific parameters
from any image to use directly in ComfyUI workflows via individual typed outputs:
- positive_prompt, negative_prompt (STRING)
- steps, seed, width, height (INT)
- cfg_scale, denoising_strength (FLOAT)
- sampler, scheduler, model_name, loras (STRING)
Ready for testing with ComfyUI_00070_.png test case.
- Change metadata_json from optional to required input
- Update function signature to match required parameter order
- Improve error handling for invalid metadata_json format
- Add better debug messaging for workflow guidance
- Forces proper two-node workflow: MetaManLoadImage → MetaManUniversalV2
Ensures users connect both image and metadata_json outputs correctly.
- Create MetaManLoadImage node that loads images with metadata preserved
- Extracts ComfyUI workflow/prompt data directly from PNG files
- Returns both image tensor and metadata JSON
- Update MetaManUniversalNodeV2 to accept optional metadata_json input
- Prioritize metadata from load image node over PIL extraction
- Register new node in both metaman.py and __init__.py
Solves metadata stripping issue by reading files before ComfyUI processing.
- Implement _try_read_original_file() to search for source PNG files
- Search ComfyUI input/output/temp directories for matching images
- Match files by dimensions and modification time
- Open original files directly with PIL to preserve PNG chunks
- Extract ComfyUI workflow/prompt metadata from original files
- Fallback when ComfyUI processed images have no metadata
Fixes issue where Load Image node strips PNG text chunks.
- Show image type, mode, format, size details
- Check for filename attribute from file loading
- Show PNG chunk sizes and content info
- Try alternative image.info access for metadata
- Identify potential metadata in different locations
Debug why PNG text chunks are not being found.
BREAKING CHANGE: Simplified node interface for better usability
Changes:
- Removed complex operation dropdown - node now has single focused purpose
- Reduced inputs to just: image + target_service selection
- Streamlined outputs to: processed image + comprehensive JSON metadata
- Integrated Civitai API for real-time dependency resolution
- Automatic metadata embedding in target service format
- Single workflow: extract → convert → embed → return
Features:
✅ Automatic source service detection
✅ Universal metadata conversion
✅ Target service format embedding in PNG chunks
✅ Live Civitai dependency lookup with download URLs
✅ Comprehensive JSON output with all conversion data
✅ Proper rate limiting for API calls
Technical improvements:
- Real Civitai API integration with hash matching
- Intelligent PNG chunk embedding per service
- Enhanced error handling with JSON error responses
- Optimized workflow for single-purpose efficiency
The node is now much simpler to use while providing more powerful functionality.
- Updated all type hints to use built-in types (dict, list, tuple) instead of typing imports
- Removed Dict, List, Tuple from typing imports since they're not needed in Python 3.10+
- Fixed NameError: name 'Dict' is not defined in specialized_nodes.py
- Modernized type annotations throughout codebase for better compatibility
- Resolves ComfyUI import error when loading MetaMan nodes
Files updated:
- specialized_nodes.py: Fixed all Dict/List/Tuple type hints
- metaman.py: Updated type annotations to modern syntax
- metadata_parser.py: Modernized type hints for consistency
Tested: ✅ Nodes now load successfully in ComfyUI without import errors
- Universal metadata extraction and conversion across AI platforms
- Support for A1111, ComfyUI, Civitai, Forge, Tensor.AI, Leonardo.AI
- Template-driven architecture for easy platform extension
- Model dependency resolution with download URLs
- Custom 'meta' PNG chunk standard for cross-platform compatibility
- Comprehensive validation and testing system