Commit Graph

222 Commits (16330934f5acc32111f5af4099ccb37856432b33)

Author SHA1 Message Date
zanllp 5990f0b811 fix(image): preserve original filename when saving images via right-click
- Add new /img/{filename} API endpoint that preserves filename in URL
- Replace toRawFileUrl with toImageUrl in all preview components
- Fix issue where right-click save named all images as "file"
- Update CHANGELOG with user-facing explanation
2026-03-21 03:01:07 +08:00
zanllp a89d5befd4 fix(api): add write permission requirement for update_exif endpoint 2026-03-15 13:07:22 +08:00
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 74382f25eb feat(parser): add support for invokeai_metadata format 2026-03-05 23:26:59 +08:00
zanllp 7d603c1e94 feat(metadata): parse and mixin extraJsonMetaInfo field
Add support for parsing the extraJsonMetaInfo field from image metadata.
The field values are merged into the meta dictionary with all values
ensured to be strings for safety.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 23:25:47 +08:00
zanllp 0aa0321ee2 chore(db): optimize database backup to once per day and reduce max backups to 4
- Change default IIB_DB_FILE_BACKUP_MAX from 8 to 4
- Add daily backup check to prevent multiple backups per day
- Skip backup if one already exists for the current date
2026-02-22 13:44:30 +08:00
zanllp 57a811e8a1 docs: reorganize skill documentation and extend URL scheme
- Move agent-guide.md to references/agent-patterns.md
- Create references/search-strategies.md for advanced search techniques
- Add Quick Links section to SKILL.md for better navigation
- Extend fuzzy-search pane to support pre-filled search parameters
  - Add initialSubstr, initialIsRegex, initialPathOnly props
  - Add initialMediaType filter and autoSearch control
- Update queryActions.ts to map URL props to component props
- Make search API parameters optional (regexp, cursor, folder_paths)
- Add ai-agents.md and ai-agents-zh.md documentation
2026-02-22 13:24:51 +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 c062b3bed5 feat: AI reuses existing folder names when organizing files
When running AI organize on a folder that already contains subfolders,
the AI will now consider reusing existing folder names if the theme
matches, instead of always generating new titles. This prevents
duplicate folders from being created when re-organizing the same
directory multiple times.

- Add existing_folder_names parameter to ClusterIibOutputReq
- Pass existing folder names from dest directory to AI title generation
- Update AI prompt to prioritize reusing matching folder names

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-17 20:02:19 +08:00
wuqinchuan 603262e42a fix: pass recursive parameter to embedding and include in cache key
- Pass recursive parameter from request to _build_embeddings_one_folder
- Include recursive in cache_params to avoid cache collision between
  recursive and non-recursive clustering results
- Add debug logging for recursive parameter tracking

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-17 18:11:25 +08:00
zanllp fcc3b66767 feat: add smart organize feature with AI-powered file organization
- Add smart organize feature that groups similar images based on prompt semantics
- AI generates meaningful folder names in user's preferred language
- Preview before action: review proposed organization, skip or adjust as needed
- Background processing for large folders
- Support move or copy, configurable min cluster size, include subfolders option

Backend changes:
- Add organize_files.py with job management and file operations
- Add recursive parameter to embedding and clustering APIs
- Default recursive=true for Topic Search (backward compatible)
- Default recursive=false for Smart Organize (first-level only)
- Update database on file move to preserve tags

Frontend changes:
- Add SmartOrganizeConfigModal for configuration
- Add OrganizeJobsPanel for progress tracking
- Add OrganizePreview for reviewing and confirming
- Add smart organize button to address bar
- Add i18n translations for zh-hans, zh-hant, en, de

Documentation:
- Update README.md and README-zh.md with feature description
- Update change.log.md with screenshots and video demo

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-17 17:14:02 +08:00
zanllp 7a2fcbe77e feat: add continue-on-error for move copy 2026-02-01 19:53:40 +08:00
zanllp 1c38d769e9 add log 2026-01-30 23:12:37 +08:00
zanllp 1d9e65f835 feat: add EXIF metadata display support 2026-01-29 23:49:49 +08:00
wuqinchuan e6fcd1afab fix: 修复视频流 Range 解析并提升大文件吞吐
- 支持 bytes=-N 尾部 Range 请求,避免大 mp4 卡顿
- 调整分块大小并在结束时清理文件句柄
2026-01-24 18:04:28 +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 4f4d766b73 fix: include hyphen in LoRA tag model name matching 2026-01-21 23:28:20 +08:00
zanllp a952a9f9d7 feat: add option to extract all ComfyUI prompts at once
- Add IIB_COMFYUI_EXTRACT_ALL_PROMPTS environment variable
- When enabled, extract all CLIPTextEncode prompts instead of following KSampler chain
- Note: All prompts will be merged into positive prompt field
2026-01-18 16:37:10 +08:00
zanllp d0e916f920 Update: cache banner and type declarations 2026-01-18 14:20:06 +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 6c16bd0d82 perf: optimize tag graph response and surface LLM failures 2026-01-11 20:42:14 +08:00
wuqinchuan 3771de5834 feat: enhance tag relation graph filtering, fullscreen, and i18n 2026-01-11 18:33:17 +08:00
wuqinchuan 59bef3915e feat: 优化query搜索并加入tag图(去掉max抽象层与d3依赖) 2026-01-11 00:56:58 +08:00
wuqinchuan c2c0c69fbc feat: Add tag relationship graph visualization for topic clusters
Features:
- Tag-based relationship graph using force-directed layout
- Hybrid weight calculation (frequency + TF-IDF)
- Automatic community detection using Louvain algorithm
- Interactive visualization with ECharts
- Support for Tag and Cluster nodes
- Click to search images by tag
- Top-N filtering to avoid visual clutter

Backend:
- New API endpoint: POST /db/cluster_tag_graph
- Tag weight calculation with configurable alpha
- Category inference (character/style/scene/object)
- Community detection (requires networkx, optional)

Frontend:
- New component: TagRelationGraph.vue
- Switch between Cluster Cards and Tag Graph views
- Interactive graph with drag/zoom/pan
- Node details panel with search functionality
- Stats panel showing tags/clusters/images count

Documentation:
- Added TAG_GRAPH_README.md with usage guide

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-11 00:53:38 +08:00
zanllp e6acf49711 fix secret verification failed 2026-01-10 12:59:40 +08:00
zanllp 3127b5aa65 fix 2026-01-04 23:21:40 +08:00
zanllp 26dfc573c9 Remove hardcoded test path from generate_image_cache function 2026-01-04 23:20:02 +08:00
zanllp a7e6109f17 fix: Lock major versions for requests, numpy, hnswlib and add runtime version info
- Lock requests to >=2.0.0,<3.0.0 (current: 2.32.5)
- Lock numpy to >=2.0.0,<3.0.0 (current: 2.4.0)
- Lock hnswlib to >=0.0.0,<1.0.0 (current: 0.8.0)
- Add runtime version info for requests, numpy, hnswlib in /version endpoint
2026-01-04 01:27:01 +08:00
wuqinchuan 96655d89c4 feat: show cached topics by default and fix topic deletion/capping 2026-01-03 23:50:27 +08:00
wuqinchuan 4d3617671d tune: reduce over-merging in topic clustering defaults 2026-01-03 23:49:36 +08:00
wuqinchuan 67c93dd9f3 fix: retry on network/API errors in LLM title generation 2026-01-03 23:49:36 +08:00
wuqinchuan 3a6b155db5 refactor: parse title JSON from text with retries 2026-01-03 23:49:36 +08:00
wuqinchuan cfa589c68f feat: improve topic search UX and dependency gating 2026-01-03 23:49:36 +08:00
wuqinchuan 3ba8997626 chore: require numpy/hnswlib for topic clustering 2026-01-03 23:47:16 +08:00
wuqinchuan 25190f7307 refactor: drop legacy synchronous cluster endpoint 2026-01-03 23:47:16 +08:00
wuqinchuan c22ac83bde perf: accelerate clustering with ANN (hnswlib) 2026-01-03 23:47:16 +08:00
wuqinchuan efcb500c53 feat: cache embedding failures and persist cluster results 2026-01-03 23:47:16 +08:00
wuqinchuan 2edf9e52d7 feat: async clustering job with progress UI 2026-01-03 23:47:16 +08:00
wuqinchuan e522d8e878 fix: make topic embedding non-blocking and cap embedding input length 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 89bd778182 fix 2025-12-19 01:29:32 +08:00
zanllp 858453238e feat: fix 2025-12-19 00:43:15 +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