12 Commits
Author SHA1 Message Date
Ben FinkleaandClaude Opus 4.5 cb47b8579c Fix test URLs and flexible check_interval assertion
- Update test URLs from localhost:18188 to gandalf.local:8188
- Make check_interval test flexible (accept any valid 1-168 value)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:09:13 -06:00
Ben FinkleaandClaude Opus 4.5 6c1ad0cc35 Enable output folder asset scanning automatically
- Add enable_output_asset_scanning() to __init__.py
- Calls seed_assets(["output"]) when extension loads
- Output images now appear in Media Assets "Imported" tab
- No manual ComfyUI patching required - works automatically

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:34:11 -06:00
Ben FinkleaandClaude Opus 4.5 3dfe652ffc Add auto-switch to Imported tab in Media Assets panel
- Create default-imported-tab.js extension that automatically switches
  from Generated to Imported tab when Media Assets panel opens
- Uses MutationObserver to detect sidebar changes and switch tabs
- Ensures users see all output images by default instead of empty
  Generated tab (which only shows current session outputs)

Note: Also requires ComfyUI modification to seed_assets() in main.py
and server.py to include "output" folder in asset scanning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 15:08:25 -06:00
Ben FinkleaandClaude Opus 4.5 0b6b9066b3 Fix multiple bugs: menu button visibility, source_hint handling, tempfile security
Bug fixes:
- Fix menu button not appearing: Use app.registerExtension() for proper
  ComfyUI initialization timing. The button now appears in the top bar
  next to the Manager button.
- Fix source_hint incorrectly saved as source_url: Pattern-matched hints
  like "Lightricks/LTX-Video" are not valid URLs and should not be used
  for update checks.
- Fix deprecated tempfile.mktemp(): Use secure mkstemp() instead to avoid
  race conditions.
- Add os import for file descriptor handling in update_scheduler.py

Test improvements:
- Update Playwright tests to hover over UI to reveal ComfyUI menu
- All 26 tests now passing (17 unit + 9 UI)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:46:47 -06:00
Ben FinkleaandClaude Opus 4.5 20aa859c8e Fix scheduler to read check interval from config each cycle
Previously the scheduler used the instance variable set at initialization,
ignoring config changes. Now it reads check_interval_hours from the config
database each cycle, allowing users to change the interval without restarting.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:24:24 -06:00
Ben FinkleaandClaude Opus 4.5 ae68617528 Fix check updates to process all models and show correct status
- Fixed filter that was skipping models with sources (should still check them)
- Now marks all processed models with last_checked timestamp
- Fixed JS status display to properly detect checked vs unchecked models
- Models without valid URLs still get marked as checked (skipped)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:56:39 -06:00
Ben FinkleaandClaude Opus 4.5 f807d1b927 Unify lookup and check into single concurrent operation
- Merged "Lookup Sources" and "Check Updates" into one button
- Now processes models concurrently (5 at a time by default)
- Single click: hashes files, finds sources, checks for updates
- 10 models processed in ~2 seconds vs sequential approach

Simpler UX with faster performance through asyncio.gather().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:53:38 -06:00
Ben FinkleaandClaude Opus 4.5 69197802b6 Add smart source detection with pattern matching and HuggingFace search
When CivitAI hash lookup fails, now tries:
1. Pattern matching for known model families (Gemma, CLIP, SAM, YOLO, etc.)
2. HuggingFace API search by filename

This identifies sources for models from HuggingFace, GitHub, and other
repositories that aren't on CivitAI.

Also fixed lookup getting stuck on hint results by properly filtering
out already-checked models regardless of source_type.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:46:48 -06:00
Ben FinkleaandClaude Opus 4.5 34303e53bd Fix lookup to skip already-checked models
Models marked with source_type="not_found" were being
re-selected for lookup since they still had no source_url.
Now filtering excludes these already-checked models.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:32:00 -06:00
Ben FinkleaandClaude Opus 4.5 261d3c598c Add CivitAI hash lookup with progressive UI feedback
- Added lookup_civitai_by_hash() to query CivitAI API by file hash
- Modified lookup-sources endpoint to process one model at a time
- UI now shows real-time progress with found/not-found counts
- Added Stop button to cancel ongoing lookup
- Computes SHA256 hashes for models that don't have them

This allows identifying models that were downloaded outside of
tracked sources and finding their CivitAI pages automatically.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 13:26:51 -06:00
Ben FinkleaandClaude Opus 4.5 77e81efa2d Fix menu button to use new ComfyUI menu API
The legacy .comfy-menu is hidden in newer ComfyUI versions.
Updated createMenuButton to use the new ComfyButton/ComfyButtonGroup
components from ComfyUI's UI system, matching how ComfyUI-Manager
implements its button.

The button now appears in the top menu bar next to the Manager button.
Falls back to legacy menu for older ComfyUI versions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 23:05:07 -06:00
Ben FinkleaandClaude Opus 4.5 9256a1c87c Initial commit: ComfyUI-ModelSync extension
A custom node extension for ComfyUI that provides:
- Model version tracking for HuggingFace and CivitAI
- Automatic model updates with configurable scheduling
- Multi-GPU synchronization with VRAM-based filtering
- Metadata management with hash verification

Features:
- SQLite database for model metadata storage
- REST API endpoints for all operations
- Web UI panel integrated into ComfyUI menu
- Background scheduler for automatic update checks
- rsync-based sync to remote machines
- VRAM estimation for model filtering

Tests:
- 17 unit tests covering all library modules
- Playwright integration tests for UI verification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 22:57:09 -06:00