Commit Graph
550 Commits
Author SHA1 Message Date
Dariusz L c1e7dcfa1c Preserve resolver display mode when auto-opening for missing models
Add openResolverForDetectedMissingModels() in model_resolver.js to
keep the current resolver display state when missing models are
detected: if the resolver dialog is already visible, schedule an
active workflow refresh instead of re-activating the button; if it
is hidden, activate the resolver button as before.

Update the auto-open-on-missing path to use the new method, and
adjust/add tests to cover the preserved display mode behavior.
2026-07-19 15:28:47 +02:00
Dariusz L 0047514f7c Add auto_open_on_missing setting to control resolver auto-launch 2026-07-19 15:21:04 +02:00
Dariusz L a4875a607b Update huggingface-author-index.json 2026-07-19 15:12:56 +02:00
Dariusz L e7ee26cad8 refactor: preserve downloads panel DOM state during active refresh
Patch the panel element instead of replacing innerHTML, maintaining hover and tooltip state for active download cards.
2026-07-19 15:10:12 +02:00
HarrievG db2c77290c fix: support Hugging Face Hub 1.23+ Xet downloads
Handle removal of the legacy Xet connection-info helper while preserving the native download fallback. Adds regression coverage for mixed Hugging Face dependency versions.
2026-07-19 14:45:49 +02:00
Dariusz L 79e7aa3743 refactor: unify provider JSON requests and move settings schema to dynamic loading 2026-07-18 15:10:34 +02:00
Dariusz L 8cc02010b0 Remove unused backend and frontend code 2026-07-18 14:47:05 +02:00
Dariusz L 5362cb17a3 refactor: remove dead code and add isAutoOpenEnabled helper 2026-07-18 14:01:05 +02:00
Dariusz L 29ecf533e0 Update huggingface-author-index.json 2026-07-18 13:49:21 +02:00
Dariusz L 89a721fc62 Normalize CivitAI search queries and simplify tRPC search behavior 2026-07-18 13:43:51 +02:00
Dariusz L c39eea4f51 refactor: remove dead code and unused frontend handlers across backend and web 2026-07-18 13:30:34 +02:00
Dariusz L b302566542 refactor: remove dead code and add clear_completed_downloads endpoint 2026-07-18 12:57:29 +02:00
Dariusz L 0b53fca8c6 refactor: unify category resolution, network requests, sidecar lookup, and progress tracking
Consolidate provider-specific category mapping into resolve_model_category(),
shared JSON request handling into execute_provider_json_request(), sidecar
path resolution into get_or_build_model_sidecar_info(), and progress
reporting into ProgressTracker. Update civitai/civarchive/common sources to
use the unified helpers. Add tests for the new utilities. Remove redundant
frontend wrapper methods from render_format_methods.js.
2026-07-18 12:48:11 +02:00
Dariusz L 759aef99f1 Unify model result building and progress payload updates 2026-07-18 12:26:17 +02:00
Dariusz L 92dbfc7932 Create test_unification_refactoring.py 2026-07-18 10:24:28 +02:00
Dariusz L 2987c036e2 refactor: unify settings schema and dynamic node rules exposure across backend and frontend 2026-07-18 10:21:49 +02:00
Dariusz L aff97c5e29 refactor: centralize shared normalization, timestamp, and search-result helpers 2026-07-18 10:02:34 +02:00
Dariusz L 719b3b3f43 Refactor: centralize metadata sidecar helpers and custom-result builders 2026-07-18 09:43:27 +02:00
Dariusz L be12494953 refactor: centralize shared utilities across backend and frontend
Backend:
- Move SHA256 normalization logic from path_utils._normalize_header_sha256
  into core/type_utils.normalize_sha256, adding support for 0x-prefixed
  hashes and unifying the normalization path used by
  extract_safetensors_header_sha256.
- Add tests for the 0x prefix normalization cases.

Frontend:
- Introduce copyTextWithFeedback in web/resolver/utils/html_utils.js
  as a shared clipboard helper with configurable feedback text, CSS class,
  and duration, replacing repeated inline clipboard copy logic in
  globals.js, model_info_methods.js, and the notification utility.
- Centralize showNotification on ResolverManagerDialog and remove the
  duplicate implementation from missingBrowserMethods.
- Replace local const localStorage = safeStorage aliases in
  model_info_methods.js, missing_browser_methods.js, and
  options_methods.js with direct safeStorage usage.
2026-07-17 18:06:22 +02:00
Dariusz L 28d24214aa fix: improve resolver error propagation, sanitization, and consistency 2026-07-16 11:11:48 +02:00
Dariusz L 20a83c7262 refactor: improve code quality and consistency across backend modules 2026-07-16 11:00:45 +02:00
Dariusz L 61f1403543 Update .gitignore 2026-07-16 10:53:08 +02:00
Dariusz L 38dc3e4474 refactor: centralize shared utilities, normalize imports, and configure project linting 2026-07-16 10:52:06 +02:00
Dariusz L 04c3de9533 refactor: reuse shared path and URL normalization utilities
Replace inline regex path/URL normalization in resolver.py and
missing_browser_methods.js with the existing shared helpers:

- core/resolver.py: normalize_workflow_download_url now uses
  prepare_remote_size_probe_url from type_utils instead of a local
  huggingface-specific regex substitution.
- web/resolver/views/missing_browser_methods.js: path identity
  generation now uses normalizePathIdentity from html_utils.js rather
  than ad hoc replace/trim/lowercase logic.

This keeps normalization behavior consistent across the codebase and
removes duplicated regex patterns.
2026-07-16 10:27:06 +02:00
Dariusz L 52a8d3a54b refactor: use get_filename_from_path helper for consistent filename extraction 2026-07-16 10:18:15 +02:00
Dariusz L 8823049f9e refactor: centralize filename extraction, remote URL normalization, and storage abstractions 2026-07-16 10:13:38 +02:00
Dariusz L 32394135e9 refactor: centralize catalog management and unify matcher/progress logic 2026-07-16 09:51:47 +02:00
Dariusz L e4485f3bdf Treat SAM and Ultralytics models as base-model-independent in search panel 2026-07-16 09:10:00 +02:00
Dariusz L 54dae10be5 refactor: centralize background task handling and deduplicate title matching
- Add run_in_background_thread() in __init__.py to unify success/cancel/error
  handling for hash calculation and local metadata build progress
- Extract match_model_by_title_generic() in core/matcher.py and use it from
  both CivitAI and CivArchive providers to remove duplicated version/file
  selection logic
- Enable safetensors header SHA256 extraction by default and report hash source
  through progress updates
- Update options_methods.js to match backend progress behavior
- Add tests/test_title_matching_hashing.py covering title matching and hashing
- Minor metadata updates
2026-07-15 13:27:04 +02:00
Dariusz L 7e724d373f refactor: complete migration to centralized HTTP helpers and shared normalization
- Replace remaining direct requests.get calls with request_public_url,
  request_source_response, and request_source_json in downloader,
  civarchive, civitai, and popular sources
- Use normalize_model_file_info in CivitAI source instead of inline logic
- Update huggingface-author-index.json metadata
- Add tests for civarchive page/search requests and popular base model updates
- Adjust downloader redirect test for new request_public_url behavior
2026-07-15 13:04:00 +02:00
Dariusz L a5e08653af Update README.md 2026-07-14 20:39:28 +02:00
Dariusz L 74d4a415bc Update README.md 2026-07-14 20:35:09 +02:00
Dariusz L 027d44e244 Update README.md 2026-07-14 20:30:28 +02:00
Dariusz L f3221282a3 Update huggingface-author-index.json 2026-07-14 12:12:35 +02:00
Dariusz L 8cf688eba6 refactor: centralize source API requests, polling, and path parsing
- Add request_source_response and request_source_json helpers with 429 retry logic
- Introduce shared split_path_segments and parse_provider_model_url utilities
- Migrate CivitAI, CivArchive, HuggingFace, and ModelList sources to centralized helpers
- Add generic pollBackgroundTask utility for frontend progress polling
- Add tests for request_source_json, split_path_segments, parse_provider_model_url
- Add huggingface-hub to requirements
2026-07-14 12:03:35 +02:00
Dariusz L a5b54bb7de Update pyproject.toml v1.0.4 2026-07-14 11:17:17 +02:00
Dariusz L cb1042b00d Add tests directory and remove tests/ from .gitignore 2026-07-14 11:15:51 +02:00
Dariusz L 280ca2e6de Improve HuggingFace Xet downloads with native progress snapshots, transfer metrics, cancellation, and finalizing UI state 2026-07-14 11:02:57 +02:00
Dariusz L 1f0edaaa7e Harden aria2 downloads, retry RPC, and preserve HuggingFace XET redirect headers 2026-07-14 02:33:44 +02:00
Dariusz L 48db08ae1a Harden network requests, downloads, and path handling
- Add core/network_utils.py with URL validation, public-IP enforcement,
  redirect validation, and safe request_public_url/validate_public_http_url helpers
- Replace direct requests calls in downloader/type_utils/sources with
  request_public_url so redirects are validated before follow-up
- Replace netloc string checks with host_matches_domain for CivitAI,
  CivArchive, and HuggingFace host matching
- Add HuggingFace Xet download backend with progress reporting and
  cancellation support via hf_xet/huggingface_hub
- Harden aria2 installer: reject symlinks/special files in archives,
  restrict custom aria2c paths to the managed install, and update UI copy
- Normalize paths with realpath and enforce configured model roots in
  local hash/metadata routes, plus remove caller-selected metadata_path
  injection in sidecar writing
- Sanitize download/network errors to strip signed query strings before
  logging or showing them to the user
2026-07-14 01:33:19 +02:00
Dariusz L 208bf06f3d Update README.md 2026-07-14 00:17:19 +02:00
Dariusz L 7feea3b61e Restrict scanner extension filtering to configured category extensions only 2026-07-14 00:09:59 +02:00
Dariusz L b0661b7d81 Update huggingface-author-index.json 2026-07-13 23:29:34 +02:00
Dariusz L 8ae6efcc82 Update pyproject.toml v1.0.3 2026-07-12 23:42:34 +02:00
Dariusz L 44153d9d7a Make download cancellation workflow-scoped and prevent stale progress from reviving cancelled downloads
- Introduce workflow-scoped download state keys so active downloads and progress are isolated per workflow tab/route.
- Add a transient 'cancelling' status path and a finalizeCancelledDownloadFrontend helper to avoid flicker and prevent stale progress responses from recreating completed/cancelled UI state.
- Guard active-download lookups by current workflow scope to reduce cross-workflow interference.
2026-07-12 23:28:42 +02:00
Dariusz L 6ed34b6a92 Preserve active download local matches and clean up cancelled downloads
Keep path-specific Local Matches for active downloads during refreshes,
URN search, and missing-model display so late hash-only lookups do not
overwrite them.

Remove cancelled download matches from missing-model UI and cached
analysis when a download is cancelled.
2026-07-12 22:04:53 +02:00
Dariusz L 64fdb7bd87 Import build_search_result in civitai source module 2026-07-12 21:20:46 +02:00
Dariusz L 572b948b92 Add Tripo and Hunyuan3D base models and refresh HuggingFace author index cache 2026-07-12 21:10:12 +02:00
Dariusz L 8cd3a2968b Use indented JSON when writing HuggingFace author index cache 2026-07-12 21:04:04 +02:00
Dariusz L 6451d9bcf4 Improve model path matching and refresh HuggingFace author index
core/path_templates.py: allow model alias tokens to match when suffixed
with a version string or plural form, reducing false negatives in
single-folder path resolution.

metadata/huggingface-author-index.json: update Comfy-Org index timestamp
and repository ordering.
2026-07-12 21:00:18 +02:00