Dariusz L e8939d4bf1 Add URN (ComfyUI-AIR) resolution via CivitAI
Detect ComfyUI-AIR URNs in workflows, resolve them to expected filenames via the CivitAI API, and prefer those filenames for matching.

Key changes:
- core/workflow_analyzer.py: added URN_REGEX, URN_TYPE_MAP, is_model_filename() now recognizes URNs, and get_node_model_info() emits structured URN info (is_urn, urn fields, category, exists=False).
- core/sources/civitai.py: added resolve_urn(model_id, version_id) with caching, API fetch of model/version and primary file, and result shaping (model_name, version_name, expected_filename, files).
- core/linker.py: import resolve_urn and call it for missing URNs, attach civitai_info/expected_filename, and prefer expected_filename as matching target; cleaned up deduplication logic.
- web/linker.js: UI shows URN original plus resolved CivitAI model/version labels where available.
- TODO.md: added plan/notes for URN detection and next steps.

This improves detection and fuzzy matching for models referenced by URNs so missing model resolution is more accurate. Further matcher and updater enhancements remain TODOs.
2026-04-17 18:55:55 +02:00
2025-11-04 03:08:32 +01:00
2025-11-04 21:19:19 +01:00

ComfyUI Model Linker Extension

A ComfyUI extension that helps users relink missing models in workflows using fuzzy matching.

https://github.com/user-attachments/assets/fedf3645-aa66-49f7-b01d-8c3b5127faf4

Model Linker Interface

Features

  • Scans all nodes in workflows to find missing models
  • Uses fuzzy matching to suggest similar model files
  • Updates workflow JSON in UI/memory (user saves themselves)
  • Supports all node types
  • Optional auto-resolve for 100% confidence matches

Installation

  1. Clone or download this repository
  2. Place it in your ComfyUI custom_nodes/ directory
  3. Restart ComfyUI

Usage

  1. Open a workflow with missing models
  2. Click the "🔗 — Model Linker" button in ComfyUI's top menu bar
  3. Review missing models and their suggested matches
  4. Click "Resolve" for individual models or "Auto-Resolve 100% Matches" for perfect matches
  5. Save your workflow when ready

Features

  • Subgraph Support: Automatically detects and handles missing models inside subgraphs
  • Smart Matching: Shows 100% confidence matches when available, otherwise shows best matches (≥70% confidence)
  • Fuzzy Matching: Uses intelligent similarity scoring to find model files even with different naming
  • Auto-Resolve: One-click resolution for all perfect matches
S
Description
No description provided
Readme MIT
11 MiB
Languages
JavaScript 47.5%
Python 45.7%
CSS 6.8%