Extensions/ComfyUI Civitai Advanced Loader
ComfyUI Extension

ComfyUI Civitai Advanced Loader

LoRA and Checkpoint loader nodes with integrated Civitai metadata, preview images, trigger word management, and a full-featured model manager UI. Features auto-fetch from Civitai API, multi-threaded downloads, retry logic, and structured metadata storage.

By rattskr·Created 6 days ago·Updated 5 days ago· 0
rattskr/ComfyUI_CivitaiAdvanceLoader
Nodes2
On cloudLocal install
Categoryloaders
Stars0
Updated5 days ago
Readme

ComfyUI Civitai Advanced Loader

A ComfyUI extension for loading LoRAs and Checkpoints with integrated Civitai metadata, preview images, trigger word management, and a full-featured model manager UI.

Features

Nodes

  • Civitai Lora Loader — Loads LoRA files with auto-resolved trigger words from Civitai metadata
  • Civitai Checkpoint Loader — Loads checkpoints with auto-resolved trigger words from Civitai metadata

Both nodes output the resolved trigger word as a STRING output for use in prompt workflows.

Civitai Manager UI

A full-screen 3-panel manager accessible from each node's "Open Manager" button.

  • Base Model Sidebar — Filter models by base model (SD 1.5, SDXL, etc.) with per-model counts
  • Model List — Search across filename, baseModel, author, and category tags
  • Category Tag System — Filter by Concept, Style, Character, or Clothing tags
  • Image/Video Gallery — Horizontal scrollable gallery with drag-resize, lightbox viewer, and keyboard navigation
  • Inline Rename — Double-click any model to rename (updates file, metadata, and index)
  • Trigger Word Editor — Add, remove, copy, and edit trigger word sets per model
  • Category Tag Editor — Assign Concept, Style, Character, and Clothing tags with structured fields
  • KSampler Preset Editor (checkpoints) — Define named presets with Steps, CFG, sampler, and scheduler; auto-applies to downstream KSampler nodes
  • Import Workflow — Import workflow from preview image metadata (PNG/WEBP)

Metadata & Fetching

  • Auto-fetch from Civitai — Resolves model hash, queries Civitai API, downloads metadata, previews, and description images
  • Bulk Fetch — Fetch metadata for all models missing data (new models only)
  • Bulk Refetch ALL — Re-download metadata for every model
  • Multi-threaded Downloads — 8 parallel workers for preview and description image downloads
  • Retry Failed Media — Retries failed downloads up to 10 times with 2s delay between attempts
  • Rate Limit Handling — Auto-pauses when Civitai API rate limit is nearly exhausted
  • Fetch Status Tracking — Persists error state in metadata JSON with per-file error details
  • Error Indicators — Red dot on models with failed fetches in the model list
  • Retry Button — One-click retry for failed media from the error banner

Data Management

  • Structured Metadata Storage — JSON metadata, preview images, and description images stored per-model
  • User Overrides — Edit trigger words, categories, and KSampler presets without overwriting Civitai data
  • Hash Resolution — Priority: index cache → .civitai.info sidecar → compute SHA-256
  • Metadata Auto-Rename — Metadata folders track model renames automatically
  • Reset / Delete — Clear user overrides or delete all metadata for a model

Settings

  • API Key Management — Save your Civitai API key locally (gitignored, never exposed via API)
  • Rename Scroll Persistence — Option to maintain scroll position after renaming models

Installation

cd ComfyUI/custom_nodes/
git clone https://github.com/rattskr/ComfyUI_CivitaiAdvanceLoader.git

Restart ComfyUI after installation. No external dependencies required.

Usage

  1. Add Civitai Lora Loader or Civitai Checkpoint Loader to your workflow
  2. Select a model from the dropdown — preview image and trigger words load automatically
  3. Click "Open Manager" to browse, search, edit metadata, and manage your model library
  4. (Optional) Enter your Civitai API key in the Manager settings for authenticated access

Metadata Structure

<model_dir>/
  Metadata/
    index.json
    <model_id>-<sanitized_name>/
      <model_id>-<sanitized_name>.json        # Full metadata + user overrides
      <model_id>-<sanitized_name>.preview.png  # Preview images (up to 30)
      <model_id>-<sanitized_name>.desc_0.png   # Description images

License

GPL-3.0