- 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
- 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
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>
- 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
- 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
- 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>