Commit Graph
36 Commits
Author SHA1 Message Date
Vito Sansevero 42f9c344f8 feat: add WD14 tagger support (SwinV2 + ViT) with threshold controls
Add two WD14 classifier models as alternatives to JoyCaption LLM taggers.
WD14 models are ~400MB ONNX classifiers that output Danbooru tags with
confidence scores — much faster inference, no prompt needed.

Backend:
- Add wd14-swinv2 and wd14-vit entries to MODELS dict
- Add check/download/load/generate methods for ONNX-based WD14 inference
- Add general_threshold and character_threshold params to generate_tags()
- Filter "prepend:*" tags from exclude prefixes and skip-tagged logic

Frontend:
- Add WD14 radio buttons with download status in both admin and gallery
- Toggle prompt textarea vs threshold sliders based on model selection
- Pass thresholds to API for batch and single-image tagging
- Extract _setModelStatus() helper using safe DOM methods

Dependencies: onnxruntime (optional, with clear error message)
2026-02-10 16:27:40 -08:00
Vito Sansevero 0cb941e894 fix: move comfyui-theme.css to lib/tailwind/ for proper serving
The Python API only has static file routes for /prompt_manager/lib/
and /prompt_manager/js/ — no route exists for /css/. The theme CSS
was returning 404, causing all --pm-* variables to be undefined
(white/transparent rendering). Moved to lib/tailwind/ where the
existing route serves it correctly.
2026-02-08 06:53:32 -08:00
Vito Sansevero b616a26df1 style: Phase 3 typography and spacing pass
- Reduce heading sizes: text-xl/2xl/3xl → text-sm font-semibold
- Tighten modal padding: p-6 → p-4, px-6 py-4 → px-4 py-2
- Compact empty states: py-12 → py-6, py-8 → py-4
- Reduce space-y-6 → space-y-3 in metadata panels
- Shrink stat card numbers: text-xl → text-lg
- Shrink decorative emojis: text-2xl/3xl → text-lg
- Keep lightbox nav buttons at text-xl for usability
2026-02-08 06:39:00 -08:00
Vito Sansevero d0aa7d7080 feat: migrate to Tailwind v4 and ComfyUI theme token system
- Add comfyui-theme.css with --pm-* design tokens mapped to ComfyUI CSS vars
- Add theme-bridge.js for light/dark palette detection via ComfyUI API
- Migrate Tailwind from v3 to v4 (@import, @source, @utility directives)
- Remove tailwind.config.js (replaced by v4 CSS-based config)
- Begin admin.html component redesign: hardcoded colors → --pm-* tokens,
  strip gradients, tighten spacing for ComfyUI-native look

Work in progress — Phase 2 (component redesign) partially complete.
2026-02-08 06:23:48 -08:00
Vito Sansevero a17ecd02c1 fix: pre-compile Tailwind CSS and track vendor libs (#88)
Replace 398KB Tailwind Play Mode runtime (not for production) with 37KB
pre-compiled CSS. Fix .gitignore so web/lib/ vendor files (Tailwind CSS,
ViewerJS) are tracked — fresh clones were completely broken without them.

- Add gitignore negation rules for web/lib/
- Compile Tailwind v3.4.17 CSS at dev time via standalone CLI
- Replace <script> tags with <link> in admin, gallery, metadata HTML
- Delete tailwind.js runtime (no longer needed)
- Add Makefile with css/css-watch/css-setup targets for devs
- Track ViewerJS vendor files (viewer.min.js, viewer.min.css)
2026-02-07 07:57:31 -08:00
Vito Sansevero 4548beb723 refactor: split api.py into domain modules and extract frontend JS
Phase 4 structural refactoring:
- Split monolithic py/api.py (5.3k lines) into domain mixins:
  prompts.py, images.py, admin.py, logging_routes.py, autotag_routes.py
- Extract inline JS from admin.html into web/js/admin.js
- Extract inline JS from gallery.html into web/js/gallery.js
- Add gzip compression middleware to API responses (Phase 5.4)
- Standardize API error envelope with success: false (Phase 5.3)
- Add filmstrip image enrichment to prompt list responses (Phase 5.2)
2026-02-07 07:02:25 -08:00
Vito Sansevero af9ee4e671 feat(web): add load more prompts button 2026-02-06 14:33:10 -08:00
Vito Sansevero 760b2a0f48 feat(tags): add Phase 2 tag management enhancements
- Bulk tag operations: rename, delete, merge across all prompts
- Right-click context menu on tags (rename/delete/merge)
- Click prompt card → dashboard search, click thumbnail → ViewerJS
- Usage bars, prompt count badge, staggered card animations
- URL-synced tag selection (#/tags/landscape,portrait?mode=or)
- Untagged prompts filter with [untagged] entry
2026-02-03 18:40:58 -08:00
Vito Sansevero a7d842a51c feat(settings): add configurable gallery scan directory
Add ability to configure a custom image scan directory in Settings:
- New "Image Scan Directory" field in Settings modal
- "Currently Monitoring" display shows active directory path
- Settings API now returns/saves gallery_root_path and monitored_directories
- Image monitor checks GalleryConfig before auto-detecting
- Restart notification when gallery path changes

Closes #76
2026-02-02 15:58:54 -08:00
Vito Sansevero 0655af3713 fix(admin): use correct endpoint for saving new prompts
Change the saveNewPrompt() function to use /prompt_manager/save
instead of /prompt_manager/prompts which has no POST handler.

This was causing a 405 Method Not Allowed error when trying to
add new prompts from the admin interface.

Fixes #89
2026-02-02 15:20:05 -08:00
Vito Sansevero 344640eb26 Merge origin/main into feature/button
Resolve conflicts in py/api.py by keeping feature/button's thumbnail
path generation approach (using rel_path.with_suffix('') and string
formatting) which was tested and working correctly.
2026-02-02 15:15:53 -08:00
Vito Sansevero 15e828b7a6 build(web): update library paths in admin.html 2026-02-02 15:10:06 -08:00
Shaun Johnston b8a5eaf9a6 fix subdir thumbnail gen 2025-12-25 19:41:01 +10:00
Vito Sansevero ffc26709ad feat(web): add film strip feature for prompt images 2025-12-09 12:49:40 -08:00
Vito Sansevero 8abeeaa953 feat(web): Add prompt creation feature in admin panel 2025-12-09 09:29:47 -08:00
Vito Sansevero ba36814894 feat(admin): add auto-tagging feature to UI 2025-12-07 17:25:17 -08: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 Sansevero 4e873f585a refactor(tests): update tests for PromptManager changes 2025-08-30 17:27:06 -07:00
Vito Sansevero d3d03f4c07 feat(web): Add gallery button for image management 2025-06-09 08:41:24 -07:00
Vito Sansevero 9cbe0eec31 feat(viewer): integrate ViewerJS for image gallery 2025-06-04 08:57:26 -07:00
Vito Sansevero 180ae12f4d feat(web): add sort and star hover functionality 2025-06-04 06:52:04 -07:00
Vito Sansevero 9785c3b0b2 feat(admin): add sticky search controls and prune option 2025-06-03 17:55:44 -07:00
Vito Sansevero 389d739303 refactor(admin): improve notification z-index handling 2025-06-03 17:03:29 -07:00
Vito Sansevero 6b6ba3c62c feat(prompt_manager): add prepend and append text options 2025-06-03 17:03:18 -07:00
Vito Sansevero ece65edbb2 feat(metadata): Add metadata extraction in viewer 2025-06-01 12:25:41 -07:00
Vito Sansevero 0cd92f9c36 feat(tags): Add individual tag modal functionality 2025-05-29 06:47:50 -07:00
Vito Sansevero 763e1d64b0 refactor: improve stats update logic 2025-05-28 12:59:59 -07:00
Vito Sansevero fb09229719 feat(admin): add pagination controls to recent prompts 2025-05-28 11:01:10 -07:00
Vito Sansevero d02a939051 feat(web): add logs modal for viewing system logs 2025-05-28 08:27:45 -07:00
Vito Sansevero 3f77b07f85 feat(web): add image scanning feature in admin UI 2025-05-27 14:58:07 -07:00
Vito Sansevero 57aae95f8d feat(admin): add DB backup and restore functionality 2025-05-27 14:29:17 -07:00
Vito Sansevero ab1df9c50a feat(admin): add maintenance modal and operations 2025-05-26 10:11:29 -07:00
Vito Sansevero 166968f8a7 feat(admin): add copy prompt to clipboard feature 2025-05-25 21:22:34 -07:00
Vito Sansevero d8a8f278dc feat(image viewer): add image fit/full toggle feature 2025-05-24 14:53:46 -07:00
Vito Sansevero 092f80bb05 feat(web): Add admin and index UI for PromptManager 2025-05-24 12:26:21 -07:00