lora-library-management
lora-library-management
On this page
title: "LoRA Library: Folders, Previews, ComfyUI Manager & Kohya" description: "Organize LoRA models with folder conventions, preview naming, and metadata. Set up ComfyUI Lora Manager and Kohya GUI." slug: "manage-local-lora-library-comfyui-kohya" keywords:
- "ComfyUI LoRA folder organization"
- "extra_model_paths.yaml"
- "LoRA preview image naming"
- "ComfyUI Lora Manager"
- "Kohya GUI install"
updated: "2026-07-27" sources:
- "https://civitai.com/articles/11012"
- "https://civitai.com/articles/11795"
- "https://civitai.com/articles/4855"
- "https://github.com/willmiao/ComfyUI-Lora-Manager/blob/main/README.md"
- "https://github.com/bmaltais/kohya_ss/blob/main/README.md"
- "https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/extra_model_paths.yaml.example"
- "https://comfyanonymous.github.io/ComfyUI_examples/lora/"
- "https://github.com/kohya-ss/sd-scripts/blob/master/README.md"
TL;DR
- Folder structure: Store LoRAs in
models/loras/or add extra paths viaextra_model_paths.yaml(ComfyUI) so both ComfyUI and Kohya GUI see the same files. - Previews: Name preview files
<lora-filename>.png|jpg|mp4>or<lora-filename>.preview.png|jpg|mp4>; ComfyUI LoRA Manager picks them up automatically and skips CivitAI downloads. - Workflow: Install ComfyUI LoRA Manager (custom node), open
http://127.0.0.1:8188/loras, enable auto-fetch, then copy-paste LoRAs with trigger words and strength straight into your graph. Install Kohya GUI (bmaltais/kohya_ss) in a Python 3.10 venv for training new LoRAs.
How to Organize LoRA Files on Disk
ComfyUI expects LoRA files under models/loras/ by default. The official extra_model_paths.yaml.example shows the canonical layout: a base_path pointing at your ComfyUI root, then loras: models/loras/ beneath it. You can add multiple pipe-separated directories under loras to span drives or share a library between ComfyUI and Kohya GUI.
comfyui:
base_path: /path/to/ComfyUI
loras: |
models/loras/
/mnt/shared/loras/
Rename the example file to extra_model_paths.yaml (drop the .example) and restart ComfyUI. The LoRA Manager custom node reads the same configuration, so any folder you add there appears in its browser without symlinks or duplicates.
Subfolder Conventions
Neither ComfyUI nor LoRA Manager enforces a subfolder schema. Common community patterns:
| Pattern | Use Case |
|---|---|
models/loras/characters/ | Character LoRAs |
models/loras/styles/ | Art-style LoRAs |
models/loras/concepts/ | Object/concept LoRAs |
models/loras/[model-base]/ | Separate by base model (SD1.5, SDXL, Flux) |
Pick one scheme and stay consistent; the Manager's search and folder tree handle nesting automatically.
Preview Images and Metadata
Naming Rules for Auto-Detection
ComfyUI LoRA Manager (v0.5.4+) scans for local previews before hitting the CivitAI API. It recognizes two patterns:
<lora-filename>.[png|jpg|jpeg|mp4]<lora-filename>.preview.[png|jpg|jpeg|mp4]
Example: my-character.safetensors pairs with my-character.png or my-character.preview.jpg. Video previews (.mp4) work the same way. If a matching file exists, the Manager uses it and skips the remote fetch, which dramatically speeds up the first load for large libraries.
Source: "Your existing local preview images should have a name like<lora-file-name>.[png|jpg|jpeg|mp4]or<lora-file-name>.preview.[png|jpg|jpeg|mp4]to be automatically detected." — ComfyUI LoRA Manager announcement
Metadata Sidecars
LoRA Manager writes a .metadata.json sidecar next to each model file. The schema includes trigger_words, base_model, rank, training_steps, and CivitAI model_version_id when available. This is not an industry standard — Kohya GUI does not read or write it — but it enables the Manager's one-click copy-paste workflow (trigger words + strength land in the graph automatically).
| Field | Example |
|---|---|
trigger_words | ["ohwx", "woman", "portrait"] |
base_model | SDXL |
rank | 32 |
model_version_id | 123456 |
ComfyUI LoRA Manager: Install and Core Features
Installation
- In ComfyUI Manager (the built-in node installer), search ComfyUI-Lora-Manager and install.
- Or clone manually:
git clone https://github.com/willmiao/ComfyUI-Lora-Manager.gitinsidecustom_nodes/. - Restart ComfyUI.
- Open
http://127.0.0.1:8188/loras— the Manager UI loads in a new tab.
What It Does
| Feature | Notes | Source |
|---|---|---|
| Auto-fetch previews from CivitAI | First sync slow for large libraries; later visits use cache | 11012 |
| Copy filename to clipboard | One-click, ready for LoraLoader node | 11012 |
| Swap preview image/video | Cycle through multiple previews per LoRA | 11012 |
| Folder tree navigation | Mirrors your extra_model_paths.yaml dirs | 11795 |
| Search with pagination | Added in v0.5.7 | 11012 |
| Menu button in ComfyUI header | Opens Manager in new window (v0.5.6+) | 11012 |
| One-click workflow paste | Copies trigger words + preset strength into nodes | 11012 |
Performance Internals (Brief)
The Manager uses multi-layer caching with cache preloading and a file-system watcher for incremental updates. When you add or rename a preview file, the watcher picks it up and refreshes only that entry — no full rescan.
Installing Kohya GUI Alongside ComfyUI
Kohya GUI (bmaltais/kohya_ss) is a browser-based trainer for LoRA, LoHa, LoKr, Dreambooth, fine-tuning, and Textual Inversion. It supports SD 1.5/2.x, SDXL, SD3, Flux.1, Lumina, Anima, and HunyuanImage-2.1. The GUI generates the exact CLI commands the underlying sd-scripts expect, so you can copy-paste them into a terminal if you prefer headless runs.
Windows (Tested Path)
- Install Python 3.10.x (64-bit) from python.org. Python 3.11/3.12 work but are not officially tested.
- Open PowerShell as Administrator and run:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
- Clone and enter the repo:
git clone https://github.com/bmaltais/kohya_ss.git
cd kohya_ss
- Create and activate a virtual environment:
python -m venv venv
.\venv\Scripts\activate
- Install dependencies (the repo bundles a
requirements.txt):
pip install -r requirements.txt
- Launch the GUI:
python gui.py
It opens at http://127.0.0.1:7860 by default.
Source: Kohya sd-scripts README specifies Python 3.10.x for Windows; Kohya GUI README lists supported base models and auto-CLI generation.
Linux / WSL2
Steps are nearly identical. Use your distro's Python 3.10 package, skip the PowerShell execution-policy step, and run source venv/bin/activate instead. The sd-scripts README notes the process is "almost the same as Windows."
Pointing Kohya at Your Shared LoRA Folder
In the Kohya GUI Settings tab, set Output directory to the same path you added under loras: in extra_model_paths.yaml. Newly trained LoRAs appear instantly in ComfyUI LoRA Manager — no restart needed because the file-system watcher detects the new .safetensors and its preview.
Common Errors and Fixes
| Symptom | Cause | Fix | |
|---|---|---|---|
| First Manager load takes minutes | No local previews; Manager downloads from CivitAI for every model | Add <lora-filename>.preview.png files or wait for initial cache to build | |
| CivitAI strength missing in Manager | CivitAI API does not return suggested_strength even when creator set it | Enter strength manually; author plans to request API update | 11795 |
Kohya GUI fails on torch install | CUDA/CPU wheel mismatch | Install PyTorch first via pip install torch --index-url https://download.pytorch.org/whl/cu121 (adjust CUDA version) | |
| New LoRA not showing in Manager | File watcher missed the write (rare) | Refresh browser or restart ComfyUI | |
extra_model_paths.yaml ignored | File still named .example or YAML syntax error | Rename to extra_model_paths.yaml; validate with yamllint |
FAQ
How do I set up additional LoRA directories in ComfyUI? Create extra_model_paths.yaml (copy from extra_model_paths.yaml.example), add your paths under loras: (pipe-separated for multiple), and restart ComfyUI. The LoRA Manager reads the same file.
What's the recommended preview image naming convention for LoRA models? Use <lora-filename>.png (or .jpg, .mp4) or <lora-filename>.preview.png. The Manager auto-detects both and skips CivitAI download.
How can I use extra_model_paths.yaml with ComfyUI LoRA Manager? The Manager watches the same loras: paths defined in extra_model_paths.yaml. No extra config needed — just ensure the file is named correctly and ComfyUI is restarted.
Does ComfyUI cache LoRA preview images? Yes. Multi-layer caching with preloading and incremental file-system updates means subsequent browses are near-instant after the first sync.
What Python version does Kohya GUI require on Windows? Python 3.10.x (64-bit) is the tested version. 3.11/3.12 may work but are not officially validated.
Can I share a LoRA folder between ComfyUI and Kohya GUI? Yes. Point Kohya's output directory to one of the paths listed under loras: in extra_model_paths.yaml. New models appear in Manager automatically.
Why is the CivitAI suggested strength missing for my LoRA? The CivitAI API does not expose suggested_strength in its response. The Manager author has noted this and may contact the CivitAI team.
How do I update ComfyUI LoRA Manager? Use ComfyUI Manager's "Update all" button, or git pull inside custom_nodes/ComfyUI-Lora-Manager and restart ComfyUI.
Related Guides
- Optimize ComfyUI VRAM usage
- Train your first LoRA with Kohya GUI
- CivitAI API integration for model metadata
- ComfyUI custom node development basics
Sources
| URL | Contribution |
|---|---|
| https://civitai.com/articles/11012 | ComfyUI LoRA Manager features, preview naming, version history, cache mechanics |
| https://civitai.com/articles/11795 | One-click integration, missing CivitAI API strength field, folder organization |
| https://civitai.com/articles/4855 | Kohya GUI Windows install context, Python knowledge prerequisite |
| https://github.com/willmiao/ComfyUI-Lora-Manager/blob/main/README.md | Training types supported (LoHA, LoKr), GitHub repo reference |
| https://github.com/bmaltais/kohya_ss/blob/main/README.md | Kohya GUI supported models, auto-CLI generation, version 0.11.1 changelog |
| https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/extra_model_paths.yaml.example | Canonical extra_model_paths.yaml schema with loras paths |
| https://comfyanonymous.github.io/ComfyUI_examples/lora/ | ComfyUI LoRA usage docs: models/loras directory, LoraLoader node |
| https://github.com/kohya-ss/sd-scripts/blob/master/README.md | sd-scripts Windows install steps, Python 3.10.x requirement, Linux/WSL2 parity |