Commit Graph
91 Commits
Author SHA1 Message Date
Dariusz L c08eabc465 Simplify download folder browser by removing manual path rows and preserving scroll position
- Remove 'Use model root' and 'Use typed folder' manual rows from the folder browser
- Remove category badge and folder browser header elements
- Add nested scroll element detection for scroll delta handling
- Preserve scroll position when re-rendering the folder browser on toggle
2026-06-23 04:28:41 +02:00
Dariusz L f2cd4cde30 feat: replace flat subfolder list with floating folder browser for download targets
Refactor populateSubfolderOptions into renderDownloadFolderBrowser to show a
persistent floating panel with an expandable folder tree grouped by base
directory. Includes live preview of the selected target path, manual
typed-folder rows, and window/viewport-aware positioning. Prevents duplicate
portal mounts and cleans up resize/scroll bindings on hide.
2026-06-23 04:16:38 +02:00
Dariusz L d8124d03da feat: add live backend search progress tracking
Frontend now polls a new backend endpoint (/model_resolver/search-progress/{progress_id})
to display real-time, per-source progress messages and percentages during model searches,
replacing static 'Searching...' indicators with granular status updates.
2026-06-23 02:23:45 +02:00
Dariusz L 3e631b14c0 resolve_download_methods: preserve search completion state and prevent stale UI updates
- Track selected base model at search start to detect user changes and surface stale results correctly
- Skip settleInactiveSearchProgress on successful search completion so the UI does not show 'Search interrupted'
- Clear pending/running source progress with 'No match' after a completed search run so stale progress indicators are removed
2026-06-22 03:53:40 +02:00
Dariusz L 34049c5ea6 Add LTX-2.3 models and resolved selection alias matching 2026-06-22 03:40:37 +02:00
Dariusz L b4cd98e1ca Refactor missing model key generation and DOM ID generation
- Centralize model key logic: replaced inline key construction across 5 files with
  getMissingModelKey() and new getMissingModelDomKey() helpers in lifecycle_graph_methods.

- Extend getMissingModelKey(): now incorporates nested_key, category, and an identity
  field (original_lora_name, original_path, expected_filename, name, filename, urn_string)
  so that distinct models within the same subgraph produce unique keys.

- Fix duplicate DOM ID collisions: getMissingModelDomKey() encodes the full key as a
  URL-safe base64 string for all element IDs (local-matches-body, selected-bar, combo,
  locate, local-matches-refresh, selected-apply, selected-remove), preventing collisions
  between subgraph instances that share a node_id/widget_index.

- Store missing_key on resolution objects in queue_methods to keep the canonical key in
  sync between queue and browser views.
2026-06-22 03:27:22 +02:00
Dariusz L 4cefb35b71 Persist local match alternatives collapsed state
Store the expanded/collapsed state of local match alternative sections in localStorage so the UI preference is remembered across sessions.
2026-06-22 02:52:34 +02:00
Dariusz L a499af3345 Enable local model matching for resolved models and prevent symlink/junction scan loops 2026-06-22 02:21:24 +02:00
Dariusz L 74a696a4bc Add manual refresh button for local model matches in missing browser
When a model is missing, users can now click a refresh button in the
'Local Matches' header to rescan local folders and refresh matches
for that specific model. The button requests POST /model_resolver/local-matches
with force_rescan=true, shows loading state, and updates the UI on
completion or error. CSS was added for the new button element.
2026-06-22 02:00:40 +02:00
Dariusz L 590b4a4969 feat(missing-browser): add toggle to show resolved models
Report resolved (already-existing) models alongside missing ones in the
missing-browser view. Resolved models are hidden by default; a new
'Show resolved' toggle in the toolbar reveals them with a badge and
reduced-opacity row styling. The toggle state is persisted in
localStorage.

Backend: include resolved_models and total_resolved in the analysis
payload so the frontend can merge them into the display list.

Frontend: normalize resolved workflow models into the missing-models
display shape, compute visibility-aware counts, and refresh the
missing-browser view on queue mutating actions.
2026-06-22 01:34:55 +02:00
Dariusz L ff95a2bd1e Make node locate race-safe and graph-switch-aware 2026-06-22 00:18:41 +02:00
Dariusz L 8d63fb8f2a feat(search): sync and settle search progress on visibility change and job cleanup
- Add settleInactiveSearchProgress to properly finalize pending/running
  sources when background jobs are interrupted or removed
- Hook window focus and visibilitychange in ResolverManagerDialog to
  trigger syncSearchProgressAfterResume so UI recovers after tab hide
- Refactor reconnectActiveSearchProgress to reuse sync logic and pass
  workflowKey through startEstimatedSearchProgress and refreshSearchUiForMissing
2026-06-21 21:46:45 +02:00
Dariusz L d88b3b6c6c feat: guard missing-browser split drag and register CSS track property 2026-06-21 21:12:28 +02:00
Dariusz L 9cfa50e406 perf(missing-browser): optimize resize and rendering performance
- Disable CSS transitions during splitter drag to prevent jank
- Apply content-visibility: auto to off-screen missing list and match rows
- Suppress redundant style.setProperty calls when split width is unchanged
- Reset applied split width state on cleanup
2026-06-21 20:04:52 +02:00
Dariusz L 0a98c9e44f feat: add suggest download subfolder button with lightbulb animation; normalize search button labels based on UI state
- Add grid layout and CSS for a new 'Suggest' column in the download target
  panel, including a lightbulb SVG icon button with a flash animation
- Update download_target_methods.js to render the suggest button in the
  dedicated grid area and apply a ‘mr-is-suggesting’ animation on click
- Adjust search button label logic so it shows 'Search Again' when there is
  a renderable search state in the panel, otherwise show 'Search Online'
2026-06-21 03:51:24 +02:00
Dariusz L 24fed2302f feat: support multi-line search button labels 2026-06-21 03:16:20 +02:00
Dariusz L 8ab567238e feat(web): add search/filter input support for base model and download target dropdowns
- Remove readonly from base model and download target category inputs to allow typing
- Add input event listeners that filter dropdown options in real-time
- Normalize base model tokens for fuzzy search matching
- Introduce getSearchBaseModelInputValue to resolve typed input to known options
- Add optional { sync } parameter to setSearchBaseModel to avoid redundant UI sync during input
- Show/hide dropdown lists based on filtered result count
2026-06-21 02:50:58 +02:00
Dariusz L 92be0d6213 Improve base model alias resolution and update model metadata
- Add version-trimmed alias generation to handle trailing version zeros (e.g. '4.0' -> '4')
- Track newly added base model names in 'new_models_added_list' field
- Include Ideogram 4.0, Boogu, and PolyGen in base-models registry
- Update web resolver to match aliases using both original and version-trimmed tokens
- Enhance base models update UI to show which new models were added
2026-06-21 02:29:42 +02:00
Dariusz L 4b6161b267 Add source tracking and tooltips for auto-selected base models in search panel 2026-06-21 02:12:11 +02:00
Dariusz L 593e200cd1 feat: improve auto base model detection per missing model
Make the Auto base model label context-aware by resolving the correct base
model for each individual missing/search entry instead of relying solely on
the dominant workflow base model. Search metadata, saved download targets,
local file matches, and path hints are now consulted before falling back
to the workflow-wide default.
2026-06-21 01:56:43 +02:00
Dariusz L 7a670e3b71 feat: improve download category inference and auto-fill for download targets 2026-06-20 01:40:17 +02:00
Dariusz L 1a4156f00d feat: add any-model fallback search for civitai, civarchive, and lora_manager_archive
When a model search returns no results for a specific base_model, retry the
same query with base_model_context=None so the provider can match any model.
Fallback matches are marked with any_model_match and base_model_fallback on
the result payload. The UI reports 'Found (Any Model)' when a result came
from this fallback path, and the cancel/progress button styling is tightened
to 16x16px with border-radius.
2026-06-20 00:53:51 +02:00
Dariusz L e66c660dd3 feat: add dedicated open_path field for download context and folder opening
- Add open_path to download history context context (queue_methods.js)
- Add open_path to active download progress context (resolve_download_methods.js)
- Use open_path as primary path for hasLocalPath check and openContainingFolder (model_info_methods.js)
2026-06-19 23:20:02 +02:00
Dariusz L 5985e63487 feat: add workflowId resolution and improved download workflow state detection 2026-06-19 23:08:04 +02:00
Dariusz L 3460fb510e feat: improve download history context menu and remove button support
- Propagate additional workflow fields (key, signature, tab info) to
  getDownloadHistoryFolderContext and queued missing model lookups
- Add remove button UI and removeDownloadHistoryEntry handler for
  individual download history entries
- Allow switching back to workflow from download history context menu
  alongside existing queue-download switch action
- Fix eligibility checks so folder and workflow context menu items
  render correctly for download history scope
2026-06-19 22:44:38 +02:00
Dariusz L e70055e82f feat(queue): add persistent download history with active/history tabs
Adds a downloads panel inside the resolve queue UI with two tabs:
- Active: live downloads
- History: completed or already-downloaded entries

History is persisted in localStorage (model_resolver_download_history, capped at 200 entries) via new helper methods on queueMethods. Downloads complete by calling rememberCompletedDownloadHistory(), which records filename, category, workflow, node, target path, size, status and timestamp. CSS additions cover the subtab bar, history item layout, and a small status badge.
2026-06-19 22:21:10 +02:00
Dariusz L 2e9ffb05a8 feat: add per-source search cancellation support
Implement AbortController-based cancellation for individual search sources
during background resolution. Users can now cancel a single pending/running
source search via a new cancel button in the progress UI, while other sources
continue uninterrupted. Add cancelled status tracking, source-level AbortController
management, CSS styling for the cancelled state, and cleanup on job teardown.
Also refactor getBackgroundSearchJob for consistent job lookup across callers.
2026-06-19 21:36:01 +02:00
Dariusz L c3caeb0a24 feat: add ETA and improved progress metadata to download queue 2026-06-19 21:20:40 +02:00
Dariusz L 78697ffc49 feat: add active workflow context to download queue items and download data
Track the active ComfyUI workflow name, route key, tab identity, and
signature on every download-info object, then expose those details in
the download queue render. Add a contextual 'Switch to Workflow'
menu action and helpers for locating and activating the correct
workflow tab from a stored route/label/tab identity.
2026-06-19 20:54:37 +02:00
Dariusz L 66bbaedf66 Verify SHA256 for existing downloads and surface already_exists in UI
core/downloader.py: When a file already exists at dest_path, extract the expected
SHA256 from metadata, prefers a trusted LoRA Manager sidecar hash, falls back to
calculating the file hash, and returns already_exists=true plus sha256_source
when the hashes match. If the hashes differ, the download is skipped with a
clear warning instead of silently re-downloading.

web/resolver/actions/resolve_download_methods.js: Thread already_exists through
resolveDownloadMethods so notifications, progress messages, and snapshot payloads
reflect 'Already downloaded' when the backend determined the model was a SHA256
match.
2026-06-19 04:27:53 +02:00
Dariusz L 936f1bed1a Add LoRA Manager-compatible sidecar metadata generation for downloaded models 2026-06-19 04:11:34 +02:00
Dariusz L 4f91accbab feat: improve model scan cache override, combo UX, and filename handling
- Add force_rescan end-to-end so callers can bypass the short-lived local model scan cache: backend entry in __init__.py and core/resolver.py, lifecycle_graph_methods forwards it through the workflow analysis body, and download_target_methods passes ?force=1 from the refresh flow.
- Rewrite combo dropdown lifecycle in missing_browser_methods with show/hide helpers, pointer-capture tracking, and a capture-phase outside-click listener so the list stays open during drag/hover and closes reliably otherwise.
- Animate refresh buttons (CSS keyframes + JS Web Animations) with reduced-motion fallback.
- Encode selected model path into the selected-bar data-model attribute and wire contextmenu so users can open the containing folder from the selection.
- Fix XSS risk in selected-bar label by escaping label HTML; change queue/selected Remove buttons to danger style.
- Increase max missing-browser model column width clamp from 430 to 820 and stop truncating missing-filename display; show full filename with tooltip instead.
- Update huggingface-author-index.json metadata timestamp/counts (1 file changed, 1 line).
2026-06-19 03:57:40 +02:00
Dariusz L 5f1e814751 feat: support subgraph-aware node location and widget model context
- workflow_analyzer: refactor widget category hint resolution and add widget name candidate extraction across widgets, inputs, proxyWidgets, and localized names; expose new helpers get_widget_name_candidates/get_widget_name_hint
- workflow_analyzer: add get_model_widget_category_hint and get_effective_model_category_hint to unify category fallback logic
- workflow_analyzer: include widget_name on model refs emitted by get_node_model_info
- workflow_analyzer: introduce promoted-widget context resolution (_build_promoted_widget_contexts, _find_promoted_widget_targets, etc.) and wire it into analyze_workflow_models so instance widgets and promoted widget locators are tracked with subgraph scope
- lifecycle_graph_methods: refactor locateNodeInGraph into subgraph-aware resolver using findLocateTarget/getGraphNodeById/findSubgraphById/findNodeInGraphTree; support targeting nodes inside specific subgraphs with proper canvas focus and notifications
- missing_browser_methods: use unified getMissingLocateTarget for locate button/display fields; pass subgraphId and isTopLevel to locateNodeInGraph; add promoted-widget-aware tooltips and canLocate handling
2026-06-19 01:39:15 +02:00
Dariusz L 6de0668c4b feat: add sams and ultralytics model categories
Add support for Two new model categories with full frontend and backend
integration:

- sams: maps sam, sam_model, sam_models → sams category
- ultralytics: maps ultralytics, ultralytics_bbox, ultralytics_segm, yolo → ultralytics category

Covers CATEGORY_MAP, settings templates/aliases, workflow_analyzer node hints,
download target resolution (JS), and folder detection.
2026-06-19 00:44:36 +02:00
Dariusz L 32d437df50 Expand model category and node type recognition
Add support for additional ComfyUI model types including diffusers, gligen,
style models (latent/regular upscale), audio encoders, background removal,
frame interpolation, geometry estimation, detection, model patches/photomaker,
and optical flow models.

Backend changes:
- Extend CATEGORY_MAP, URN_TYPE_MAP, and node type hints in workflow analyzer
  to cover dozens of new loader node types and singular/plural aliases.
- Add MODEL_OUTPUT_TYPE_TO_CATEGORY and get_node_output_category_hint() so
  loader output types can contribute category hints.
- Make widget name matching normalize underscores, hyphens, and spaces.
- Improve directory discovery to enumerate folders from folder_paths while
  filtering unsupported categories.
- Include folders as model entries in directory scanning (with a diffusers
  guard requiring model_index.json).

Frontend changes:
- Update download target category maps, display names, token name maps, and
  per-node widget index lists to match the expanded backend coverage.
2026-06-19 00:35:06 +02:00
Dariusz L 47d286620f feat: add configurable download path system with templates and mappings
Implements a new download path configuration UI and backend logic:
- Add Subfolder fill mode: Suggested (existing), Template, Manual
- Add Base Model Path Mappings to override detected base-model folders
- Add Default Root settings to control root directory per category
- Add Detect From Existing Folders button that infers templates and mappings from local model folders
- Add backend /model_resolver/root-directories and /model_resolver/path-template-suggestions routes
- Refactor resolver settings into core/settings.py for shared frontend/backend use
- Extract path template inference logic into core/path_templates.py
- Update download panel, context menu, and loading flow to use new path settings
2026-06-19 00:09:58 +02:00
Dariusz L 9399f52033 Preserve local matches and download target selections across workflow changes 2026-06-18 02:46:33 +02:00
Dariusz L c9dd0e47ac feat: improve model resolution for extensionless workflow values and add new node type support
- Add model_title match type for CivArchive and CivitAI sources, resolving
  extensionless workflow values by title similarity (threshold 82.0)
- Recognize new node types and widget indices across model categories
  (GGUF, CLIP, ControlNet, StyleModel, Hypernetwork, etc.)
- Scan known model combo widget indices even when the stored value has no
  file extension, treating non-placeholder strings as model references
- Strip known model extensions during workflow URL lookup so filename stems
  match regardless of extension
- Update HuggingFace author index metadata
2026-06-18 02:19:14 +02:00
Dariusz L 2f14026abc Fix: update badges, add GGUF model category mapping, rename panel title
- README.md: updated badge labelColor from 111827 to 1a1a1a for consistency
- core/workflow_analyzer.py: add LoaderGGUF and gguf_name mapping to diffusion_models
- web/resolver/model_resolver.js: rename panel title from 'Model Resolver' to 'Resolver'
2026-06-18 01:09:54 +02:00
Dariusz L 4943be89a9 Add responsive footer star link and update badge/metadata 2026-06-17 02:35:10 +02:00
Dariusz L a4d5bd4c5c feat(logging): add frontend/backend log controls, unify console logging
- Add frontend_logs_enabled/frontend_log_level and backend_logs_enabled/backend_log_level
  toggles and selectors in the Options panel (web/resolver/views/options_methods.js)
- Sync frontend logging settings from localStorage / server settings into the
  frontend logger on startup and settings load (download_target_methods.js)
- Apply backend logging settings from server settings in the Python backend
  (__init__.py), loading control state on startup and after saves
- Make frontend Logger resilient to stored configs that lack an 'enabled' flag
  and to legacy/invalid moduleSettings levels (logger.js)
- Guard default module logger level initialization against undefined settings
  (log_funcs.js)
- Replace scattered console.log/usages with module-level log.debug calls across
  resolve_download_methods.js, model_resolver.js, and workflow_state_methods.js
- Bump log system package version to 1.5.6 (core + web)
2026-06-17 01:51:29 +02:00
Dariusz L fa2002fc2a Add per-item Apply button to queued resolution selected bar
Refactor queue_methods.js to split applyPendingResolutions into
applyQueuedByKey (per-item) and applyPendingResolutionList (shared
implementation). Add an Apply button alongside the Remove button in
the selected resolution bar, wired to applyQueuedByKey with loading
state. Update CSS for .mr-selected-actions layout and .mr-btn-primary
styling in the detail pane.
2026-06-17 01:17:25 +02:00
Dariusz L 40b1108bd2 feat: expand multi-ref pending resolutions and fix race conditions in loaded/missing tabs
- Add getResolutionQueueKey, getResolutionNodeRefs, and expandPendingResolutionsForApply helpers in queue_methods.js so each queued resolution can carry multiple node refs and be fully resolved before apply.
- Store node_refs, is_lora_v2, original_lora_name, and nested_key on pending resolutions; expand them during apply, with a guard for empty selections.
- Introduce optimistic analysis updates (applyOptimisticAnalysisData + getOptimisticAnalysisDataAfterApply) so the missing/loaded views refresh immediately after apply, then refresh in the background via refreshAnalysisInBackground.
- Update notification messaging to reflect expanded reference counts.
- Fix race conditions in lifecycle_graph_methods.js and tabs_loaded_methods.js by assigning load tokens only after the async workflow-load path begins, so early returns no longer clobber the token and stale panels are suppressed.
- Minor README badge styling fixes: add labelColor=111827 and update the Python badge to an SVG-based asset.
2026-06-17 01:06:51 +02:00
Dariusz L d4d1715f8a fix(web): prevent stale workflow refreshes and improve signature detection
- Guard workflow-tab-click handler with setTimeout and generation ownership check to avoid stale state updates
- Add generation-based refresh cancellation so outdated retry attempts are discarded
- Expand workflow signature to detect more model reference types, normalize widget values, and include subgraph definitions
2026-06-17 00:29:59 +02:00
Dariusz L d533cda5e8 fix: preserve model_url fallback and add search download button icons with tooltips 2026-06-16 19:19:45 +02:00
Dariusz L 7e6e08a4e7 refactor: simplify queue panel layout and unify tab styling with shared tab components 2026-06-12 18:42:26 +02:00
Dariusz L 406b6b2624 feat: add Downloads tab to queue panel and scope active downloads to current workflow 2026-06-12 18:21:24 +02:00
Dariusz L 38874f5d99 feat: centralize download progress UI state and re-render on view reconnect 2026-06-12 18:01:07 +02:00
Dariusz L 03c274a88d feat: extract token family prefixes as additional download candidates 2026-06-12 17:44:14 +02:00
Dariusz L 1cd9668db2 feat: track base_directory across download and subfolder flows; normalize clip to text_encoders 2026-06-12 17:23:59 +02:00