Commit Graph

75 Commits (6e3e8b072bbb08d786d2c4ebf9a3ea6e5386fbb5)

Author SHA1 Message Date
zanllp 41ad78f6b3 feat(metadata): add editable generation information and EXIF caching
- Add prompt editor modal with support for editing positive/negative prompts
- Add key-value editor for custom metadata fields (string and JSON modes)
- Cache EXIF data in database for faster retrieval
- Track manually edited prompts with exif_edited flag
- Add validation for required fields and unique key constraints
- Add full internationalization support (EN, ZH-Hans, ZH-Hant, DE)
- Update changelog with new features and screenshot
- Clean up gitignore to use wildcard for video files
2026-03-15 01:22:11 +08:00
zanllp a5b99223e3 fix: cleanup orphaned images when removing extra paths
When a folder is removed from the library, images under that folder are
now properly cleaned up from the database if they are not covered by any
other registered paths. This fixes the issue where Random Image would
pull from folders that had been removed.

The cleanup logic checks if each image is still "owned" by any remaining
scanned path before deletion, supporting nested path scenarios where a
parent path may still contain the images.

Fixes #868

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-18 14:21:56 +08:00
zanllp 5add6f0de6 fix: add null checks for Tag.get_or_create calls
- Tag.get_or_create now returns None for invalid tag names instead of creating error tags
- Add null checks before using tag.id in all callers
- Adjust tag validation: non-Chinese tags now limited to 8 words or 40 characters
2026-01-23 00:17:53 +08:00
zanllp cd1793b248 Revert "refactor: Handle invalid tag names gracefully"
This reverts commit e1dad21286.
2026-01-22 22:43:58 +08:00
zanllp e1dad21286 refactor: Handle invalid tag names gracefully
- Change Tag.get_or_create to return None for invalid tag names
- Add None checks at all call sites to prevent AttributeError
- Protects against invalid Chinese names (>16 chars) and other language names (>8 words)
- Ensures system stability when encountering problematic tag data
2026-01-22 22:41:28 +08:00
zanllp bc6eb3c6dc perf: Optimize Tag.get_all for large datasets
Important performance optimization for handling large tag datasets:

- When total tags > 8192, limit 'pos' type tags to top 4096 by count
- Return all non-pos tags without limitation
- Significantly reduces memory usage and load time for large databases
- Maintains functionality while improving performance with massive tag counts
2026-01-22 01:44:11 +08:00
zanllp 40b8361ed0 feat: Add tag name validation and cleanup
- Add tag name validation in Tag.get_or_create method
- Chinese names: max 16 characters
- Other languages: max 8 words
- Return error tags with uppercase English names when validation fails
- Ensure error tags are created through get_or_create to maintain database consistency
- Clean up database: removed 487,938 non-custom tags, keeping only 12 custom tags
2026-01-22 01:29:53 +08:00
zanllp 7b2af32b10 feat: enhance topic search with keyword limit, irregular layout, and cache banner
- Add keyword count limit (default 600) for Tag layer to improve performance
- Implement irregular node layout with random perturbations
- Add layer spacing based on adjacent layer widths for consistent gaps
- Add cache result banner with collapse/expand functionality
- Add streaming response utility for LLM API calls
- Update i18n translations for new cache banner texts
- Optimize tag graph: increase max tags to 500, add level-2 tiered requirements
- Fix keyword deduplication and null handling in tag graph
2026-01-18 01:29:25 +08:00
zanllp 0c1998bdb0 Improve keyword consistency in topic clustering
- Add get_all_keywords_frequency method to TopicTitleCache
- Initialize keyword frequency from historical cached cluster keywords
- Prioritize top 100 high-frequency keywords when generating new keywords
- Update LLM prompt to prefer existing keywords from frequency list
- Reduce duplicate/similar keyword generation across clusters
- Add streaming support for tag_graph LLM requests
- Increase LLM timeout and retry limits for better reliability
2026-01-12 00:56:03 +08:00
wuqinchuan 59bef3915e feat: 优化query搜索并加入tag图(去掉max抽象层与d3依赖) 2026-01-11 00:56:58 +08:00
wuqinchuan 96655d89c4 feat: show cached topics by default and fix topic deletion/capping 2026-01-03 23:50:27 +08:00
wuqinchuan efcb500c53 feat: cache embedding failures and persist cluster results 2026-01-03 23:47:16 +08:00
wuqinchuan 101a30afb4 Revert "Revert "feat: experimental natural-language categorization & search (persistent scope, clustering, retrieval)""
This reverts commit dd5663dd89.
2026-01-03 23:47:16 +08:00
wuqinchuan dd5663dd89 Revert "feat: experimental natural-language categorization & search (persistent scope, clustering, retrieval)"
This reverts commit d7e2b2f9fc.
2025-12-28 23:16:31 +08:00
wuqinchuan d7e2b2f9fc feat: experimental natural-language categorization & search (persistent scope, clustering, retrieval) 2025-12-28 23:10:13 +08:00
zanllp da0082516c feat: add audio file playback support and improve TikTok view
- Add audio file recognition in backend (tool.py) and frontend (file.ts)
- Support audio formats: mp3, wav, ogg, flac, m4a, aac, wma
- Add audio player in TikTok view with starfield background animation
- Add audio modal similar to video modal
- Update file type filter to multi-select checkboxes (image/video/audio)
- Add filename display in TikTok view with Douyin-style bottom gradient
- Add long press to hide/show controls in TikTok view
- Fix audio resource cleanup when closing TikTok view
- Add Audio media type tag in database indexing
- Add i18n translations for audio related strings
2025-12-15 00:22:23 +08:00
zanllp e5413e41f1 feat: optimize random images, improve ComfyUI detection and prompt display
Backend optimizations:
- Refactor get_random_images() using SQLite ORDER BY RANDOM()
- Simplify from 60+ lines to ~20 lines with better performance
- Remove complex multi-cycle index calculations
- Maintain file existence check and auto-cleanup

ComfyUI support:
- Add fallback to 'parameters' field in PNG metadata
- Improve detection for ComfyUI-generated images

Frontend improvements:
- Smart prompt display: auto-detect tag vs natural language format
- Add getTextLength() with Chinese character weight (1 char = 3 letters)
- Refactor isTagStylePrompt() with clear rules:
  * Any tag length > 50  natural language format
  * Average tag length > 30  natural language format
- Natural language prompts shown as paragraphs
- Tag-style prompts shown as badges
- Better support for Chinese/English mixed content

Build:
- Update frontend asset references
2025-11-30 20:50:13 +08:00
zanllp d8ed522996 feat: implement auto-tagging feature with custom tag rules
- Add AutoTagMatcher singleton class for automatic tag application
- Support filtering by multiple fields (prompt, model, sampler, etc.)
- Add frontend UI for managing auto-tag rules in global settings
- Support AND logic for multiple conditions within a rule
- Integrate with image indexing process
- Add natural language vs tag-style prompt detection and rendering
- Include rule descriptions and usage guidance in UI
- Auto-reload rules when updated via API
2025-11-30 19:00:24 +08:00
bupro 198de49e58 feat: Add video tag search and random sort with i18n support
- Added video tag support for enhanced media file handling:
  * Video files can now use tag-based search functionality
  * Added support for reading video generation info from txt files
  * Enhanced EXIF data handling for video media types

- Implemented random sort feature for image grid:
  * Added random sort toggle button with visual indicators (🎲/📅)
  * Supports both random and date-based sorting modes
  * Optimized pagination for random sorting with offset-based cursors

- Complete internationalization support:
  * Added translations for random sort and date sort in all languages
  * Supported languages: zh-hans, en, de, zh-hant
  * Improved UI consistency across language variants

- Backend improvements:
  * Enhanced database queries to support random sorting
  * Added random_sort parameter to API endpoints
  * Improved error handling for video file processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 00:41:10 +08:00
zanllp d78cc773c9 add log 2025-08-04 22:13:58 +08:00
wuqinchuan 4df86dc1e2 feat: Add media type filter support for search functionality 2025-07-13 20:09:36 +08:00
wuqinchuan fb68d78f39 feat(file-view): add toggle for TikTok-style file display,enable some experimental features by default 2025-06-02 20:46:22 +08:00
zanllp 387ef7875b
Merge pull request #804 from zanllp/fix/insufficient-random-media-count
fix(media): ensure minimum quantity in random image/video API
2025-05-25 20:35:55 +08:00
zanllp 6fc5dcf35e fix(media): ensure minimum quantity in random image/video API 2025-05-25 20:34:04 +08:00
Ancions-dot 1b28c1aed8 determine image resolution using Pillow 2025-05-07 04:08:18 +02:00
Yoonsoo Kim 488492bf66 configurable db path 2025-02-28 16:45:18 +09:00
zanllp ea10260756 feat: add a new feature try-my-luck 2025-02-23 04:09:01 +08:00
zanllp 476f4ff779 Support disabling maximize and enable fuzzy search with path-only option 2024-12-26 01:53:06 +08:00
zanllp b005d8760d feat: support more shortcut keys 2024-11-16 22:49:49 +08:00
zanllp 3c3808d93f refactor: remove useless code 2024-09-28 20:27:35 +08:00
zanllp 9718d545f6 Add support for custom tag colors 2024-09-28 20:23:14 +08:00
zanllp de48ae1f0d Add WorkspaceSnapshot feature. Add support for customizing the startup page 2024-07-15 05:16:11 +08:00
zanllp 83b4c65757 Implement a basic plugin mechanism 2024-07-03 11:13:34 +08:00
zanllp 94b27b5a74 Add 'Move To', 'Copy To', 'Copy File Path', and 'Open File Location in New Tab' to context menu 2024-07-01 07:05:09 +08:00
zanllp bf6c72895d Implement automatic synchronization of global settings to the backend 2024-06-24 06:05:46 +08:00
zanllp db775d0666 Add support for StableSwarmUI 2024-06-13 18:41:05 +08:00
zanllp f1f59dee74 fixed loc 2024-06-10 11:14:23 +08:00
zanllp 37d89503c7 feat: Expand tag generation support 2024-06-02 03:23:10 +08:00
zanllp 5896970d78 dec 2024-05-26 10:26:34 +08:00
zanllp c80afce4a9 Improve performance of adding tags 2024-05-17 23:11:27 +08:00
zanllp 0fb43eefec Fix potential recursion error 2024-05-16 02:00:00 +08:00
zanllp bb4837881b Add support for adding aliases to paths 2024-04-13 03:57:49 +08:00
zanllp 2d096ba2ff Add support for multiple view types for the same path 2024-04-11 00:51:22 +08:00
zanllp 5c8ca65904 Align metadata generated by various parsers 2024-03-27 21:03:59 +08:00
zanllp 6646af77ef feat: Added support for Fooocus 2024-03-27 20:40:58 +08:00
zanllp 78e80288f6 fix: import error 2024-03-27 00:56:04 +08:00
zanllp 25cafe4323 refactor: rename 2024-03-27 00:21:30 +08:00
zanllp 199c8ba13b Merge branch 'dev-vendor' of https://github.com/zanllp/sd-webui-infinite-image-browsing into dev-vendor 2024-03-26 23:33:35 +08:00
wuqinchuan 6ab8c9630a temp save 2024-03-26 23:20:54 +08:00
zanllp 9088388530 feat: Implement automatic database file backup mechanism 2024-03-22 23:13:26 +08:00