Commit Graph
231 Commits
Author SHA1 Message Date
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
Dariusz L cb01596cf8 Add right-click folder context menu on category and subfolder inputs
Introduces helper methods to attach folder-open context menus to category/subfolder dropdowns:
- getDownloadTargetBaseDirectory / joinLocalPath / getDownloadTargetFolderContext
- setDownloadFolderContextTarget / syncDownloadTargetFolderContext

Also calls these methods after auto-fills, suggestions, and applying download target so the UI gets live right-click-open-folder support.
2026-06-12 17:08:11 +02:00
Dariusz L 91a998bea2 feat: generalize download subfolder suggestions for all model types
- Replace CivitAI-specific subfolder suggestion with broadened logic that derives candidates from model metadata, filename patterns, and existing folder structure
- Add getSuggestedModelSubfolderCandidates / getSuggestedExistingSubfolderByModelName helpers
- Normalize download category consistently via normalize_download_category in backend and frontend
- Backend now walks actual ComfyUI folder paths dynamically instead of hardcoded category mapping
- Rename frontend methods to applySuggestedDownloadSubfolder / forceSuggestedDownloadSubfolder
- Update Auto-fill subfolder tooltip to reflect expanded scope across all model categories
2026-06-12 17:02:28 +02:00
Dariusz L 7a1473b58e feat: normalize download category strings across backend and frontend
Add a shared normalize_download_category helper (with CATEGORY_MAP) in Python
and use it in get_download_directory to prefer redirected paths and to rank
diffusion_models above legacy unet folders. Mirror the same normalization in
the JS downloadTargetMethods, applying it consistently when coalescing
downloadDirectories, building dropdown keys, and reading/writing selections.
Also fix display labels to use 'diffusion_models' instead of 'unet'.
2026-06-12 16:42:58 +02:00
Dariusz L bbfd50a075 feat: expose download folder context through status indicators and notifications
Propagate the resolved download directory and file path from the backend
download flow into frontend progress UI: add \path\ and \directory\ fields
to download progress state, render right-clickable context menu entries on
progress bars and status messages, and allow opening the download folder
directly from completion or error notifications. Also update the HuggingFace
author index.
2026-06-12 16:32:48 +02:00
Dariusz L 98c4b10e90 chore: update HuggingFace author index and tighten model details CSS 2026-06-08 17:43:27 +02:00
Dariusz L c7f108fcf7 feat: add gated mirror status to model details view 2026-06-08 17:34:51 +02:00
Dariusz L 2a43597c9e feat: support model details for LoraManager archive downloads
Map lora_manager_archive source to Civitai on the details endpoint so LoraManager archive results can retrieve model metadata. Add detailsContext payload to resolve_download_methods and extend model_info_methods to accept lora_manager_archive as a valid source.
2026-06-08 04:49:41 +02:00
Dariusz L 0933860dfb fix: update Civitai download row keys and LoraManager archive result keys
- Prefix rowKey with sourceKey in resolveDownloadMethods to prevent
  cross-source row collisions by using a composite identifier.
- Update LoraManager archive result check from 'url' to 'download_url'
  to match Civitai API response field naming, and fallback to model card
  URL using download_url to make the open button resilient when the
  direct URL is unavailable.
2026-06-08 03:39:53 +02:00
Dariusz L 2709dddb22 feat: improve Civitai integration and download button resilience 2026-06-08 03:26:32 +02:00
Dariusz L 6e2f1b3101 feat: enhance CivArchive resilience and mirror display
backend:
- add 429 retry handling with backoff in CivArchive API requests
- add page-scraping fallback for CivArchive model payloads
- normalize CivArchive mirrors with dead/gated/paid/sha256 metadata
- include file metadata and mirror data in normalized archive files
- propagate additional dead/missing status field aliases
- include metadata in normalized CivitAI files

frontend:
- render mirror lists with source grouping, dead-link indicators, and skull icons
- add file badges (primary, type, format, size, fp, mirror count, id)
- improve secondary info in resolve/download methods to include base model
- enhance search panel secondary info with base model and filename
- on selecting a version with empty files, fetch fresh version details
- propagate base model context to CivitAI search state and display labels
2026-06-08 03:03:53 +02:00
Dariusz L 9bebb52395 feat: replace model details image gallery with draggable horizontal strip 2026-06-08 01:06:04 +02:00
Dariusz L 511cf4ff1d refactor: update HuggingFace author index and refresh search panel icons 2026-06-08 00:56:27 +02:00
Dariusz L 65b4594d19 feat: add model details modal and source-aware context menus 2026-06-08 00:53:39 +02:00
Dariusz L 87fabdd9d9 feat: add image preview modal and extended CivitAI image metadata
Adds a fullscreen image preview dialog to the model info panel with
navigation, copy-prompt support, generation metadata display, and
referenced resources listing.

Extends CivitAI backend extraction to handle varied metadata key names
(negativePrompt, Clip skip, Model, etc.) and surfaces clip_skip, width,
height, tags, resources, and raw metadata through the new preview UI.

Renames z-index variable to reserve a dedicated layer for the preview
backdrop.
2026-06-07 18:57:03 +02:00
Dariusz L 46be3fbb50 fix: separate z-index layers for info dialogs and tooltips 2026-06-07 18:44:10 +02:00
Dariusz L e61c868038 fix: prevent stale tab renders by scoping workflow and loaded models data loading to their respective tokens 2026-06-07 18:37:00 +02:00
Dariusz L 9160b365b0 feat: update nav icons for Local Database and Maintenance options 2026-06-07 18:18:07 +02:00
Dariusz L 5e52cab664 feat: add auto-fill subfolder toggle to control download target behavior 2026-06-07 18:10:40 +02:00
Dariusz L b7c4f47e90 feat: add auto-fill base model toggle to control default search behavior
Adds a new 'Auto-fill model filter' setting under Search Defaults that
controls whether new searches default to 'Auto' (detecting the workflow
base model) or 'none' (Any model). The preference is persisted in
localStorage as ModelResolver.autoFillBaseModel and is respected across
search panel initialization, base model dropdown defaults, workflow state
cloning, and dirty-state checks.
2026-06-07 18:02:42 +02:00
Dariusz L 420b7e50c2 feat: plumb lora strength and active flags through workflow analysis for accurate model resolution 2026-06-07 17:52:28 +02:00
Dariusz L b9c9867472 feat: replace context menu text icons with SVG icons for consistent UI styling 2026-06-07 15:20:42 +02:00
Dariusz L 6e78489cd6 feat: resolve base model aliases from local file paths and boost weight for confident local matches 2026-06-07 15:09:33 +02:00
Dariusz L 37005d9f18 feat: improve base model resolution and scoring in search panel
- Add resolveBaseModelAlias with exact-then-fuzzy matching
- Use weighted scoring in getDominantWorkflowBaseModel to prefer
  checkpoints/diffusion/unet (weight 8) over loras (weight 2)
- Skip URN-prefixed values during model reference extraction
- Refresh base model select labels after download panel re-render
- Update HuggingFace author index metadata and repo list
2026-06-07 14:57:04 +02:00
Dariusz L ab59cd231f feat: add base model filtering across search sources, API routes, and frontend UI 2026-06-06 19:43:43 +02:00
Dariusz L 57ac022fc4 feat: add refresh button to re-analyze workflow and refresh local matches 2026-06-06 18:26:47 +02:00
Dariusz L 7bd1b9ad33 feat: persist download target subfolder selections and add suggest button 2026-06-06 18:18:58 +02:00
Dariusz L 541881ce49 refactor: replace post-download re-analysis with targeted local match refresh
Replace the heavy autoResolveAfterDownload path (which re-analyzed the
entire workflow) with a more efficient refreshLocalMatchesForDownloadedMissing
call that queries /model_resolver/local-matches directly for the
specific downloaded file.

This removes the unnecessary re-analysis step, adds an explicit
force_rescan flag (coerced to bool on the backend for safe JSON
payload handling), propagates the missing model's category through
the activeDownloads tracking objects, and updates related UI text
to reflect the new narrower behavior.
2026-06-06 18:09:06 +02:00
Dariusz L d335a1a1e2 refactor: cache queue DOM element references for updateQueueUI
Store references to queue title, toggle, and clear buttons as instance
properties in the constructor, replacing repeated DOM queries inside
updateQueueUI with direct reference lookups.
2026-06-06 17:16:51 +02:00
Dariusz L 3d176b5e9a feat: propagate CivArchive search errors to UI status and tracking
Raise CivArchiveSearchError in civarchive backend, catch and store it in
source_results in the workflow analyzer, surface it in resolve_download_methods
as an 'error' status, and display error messages in search_panel progress
items and tooltips.
2026-06-06 17:13:18 +02:00
Dariusz L 57b8bc7cda feat: add force search (ignore cache) toggle to batch search menu
Adds a checkbox in the resolver footer search menu that bypasses all
search result caches for the duration of a batch search run.

Frontend (queue_methods.js, resolve_download_methods.js,
resolver_dialog.js, search_panel.js, resolver-main.css):
- Introduce checkbox-type footer menu items (type: 'checkbox').
- Add 'Force search (ignore cache)' checkbox to the search menu,
  wired to a new forceBatchSearch flag on ResolverManagerDialog.
- Pass forceSearch through searchMissingBatch and searchOnline to
  the backend API call.
- When the manual search button is clicked and results already exist
  for that model, forceSearch defaults to true.
- mergeSearchResults respects forceRefresh: if a forced search
  returns no results for a source, that source is cleared from the
  cached results.

Backend (__init__.py, core/sources/huggingface.py):
- force_search is read from the incoming API request and, when true,
  clears all active source search caches (local, huggingface,
  civitai, civarchive, lora_manager_archive) before searching.
- force_search is forwarded as force_refresh to
  search_huggingface_for_file, which folds it into the cache key so
  the cache is not hit, and propagates it to _get_author_index.
- Search result timestamps are no longer inherited from prior
  cached signatures when force_search is active; a fresh timestamp
  is written unconditionally.

Updated metadata/huggingface-author-index.json reflects the latest
cached author index after rebuild.
2026-06-06 17:02:25 +02:00
Dariusz L 57018b4e0f feat: add search result timestamps, enhanced cache clearing, and maintenance UI
Add searched_at timestamps to search results so cached entries are accurately tracked and preserved across merges. Expand the clear-search-cache command to also invalidate popular databases, model list, and the new result timestamp store. Frontend gains new cache-clearing methods and a full resolver cache reset for maintenance. The search panel and missing browser now show source result dates and toggle the search button between 'Search' and 'Search Again' when results already exist.
2026-06-06 16:38:30 +02:00