Commit Graph
192 Commits
Author SHA1 Message Date
Vito 227bdf015f Merge pull request #73 from x0x0b/fix-star-width
fix: star icon misalignment on hover

Thanks for the fix @x0x0b
2025-10-28 16:38:00 -07:00
x0x0b d074cd5968 fix 2025-10-28 07:55:57 +09:00
x0x0b a4373c0949 fix: star icon misalignment on hover 2025-10-28 07:51:54 +09:00
Vito 95661a5da1 Update README.md
update beta info
2025-10-15 05:53:17 -07:00
Vito Sansevero e2a3df86e1 docs: Update README with v2 beta announcement and testing instructions 2025-09-25 08:07:30 -07:00
Vito Sansevero ff47b8d9a9 remove v1.0.0 2025-09-15 13:02:10 -07:00
Vito 26168d137e Update README.md 2025-09-15 12:01:12 -07:00
Vito 8a5ca89963 Update README.md 2025-09-15 12:00:55 -07:00
Vito e741d6d020 Merge pull request #51 from ComfyAssets/bug/size-fix
Bug/size fix
2025-09-09 09:32:19 -07:00
Vito Sansevero e0e61ad618 chore: bump version to 3.0.21 in pyproject.toml 2025-09-09 09:30:09 -07:00
Vito Sansevero d91c92c08b refactor: Optimize IS_CHANGED method logic 2025-09-09 09:29:25 -07:00
Vito Sansevero bd547dd532 refactor(prompt_manager): optimize input change tracking 2025-09-09 09:29:17 -07:00
Vito 8a623a8430 Merge pull request #49 from ComfyAssets/bug/size-fix
Bug/size fix
2025-08-30 17:34:40 -07:00
Vito Sansevero 8f01bc1541 chore: bump version to 3.0.20 in pyproject.toml 2025-08-30 17:33:53 -07:00
Vito Sansevero 4e873f585a refactor(tests): update tests for PromptManager changes 2025-08-30 17:27:06 -07:00
Vito 2881f85d1b Merge pull request #45 from ComfyAssets/docstrings-fresh
Add comprehensive docstrings to Python modules
2025-08-12 06:54:34 -07:00
Vito Sansevero 22593e8514 docs: add comprehensive docstrings to all Python modules
- Add Google-style docstrings to main node files (prompt_manager.py, prompt_manager_text.py)
- Enhance database module docstrings with detailed parameter and return documentation
- Add comprehensive docstrings to all utils modules with usage examples
- Document API endpoints and configuration classes thoroughly
- Update module-level docstrings in all __init__.py files
- Ensure consistent naming (ComfyUI_PromptManager) across all documentation
- Follow Python best practices for docstring formatting
2025-08-12 06:51:36 -07:00
Vito Sansevero 0b94063e73 chore: remove local settings, bump version to 3.0.19 2025-08-11 19:32:28 -07:00
Vito 077432df84 Merge pull request #44 from ComfyAssets/bugfix/generate-thumbnails
fix(gallery): improve thumbnail generation progress feedback and moda…
2025-08-11 19:30:09 -07:00
Vito Sansevero db5f6c3307 fix(gallery): improve thumbnail generation progress feedback and modal width
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.
2025-08-11 19:10:41 -07:00
Vito Sansevero d949585b35 chore: bump version to 3.0.18 in pyproject.toml 2025-08-11 15:32:48 -07:00
Vito 2625a78121 Merge pull request #43 from ComfyAssets/fix/gallery-metadata-display
Fix/gallery metadata display - fixes for #41
2025-08-11 15:32:22 -07:00
Vito Sansevero 638dd44db2 fix(gallery): complete metadata parsing improvements for all gallery views
- 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.
2025-08-11 15:30:40 -07:00
Vito Sansevero 97cc4c175f cleanup: remove temporary debug files 2025-08-11 15:15:45 -07:00
Vito Sansevero 6fdfdea89c fix(gallery): enhance metadata parsing for modern ComfyUI workflows
- 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.
2025-08-11 15:15:19 -07:00
Vito Sansevero a6997e0c8c chore: bump version to 3.0.17 in pyproject.toml 2025-08-11 14:20:49 -07:00
Vito 922be66aa4 Merge pull request #42 from ComfyAssets/fix/gallery-prompt-navigation-issue
fix(gallery): resolve prompt display issue when navigating between images fixes #41
2025-08-11 14:20:12 -07:00
Vito Sansevero a17dcba540 fix(gallery): resolve prompt display issue when navigating between images
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.
2025-08-11 14:18:13 -07:00
Vito Sansevero 6aa924cbf0 style: Fix formatting and imports in prompt manager 2025-08-08 20:45:34 -07:00
Vito Sansevero 190146f7b6 chore(pyproject): bump version to 3.0.16 2025-08-04 07:00:14 -07:00
Vito 0c01a86803 Merge pull request #40 from ComfyAssets/fix/sqlite-order-by-compatibility
fix(database): resolve SQLite ORDER BY syntax error in GROUP_CONCAT fixes #36
2025-08-04 06:59:32 -07:00
Vito Sansevero f161fc4c1f fix(database): resolve SQLite ORDER BY syntax error in GROUP_CONCAT
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.
2025-08-04 06:56:05 -07:00
Vito 52d137183e Merge pull request #39 from ComfyAssets/fix/windows-duplicate-images
fix(gallery): resolve duplicate image display on Windows, should fix #37
2025-08-04 06:50:09 -07:00
Vito Sansevero 7cc042f48c fix(gallery): resolve duplicate image display on Windows
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.
2025-08-04 06:48:53 -07:00
Vito b39eeb0c59 Merge pull request #38 from ComfyAssets/fix/workflow-format-compatibility
Fix/workflow format compatibility
2025-08-04 06:33:15 -07:00
Vito Sansevero f488eec029 chore: bump version to 3.0.15 in pyproject.toml 2025-08-04 06:32:48 -07:00
Vito Sansevero 983306366f fix(api): handle new ComfyUI workflow format with list-based inputs
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.
2025-08-04 06:31:35 -07:00
Vito Sansevero e2eef54eb3 feat(utils): Add ComfyUI integration utilities 2025-07-25 14:03:49 -07:00
Vito Sansevero e0a7f509a1 feat: Add ComfyUI integration to PromptManagerText 2025-07-25 14:03:40 -07:00
Vito Sansevero e2d2ff17ae feat(prompt_manager): integrate ComfyUI for metadata 2025-07-25 14:03:08 -07:00
Vito Sansevero eb183d191c style(init): clean up whitespace and formatting 2025-07-25 14:02:57 -07:00
Vito Sansevero cb3d09ad46 chore: bump version to 3.0.13 in pyproject.toml 2025-06-19 16:56:52 -07:00
Vito Sansevero f7a2c2a5f5 style: Change log level from info to debug 2025-06-19 16:56:45 -07:00
Vito Sansevero caa48d7cdf refactor(database): enhance prompt ID validation logic 2025-06-19 16:56:33 -07:00
Vito Sansevero 2c890f7eaa style(models): Change log level from info to debug 2025-06-19 16:56:25 -07:00
Vito Sansevero 6e7a958355 style(api): Change log level from info to debug 2025-06-19 16:56:14 -07:00
Vito Sansevero ff12c03619 feat(gallery): Add thumbnail check on startup 2025-06-19 16:56:04 -07:00
Vito fccac4f93d Merge pull request #34 from ComfyAssets/cleanup-logs
Cleanup logs
2025-06-19 13:06:55 -07:00
Vito Sansevero 283268a1ec chore: bump version to 3.0.12 in pyproject.toml 2025-06-19 13:06:37 -07:00
Vito Sansevero 685e44fde0 style: Change log level from info to debug 2025-06-19 13:06:18 -07:00