Frontend improvements:
- Fixed "Check thumbnails at startup" modal to use EventSource properly
- Shows current file being processed with directory path
- Displays file type (image/video) and action (generating/skipping)
- Real-time progress updates with ETA calculation
- Detailed status messages in scrollable log area
- Increased modal width from max-w-md to max-w-2xl for long filenames
- Path truncation for files over 60 characters
- Console logging for debugging when debug mode enabled
- Better EventSource error handling with connection state logging
Backend improvements:
- Verbose scanning progress with directory counts
- File type breakdown in start message (X images, Y videos)
- More frequent progress updates (every 5 files instead of 10)
- Include current file path, type, and action in progress events
- Send error notifications during processing (first 5 errors)
- Enhanced completion message with error count and processing rate
- Detailed logging throughout the process
The thumbnail generation now provides real-time, detailed feedback in both
the settings panel and the startup prompt modal, making it clear which files
are being processed and the overall progress.
- Fixed TypeError "text.toLowerCase is not a function" by adding type checking
- Added support for modern ComfyUI node types:
- CFGGuider for CFG scale values
- BasicScheduler for steps parameter
- KSamplerSelect for sampler selection
- RandomNoise/SeedHistory for seed values
- Unified metadata parsing logic between main gallery and metadata viewer
- Fixed prompt identification to properly distinguish positive vs negative prompts
- Added NaN cleaning for JSON parsing to handle malformed data
- Improved text node analysis with PromptManager priority
All three gallery implementations now correctly parse and display:
- Checkpoint names
- Positive and negative prompts
- Technical parameters (steps, CFG, sampler, seed)
- Support for both legacy and modern ComfyUI workflows
Tested and verified with test_metadata_file.png across all implementations.
- Add support for new ComfyUI node types in gallery metadata extraction:
- CFGGuider for CFG scale values
- BasicScheduler for steps parameter
- KSamplerSelect for sampler selection
- RandomNoise/SeedHistory for seed values
- Update both main gallery (/gallery) and metadata viewer (/metadata.html)
- Fix metadata display issues where technical parameters showed as "Unknown"
- Add comprehensive test image and debug tools for validation
- Maintain backward compatibility with legacy KSampler nodes
This resolves metadata parsing issues with modern ComfyUI workflows
that use the newer node architecture for sampling and generation.
Fixes issue where PromptManager Gallery showed identical prompts for all
images when using workflows like Flux models that generate multiple images
with the same base workflow.
**Problem:**
- Gallery relied solely on PNG metadata extraction for prompt display
- Images generated from same workflow (e.g., Flux models) contained
identical workflow metadata but should show different prompts
- Navigation between images didn't update prompt information correctly
**Solution:**
1. **Enhanced metadata extraction:**
- Improved parseWorkflowData() to handle more ComfyUI node types
- Added support for PromptManagerText, UNETLoader, DualCLIPLoader
- Better negative prompt detection patterns
- Enhanced sampling parameter extraction
2. **New API endpoint:**
- Added GET /prompt_manager/images/prompt/{image_path}
- Queries database for actual prompt used during generation
- Provides accurate prompt data linked to specific images
3. **Hybrid metadata loading:**
- Primary: Query database for linked prompt data
- Fallback: Extract from PNG metadata if no database record
- Combines database prompts with PNG technical parameters
**Changes:**
- py/api.py: Added get_image_prompt() endpoint and route
- web/gallery.html: Enhanced loadImageMetadata() and parseWorkflowData()
**Result:**
- Gallery now displays correct, unique prompts for each image
- Prompt information updates properly when navigating between images
- Generation data refreshes correctly with prev/next navigation
- Maintains backward compatibility for images without database records
Resolves user-reported issue with Flux.1_Krea_Dev_workflow.json where
all images showed identical prompts in gallery view.
Fix compatibility issue with older SQLite versions that don't support
ORDER BY clause inside GROUP_CONCAT function.
- Remove ORDER BY from GROUP_CONCAT in SQL queries
- Add GROUP_CONCAT for created_at dates
- Sort IDs manually in Python after fetching results
- Maintain same behavior of keeping oldest prompt as primary
This resolves the startup error:
"sqlite3.OperationalError: near 'ORDER': syntax error"
The fix ensures compatibility with all SQLite versions while preserving
the original functionality of keeping the oldest duplicate.
Fix issue where every image appears twice in gallery on Windows systems
due to case-insensitive filesystem and path handling differences.
- Deduplicate files when searching with both lowercase/uppercase extensions
- Use pathlib.as_posix() to ensure forward slashes in URLs on all platforms
- Add normalized path tracking to prevent duplicate file collection
The root cause was:
1. Files were found twice (once for *.png and once for *.PNG) on Windows
2. URLs with backslashes caused path inconsistencies
Fixes gallery showing 1922 images when only 961 files exist on disk.
Fix AttributeError when processing PNG files with newer ComfyUI workflow format
where node inputs are stored as lists instead of dictionaries.
- Add _get_node_inputs() helper to normalize both dict and list input formats
- Add _find_text_in_node() to extract text from nodes using multiple strategies
- Update _extract_positive_prompt_from_comfyui_data() to use safe accessors
- Maintain full backward compatibility with existing workflow formats
Fixes error: "'list' object has no attribute 'get'" when scanning images
from workflows using the newer ComfyUI format.