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.
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.
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.
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.
- 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
- 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
- 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.
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.
- Adopt ComfyUI's ComfyExtension/comfy_entrypoint API in __init__.py when
available, falling back to legacy NODE_CLASS_MAPPINGS/DISPLAY_NAME_MAPPINGS
on older runtimes so the node loads across ComfyUI versions.
- Hook into beforeRegisterNodeDef, loadedGraphNode, and afterConfigureGraph
in web/resolver.js so marker nodes are patched during registration, graph
load, and initial render.
- Teach model_resolver.js to recognise the marker node by every known class
property shape, patch its type on creation, enforce a minimum size with
setSize() when present, and dirty the canvas so changes are reflected.
This change introduces a complete Local Metadata Builder feature in the resolver
options panel. It allows users to scan local model files, create or update
.metadata.json sidecars, fill missing SHA256 hashes from safetensors headers or
file hashing, and review run history with cancel/error handling.
Changes include:
- backend API: /model_resolver/metadata-build/{capabilities,start,progress/{id},cancel}
- backend worker: core/metadata_builder.py with parallel metadata generation
- frontend section: Local Metadata Builder tab in Options
- frontend polling UI: progress, worker breakdown, history table, status/notifications
Previously, identify_missing_models grouped missing entries only by filename,
which could merge unrelated models from different categories that happen to
share a filename. This change deduplicates by (category, filename) and tracks
all_node_refs with a reference_count so the frontend can preserve one
resolution per node reference instead of collapsing duplicates.
Frontend changes in resolve_download_methods.js iterate over all_node_refs,
and missing_browser_methods.js now shows '+ N refs' in the missing-model
label and clarifies the locate tooltip when multiple workflow references
share the same missing model.
- add POST /model_resolver/local-matches-by-hash backend endpoint
- expand local hash lookup sources to lora_manager_archive, popular, and model_list
- deduplicate backend hash matches by SHA256 value instead of source-hash tuple
- add frontend sync for remote hash matches and hash-label disambiguation
- propagate sha256, file_info, selected_file, and selected_version in model selection/download flows
- render local match status with consistent hash labels across search panel and resolvers