# ComfyUI LoRA Manager

> **Revolutionize your workflow with the ultimate LoRA companion for ComfyUI!**

[![Discord](https://img.shields.io/discord/1346296675538571315?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/vcqNrWVFvM)
[![Release](https://img.shields.io/github/v/release/willmiao/ComfyUI-Lora-Manager?include_prereleases&color=blue&logo=github)](https://github.com/willmiao/ComfyUI-Lora-Manager/releases)
[![Release Date](https://img.shields.io/github/release-date/willmiao/ComfyUI-Lora-Manager?color=green&logo=github)](https://github.com/willmiao/ComfyUI-Lora-Manager/releases)

A comprehensive toolset that streamlines organizing, downloading, and applying LoRA models in ComfyUI. With powerful features like recipe management, checkpoint organization, and one-click workflow integration, working with models becomes faster, smoother, and significantly easier. Access the interface at: `http://localhost:8188/loras`

![Interface Preview](https://github.com/willmiao/ComfyUI-Lora-Manager/blob/main/static/images/screenshot.png)

## 📺 Tutorial: One-Click LoRA Integration
Watch this quick tutorial to learn how to use the new one-click LoRA integration feature:

[![One-Click LoRA Integration Tutorial](https://github.com/willmiao/ComfyUI-Lora-Manager/blob/main/static/images/video-thumbnails/getting-started.jpg)](https://youtu.be/hvKw31YpE-U)

## 🌐 Browser Extension
Enhance your Civitai browsing experience with our companion browser extension! See which models you already have, download new ones with a single click, and manage your downloads efficiently.

![LM Civitai Extension Preview](https://github.com/willmiao/ComfyUI-Lora-Manager/blob/main/wiki-images/civitai-models-page.png)

<div>
  <a href="https://chromewebstore.google.com/detail/lm-civitai-extension/capigligggeijgmocnaflanlbghnamgm?utm_source=item-share-cb" style="display: inline-block; background-color: #4285F4; color: white; padding: 8px 16px; text-decoration: none; border-radius: 4px; font-weight: bold; margin: 10px 0;">
    <img src="https://www.google.com/chrome/static/images/chrome-logo.svg" width="20" style="vertical-align: middle; margin-right: 8px;"> Get Extension from Chrome Web Store
  </a>
</div>

<div id="firefox-install" class="install-ok"><a href="https://github.com/willmiao/lm-civitai-extension-firefox/releases/latest/download/extension.xpi">📦 Install Firefox Extension (reviewed and verified by Mozilla)</a></div>

📚 [Learn More: Complete Tutorial](https://github.com/willmiao/ComfyUI-Lora-Manager/wiki/LoRA-Manager-Civitai-Extension-(Chrome-Extension))

---

## 🤝 Supporter Recognition

I'm incredibly grateful to everyone who has supported the development of this project. Seeing so many people value my work is the best motivation I could ask for. Your trust and support have played a vital role in shaping this tool into what it is today, and I want to personally recognize those who have helped make it possible.

<!-- SUPPORTERS-START -->

### 🌟 Special Thanks

**dispenser**, **EbonEagle**, **DanielMagPizza**, **Scott R**

### 💖 Supporters (666)

<details>
<summary>Click to view all awesome supporters</summary>
<br>

Insomnia Art Designs, megakirbs, Brennok, 2018cfh, W+K+White, wackop, Takkan, Carl G., $MetaSamsara, itismyelement, onesecondinosaur, stone9k, Rosenthal, Francisco Tatis, Andrew Wilson, Greybush, Gooohokrbe, Ricky Carter, JongWon Han, OldBones, VantAI, runte3221, FreelancerZ, Edgar Tejeda, Liam MacDougal, Fraser Cross, Polymorphic Indeterminate, Birdy, Marc Whiffen, Jorge Hussni, Kiba, Skalabananen, Reno Lam, sig, Christian Byrne, DM, Sen314, Estragon, J\B/ 8r0wns0n, Snaggwort, Arlecchino Shion, Charles Blakemore, Rob Williams, ClockDaemon, KD, Omnidex, Tyler Trebuchon, Release Cabrakan, Tobi_Swagg, SG, carozzz, James Dooley, zenbound, Buzzard, jmack, Mark Corneglio, SarcasticHashtag, Cosmosis, iamresist, RedrockVP, Wolffen, FloPro4Sho, James Todd, Steven Pfeiffer, Tim, Lisster, Michael Wong, Illrigger, Tom Corrigan, JackieWang, fnkylove, Julian V, Steven Owens, Yushio, Vik71it, Echo, Lilleman, Robert Stacey, PM, Todd Keck, Mozzel, Gingko Biloba, Sterilized, BadassArabianMofo, Pascal Dahle, quarz, Greg, Penfore, JSST, esthe, lmsupporter, IamAyam, wfpearl, Baekdoosixt, Jonathan Ross, Jack B Nimble, Nazono_hito, Melville Parrish, daniel dove, Lustre, JW Sin, contrite831, Alex, bh, confiscated Zyra, Marlon Daniels, Starkselle, Aaron Bleuer, LacesOut!, greebles, Adam Shaw, Tee Gee, Anthony Rizzo, tarek helmi, M Postkasse, ASLPro3D, Jacob Hoehler, FinalyFree, Weasyl, Timmy, Johnny, Cory Paza, Tak, Gonzalo Andre Allendes Lopez, Zach Gonser, Big Red, whudunit, Luc Job, dl0901dm, Philip Hempel, corde, Nick Walker, lh qwe, Bishoujoker, conner, aai, Briton Heilbrun, Tori, wildnut, Princess Bright Eyes, AbstractAss, Felipe dos Santos, ViperC, jean jahren, Aleksander Wujczyk, AM Kuro, Markus, S Sang, Karl P., Akira_HentAI, MagnaInsomnia, Gordon Cole, yuxz69, Douglas Gaspar, AlexDuKaNa, George, andrew.tappan, dw, N/A, The Spawn, Phil, graysock, Greenmoustache, zounic, fancypants, Digital, JaxMax, takyamtom, 奚明 刘, Jwk0205, Bro Xie, 준희 김, batblue, carey6409, Olive, 太郎 ゲーム, Some Guy Named Barry, Max Marklund, Tomohiro Baba, David Ortega, AELOX, Nicfit23, Noora, wamekukyouzin, drum matthieu, Dogmaster, Matt Wenzel, Mattssn, Lex Song, John Saveas, Christopher Michel, Serge Bekenkamp, Jimmy Ledbetter, LeoZero, Antonio Pontes, ApathyJones, nahinahi9, Dustin Chen, dan, Yaboi, Mouthlessman, Steam Steam, Damon Cunliffe, CryptoTraderJK, Davaitamin, otaku fra, Ran C, tedcor, Fotek Design, Adam Taylor, Weird_With_A_Beard, MadSpin, Pozadine1, Qarob, AIGooner, inbijiburu, Luc, ProtonPrince, DiffDuck, elu3199, Nick “Loadstone” D, Hasturkun, Jon Sandman, Ubivis, CloudValley, thesoftwaredruid, wundershark, mr_dinosaur, linnfrey, Gamalonia, Vir, Pkrsky, Joboshy, Bohemian Corporal, Dan, Josef Lanzl, Seth Christensen, Griffin Dahlberg, Draven T, yer fey, Error_Rule34_Not_found, Gerald Welly, Roslynd, Geolog, jinxedx, Neco28, Aquatic Coffee, Dankin, ethanfel, Cristian Vazquez, Frank Nitty, Magic Noob, Focuschannel, DougPeterson, Jeff, Bruce, Kevin John Duck, Anthony Faxlandez, Kevin Christopher, Ouro Boros, Blackfish95, dd, Paul Kroll, MiraiKuriyamaSy, semicolon drainpipe, Thesharingbrother, Bas Imagineer, Pat Hen, John Statham, ResidentDeviant, Nihongasuki, JC, Prompt Pirate, uwutismxd, decoy, Tyrswood, Ray Wing, Ranzitho, Gus, 地獄の禄, MJG, David LaVallee, ae, Tr4shP4nda, WRL_SPR, capn, Joseph, Mirko Katzula, dan, Piccio08, kumakichi, cppbel, starbugx, Moon Knight, 몽타주, Kland, zenobeus, Jackthemind, ryoma, Stryker, raf8osz, ElitaSSJ4, blikkies, Chris, Brian M, Nerezza, sanborondon, Taylor Funk, aezin, Thought2Form, jcay015, Kevin Picco, Erik Lopez, Shock Shockor, Mateo Curić, Goldwaters, Zude, Eris3D, m, Pierce McBride, Joshua Gray, Kyler, Mikko Hemilä, aRtFuL_DodGeR, Jamie Ogletree, a _, James Coleman, CrimsonDX, Martial, battu, Emil Andersson, Chad Idk, DarkSunset, Billy Gladky, Yuji Kaneko, Probis, Dušan Ryban, ItsGeneralButtNaked, Jordan Shaw, Rops Alot, Sam, sjon kreutz, Nimess, SRDB, Ace Ventura, g unit, Youguang, Metryman55, andrewzpong, FrxzenSnxw, BossGame, lrdchs, momokai, Hailshem, kudari, Naomi Hale Danchi, dc7431, ken, Inversity, AIVORY3D, epicgamer0020690, Joshua Porrata, keemun, SuBu, RedPIXel, Kevinj, Wind, Nexus, Ramneek“Guy”Ashok, squid_actually, Nat_20, Edward Weeks, kyoumei, RadStorm04, JohnDoe42054, BillyHill, emyth, chriphost, KitKatM, socrasteeze, ResidentDeviant, gzmzmvp, Welkor, John Martin, Richard, Andrew, Robert Wegemund, Littlehuggy, moranqianlong, Gregory Kozhemiak, mrjuan, Brian Buie, Sadlip, Haru Yotu, Eric Whitney, Joey Callahan, Ivan Tadic, Mike Simone, Morgandel, Kyron Mahan, Matura Arbeit, Noah, Jacob McDaniel, X, Sloan Steddy, TBitz33, Anonym dkjglfleeoeldldldlkf, Temikus, Artokun, Michael Taylor, SendingRavens, Derek Baker, Michael Anthony Scott, Atilla Berke Pekduyar, Michael Docherty, Nathan, Decx _, Paul Hartsuyker, elitassj, Jacob Winter, Distortik, David, Meilo, Pen Bouryoung, 四糸凜音, shinonomeiro, Snille, MaartenAlbers, khanh duy, xybrightsummer, jreedatchison, PhilW, Tree Tagger, Janik, Crocket, Cruel, MRBlack, Mitchell Robson, Kiyoe, humptynutz, michael.isaza, Kalnei, Whitepinetrader, OrganicArtifact, Scott, MudkipMedkitz, deanbrian, POPPIN, Alex Wortman, Cody, Raku, smart.edge5178, emadsultan, InformedViewz, CHKeeho80, Bubbafett, leaf, Menard, Skyfire83, Adam Rinehart, D, Pitpe11, TheD1rtyD03, moonpetal, SomeDude, g9p0o, nanana, TheHolySheep, Monte Won, SpringBootisTrash, carsten, ikok, Buecyb99, 4IXplr0r3r, dfklsjfkljslfjd, hayden, ahoystan, Leland Saunders, Wolfe7D1, Ink Temptation, Bob Barker, edk, Kalli Core, Aeternyx, elleshar666, YOU SINWOO, ja s, Doug Mason, Kauffy, Jeremy Townsend, EpicElric, Sean voets, Owen Gwosdz, John J Linehan, Elliot E, Thomas Wanner, Theerat Jiramate, Edward Kennedy, Justin Blaylock, Devil Lude, Nick Kage, kevin stoddard, Jack Dole, Vane Holzer, psytrax, Ezokewn, hexxish, CptNeo, notedfakes, Maso, Eric Ketchum, NICHOLAS BAXLEY, Michael Scott, Kevin Wallace, Matheus Couto, Saya, ChicRic, mercur, J C, Ed Wang, Ryan Presley Ng, Wes Sims, Donor4115, Yves Poezevara, Teriak47, Just me, Raf Stahelin, Вячеслав Маринин, Lyavph, Filippo Ferrari, Cola Matthew, OniNoKen, Iain Wisely, Zertens, NOHOW, Apo, nekotxt, choowkee, Clusters, ibrahim, Highlandrise, philcoraz, mztn, ImagineerNL, MrAcrtosSursus, al300680, pixl, Robin, chahknoir, Marcus thronico, nd, keno94d, James Melzer, Bartleby, Renvertere, Rahuy, Hermann003, D, Foolish, RevyHiep, Captain_Swag, obkircher, gwyar, D, edgecase, Neoxena, mrmhalo, dg, Maarten Harms, Israel, Muratoraccio, SelfishMedic, Ginnie, adderleighn, EnragedAntelope, Alan+Cano, FeralOpticsAI, Pavlaki, generic404, Mateusz+Kosela, Doug+Rintoul, Noor, Yorunai, Bula, quantenmecha, abattoirblues, Jason+Nash, BillyBoy84, DarkRoast, zounik, letzte, Nasty+Hobbit, SgtFluffles, lrdchs2, Duk3+Rand0m, KUJYAKU, NathenChoi, Thomas+Reck, Larses, cocona, Coeur+de+cochon, David Schenck, han b, Nico, Banana Joe, _ G3n, Donovan Jenkins, JBsuede, Michael Eid, beersandbacon, Maximilian Pyko, Invis, Justin Houston, Time Valentine, james, OrochiNights, Michael Zhu, ACTUALLY_the_Real_Willem_Dafoe, gonzalo, Seraphy, Михал Михалыч, 雨の心 落, Matt, AllTimeNoobie, jumpd, John C, Rim, Dismem, Frogmilk, SPJ, Xan Dionysus, Nathan lee, Mewtora, Middo, Forbidden Atelier, Bryan Rutkowski, Adictedtohumping, Towelie, Cyrus Fett, Jean-françois SEMA, Kurt, max blo, Xenon Xue, JackJohnnyJim, Edward Ten Eyck, Chase Kwon, Inyoshu, Goober719, Chad Barnes, James Ming, vanditking, kripitonga, Rizzi, nimin, OMAR LUCIANO, hannibal, Jo+Example, BrentBertram, eumelzocker, dxjaymz, L C, Dude

</details>

<!-- SUPPORTERS-END -->

## Release Notes

### v1.0.5

* **Excluded Models Management View** - Added a new global-menu view for excluded models, with actions to restore them or delete them permanently.
* **Fix for `401 Unauthorized` Downloads** - Fixed an issue where some `civitai.red` downloads could lose authentication during redirect and fail with `401 Unauthorized`.

### v1.0.4

* **Civitai Domain Split Support** - Added support for `civitai.com` and `civitai.red` model URLs and recipe/image URLs across import, analysis, and download flows.
* **Civitai API Host Migration** - Updated core Civitai API requests to use `civitai.red` for compatibility with Civitai's current API host.
* **Configurable Civitai View Host** - Added a setting to choose which Civitai site opens by default for model, search, and view links.
* **401 Unauthorized Reminder** - Some users have reported `401 Unauthorized` errors. If you run into this, try generating a new API key on `civitai.red` and updating it in LoRA Manager settings.

### v1.0.3

* **Custom Recipe Storage Path** - Added support for configuring a custom storage path for recipes, with migration support to move existing recipe data when changing locations.
* **Wildcard Support for LM Text/Prompt Nodes** - The LM `Text` node and `Prompt` node now support the new `/wildcard` command, with runtime wildcard expansion and support for dynamic prompt syntax for more flexible prompt construction.
* **System Diagnostics ("Doctor")** - Added a new diagnostics feature to help surface environment and setup issues more clearly.
* **User-State Backup Support** - Added backup support for user state, with accompanying UI and clearer backup scope messaging in Settings.
* **Downloaded Status Visibility** - Added clearer downloaded-status UX so previously downloaded model versions are easier to recognize.
* **Autocomplete Performance Improvements** - Fixed autocomplete performance issues to reduce tag-search overhead and improve responsiveness.

### v1.0.2

* **Model Download History Tracking** - LoRA Manager now keeps a history of downloaded model versions, allowing it to recognize whether a version has been downloaded before, even if it is no longer currently present in your library.
* **Skip Previously Downloaded Model Versions** - Added a new setting, `Skip previously downloaded model versions`, to help avoid downloading model versions you have already downloaded in the past.
* **LoRA Stack Combiner Trigger Words Fix** - Fixed an issue where trigger word updates from `LORA_STACK` inputs were not propagated correctly through the LoRA Stack Combiner node.
* **CivitAI Example Image Compatibility** - Improved support for CivitAI CDN subdomains so example images load more reliably.

### v1.0.1

* **Batch Recipe Import** - Import recipes from multiple URLs or directories simultaneously with optimized concurrency.
* **Bulk Download Missing LoRAs** - New bulk action for recipes: select multiple recipes and download all missing LoRAs for the selected recipes in one operation.
* **Import-Only Recipe Option** - Save recipe metadata without downloading missing LoRAs, allowing you to save interesting recipes for later and download dependencies when needed.
* **Editable Recipe Prompts** - Edit recipe prompts directly in the recipe detail modal.
* **Checkpoint Loader LM Node** - Behaves like ComfyUI's built-in Load Checkpoint node, with the added ability to load checkpoints from Extra Folder Paths.
* **UNET Loader LM Node** - Behaves like ComfyUI's built-in Load Diffusion Model node, with support for loading from Extra Folder Paths and GGUF format (requires ComfyUI-GGUF custom node).
* **LoRA Stack Combiner Node** - Merge two LoRA stacks into one. For example: use separate Randomizers for character and style LoRAs, then combine before applying.
* **LoRA Pool Regex Filtering** - Filter which LoRAs enter the pool using custom regex patterns for include/exclude rules.
* **Dynamic Base Model Types** - Base model types are now fetched dynamically from Civitai API, keeping them synchronized with the latest available models.
* **Prompt Autocomplete Enhancements** - Tab key acceptance, configurable behavior, and improved multi-word tag matching.
* **Download Base Model Exclusions** - Exclude specific base models from download operations when you only want certain model types.
* **Mature Blur Threshold Setting** - Configure blur levels (`PG13` / `R` / `X` / `XXX`, default `R+`) for mature content previews.
* **Experimental: Nunchaku Qwen LoRA Support** - Experimental support for loading and applying LoRAs to Nunchaku quantized Qwen-Image models.
* **Bug Fixes & UX Improvements** - Various fixes for a smoother workflow.

### v1.0.0
* **Extra Folder Paths Support** - Added support for additional model root paths exclusive to LoRA Manager. This allows loading LoRAs from extra locations outside ComfyUI's standard folders, helping avoid performance issues when working with large model libraries.
* **Settings UI Overhaul** - Redesigned the Settings interface with a more organized layout, making it easier to find and configure application settings.
* **Lazy Hash Computation** - Implemented lazy hash calculation for large model files (checkpoints and diffusion models). Hashes are now computed only when strictly necessary, minimizing redundant disk I/O and significantly accelerating application initialization.
* **Milestone & Supporter Recognition** - Updated the Supporter window to show appreciation for all project supporters as this v1.0.0 milestone is reached. Great thanks to the community for the ongoing support!
* **Bug Fixes & UX Enhancements** - Various bug fixes and user experience improvements for a smoother workflow.

### v0.9.16
* **Duplicate Detection Enhancement** - The model duplicates mode now respects filter configurations, making it easier to find duplicate groups within specific filtered results.
* **Tag Logic Toggle** - Added OR/AND toggle for include tags filtering in the filters panel, providing more flexible tag-based model searches.
* **Metadata Refresh Skip Paths** - New setting to exclude specific paths from metadata refresh operations. Models under these paths will be skipped when fetching metadata from remote sources.
* **Dynamic Trigger Words in Prompt Node** - Prompt node now supports dynamic numbers of trigger word inputs for greater flexibility.
* **Early Access Updates** - Model updates now display Early Access information, with a new setting to ignore Early Access updates if desired.
* **LM Civitai Extension Integration** - Added integration with the LM Civitai Extension. Clicking the download button in model updates now sends downloads to the extension's download queue for seamless one-click downloads.

### v0.9.15
* **Filter Presets** - Save filter combinations as presets for quick switching and reapplication.
* **Bug Fixes** - Fixed various bugs for improved stability.

### v0.9.14
* **LoRA Cycler Node** - Introduced a new LoRA Cycler node that enables iteration through specified LoRAs with support for repeat count and pause iteration functionality. Refer to the new "Lora Cycler" template workflow for concrete example.
* **Enhanced Prompt Node with Tag Autocomplete** - Enhanced the Prompt node with comprehensive tag autocomplete based on merged Danbooru + e621 tags. Supports tag search and autocomplete functionality. Implemented a command system with shortcuts like `/character` or `/artist` for category-specific tag searching. Added `/ac` or `/noac` commands to quickly enable or disable autocomplete. Refer to the "Lora Manager Basic" template workflow in ComfyUI -> Templates -> ComfyUI-Lora-Manager for detailed tips.
* **Bug Fixes & Stability** - Addressed multiple bugs and improved overall stability.

### v0.9.12
* **LoRA Randomizer System** - Introduced a comprehensive LoRA randomization system featuring LoRA Pool and LoRA Randomizer nodes for flexible and dynamic generation workflows.
* **LoRA Randomizer Template** - Refer to the new "LoRA Randomizer" template workflow for detailed examples of flexible randomization modes, lock & reuse options, and other features.
* **Recipe Folders** - Introduced a folder system for the Recipes page, allowing users to freely organize recipes just like they do with models.
* **Recipe Bulk Operations** - Added bulk mode support for batch moving, deleting, and setting base models for selected recipes with intuitive controls like click-and-drag selection, drag-to-folder, and Ctrl+A (Select All).
* **Prompt Search & Sorting** - Search recipes by prompt content and sort by Recipe Name, Imported Date, or LoRA Count for better browsing.
* **Recipe Favorites** - Mark specific recipes as favorites for quick access.
* **Video Recipe Support** - Enabled support for video recipes (import via LM extension or URL; video file import not supported).
* **Performance Improvements** - Fixed performance issues for dramatically improved startup and loading speed. After first scan, subsequent loads are instant regardless of collection size.
* **ComfyUI Nodes 2.0 Support** - Basic support for ComfyUI Nodes 2.0.

### v0.9.10
* **Smarter Update Matching** - Users can now choose to check and group updates by matching base model only or with no base-model constraint; version lists also support toggling between same-base versions or all versions.
* **Flexible Tag Filtering** - The filter panel now supports tag exclusion: click a tag to include, click again to exclude, and click a third time to clear, enabling stronger and more flexible tag filters.
* **License Visibility & Controls** - Model detail headers and ComfyUI preview popups now show Civitai license icons. The filter panel gains license include/exclude options, and a new global context menu action, "Refresh license metadata," fetches missing license data.
* **Recipe Improvements** - Recipes now allow importing with zero LoRAs, and recipe detail pages show the related checkpoint for easier reference.
* **Better ZIP Downloads** - When downloading models packaged in ZIPs, model files are extracted into the target model folder; ZIPs containing multiple model files (e.g., WanVideo high/low LoRA pairs) are added as separate models.
* **Template Workflow Update** - Refreshed the "Illustrious Pony Example" template workflow with usage guidance for each LoRA Manager node.
* **Bug Fixes & Stability** - General fixes and stability improvements.

### v0.9.9
* **Check for Updates Feature** - Users can now check for updates for all models or selected models in bulk mode. Models with available updates will display an "update available" badge on their model card, and users can filter to show only models with updates.
* **Model Versions Management** - Added a new Versions tab in the model modal that centralizes all versions of a model, providing download, delete, and ignore update functions.
* **Send Checkpoint to ComfyUI** - Users can now click the send button on a checkpoint card to send the checkpoint directly to the current workflow's checkpoint or diffusion model loader node in ComfyUI.
* **Customizable Model Card Display** - Added a new setting that allows users to choose whether to display the model name or filename on model cards.
* **New Path Template Placeholders** - Added new path template placeholders: `{model_name}` and `{version_name}` for more flexible organization.
* **ComfyUI Auto Path Correction Setting** - Added a new setting within ComfyUI to enable or disable the auto path correction feature.

### v0.9.8
* **Full CivArchive API Support** - Added complete support for the CivArchive API as a fallback metadata source beyond Civitai API. Models deleted from Civitai can now still retrieve metadata through the CivArchive API.
* **Download Models from CivArchive** - Added support for downloading models directly from CivArchive, similar to downloading from Civitai. Simply click the Download button and paste the model URL to download the corresponding model.
* **Custom Priority Tags** - Introduced Custom Priority Tags feature, allowing users to define custom priority tags. These tags will appear as suggestions when editing tags or during auto organization/download using default paths, providing more precise and controlled folder organization. [Guide](https://github.com/willmiao/ComfyUI-Lora-Manager/wiki/Priority-Tags-Configuration-Guide)
* **Drag and Drop Tag Reordering** - Added drag and drop functionality to reorder tags in the tags edit mode for improved usability.
* **Download Control in Example Images Panel** - Added stop control in the Download Example Images Panel for better download management.
* **Prompt (LoraManager) Node with Autocomplete** - Added new Prompt (LoraManager) node with autocomplete feature for adding embeddings.
* **Lora Manager Nodes in Subgraphs** - Lora Manager nodes now support being placed within subgraphs for more flexible workflow organization.

### v0.9.6
* **Metadata Archive Database Support** - Added the ability to download and utilize a metadata archive database, enabling access to metadata for models that have been deleted from CivitAI.
* **App-Level Proxy Settings** - Introduced support for configuring a global proxy within the application, making it easier to use the manager behind network restrictions.
* **Bug Fixes** - Various bug fixes for improved stability and reliability.

### v0.9.2
* **Bulk Auto-Organization Action** - Added a new bulk auto-organization feature. You can now select multiple models and automatically organize them according to your current path template settings for streamlined management.
* **Bug Fixes** - Addressed several bugs to improve stability and reliability.

### v0.9.1
* **Enhanced Bulk Operations** - Improved bulk operations with Marquee Selection and a bulk operation context menu, providing a more intuitive, desktop-application-like user experience.
* **New Bulk Actions** - Added bulk operations for adding tags and setting base models to multiple models simultaneously.

### v0.9.0
* **UI Overhaul for Enhanced Navigation** - Replaced the top flat folder tags with a new folder sidebar and breadcrumb navigation system for a more intuitive folder browsing and selection experience.
* **Dual-Mode Folder Sidebar** - The new folder sidebar offers two display modes: 'List Mode,' which mirrors the classic folder view, and 'Tree Mode,' which presents a hierarchical folder structure for effortless navigation through nested directories.
* **Internationalization Support** - Introduced multi-language support, now available in English, Simplified Chinese, Traditional Chinese, Spanish, Japanese, Korean, French, Russian, and German. Feedback from native speakers is welcome to improve the translations.
* **Automatic Filename Conflict Resolution** - Implemented automatic file renaming (`original name + short hash`) to prevent conflicts when downloading or moving models.
* **Performance Optimizations & Bug Fixes** - Various performance improvements and bug fixes for a more stable and responsive experience.

[View Update History](./update_logs.md)

---

## **⚠ Important Note**: To use the CivitAI download feature, you'll need to:

1. Get your CivitAI API key from your profile settings
2. Add it to the LoRA Manager settings page
3. Save the settings

---

## Key Features

- 🚀 **High Performance**
  - Fast model loading and browsing
  - Smooth scrolling through large collections
  
- 🌐 **Rich Model Integration**
  - Direct download from CivitAI
  - Preview images and videos
  - Model descriptions and version selection
  - Trigger words at a glance
  - One-click workflow integration with preset values
  
- 🔄 **Checkpoint Management**
  - Scan and organize checkpoint models
  - Filter and search your collection
  - View and edit metadata
  - Clean up and manage disk space
  
- 🧩 **LoRA Recipes**
  - Save and share favorite LoRA combinations
  - Preserve generation parameters for future reference
  - Quick application to workflows
  - Import/export functionality for community sharing
  
- 💻 **User Friendly**
  - One-click access from ComfyUI menu
  - Context menu for quick actions
  - Custom notes and usage tips
  - Multi-folder support
  - Configurable mature blur threshold (`PG13` / `R` / `X` / `XXX`, default `R+`)
    - Example: setting threshold to `PG13` blurs `PG13`, `R`, `X`, and `XXX` previews when blur is enabled
  - Visual progress indicators during initialization

---

## Installation

### Option 1: **ComfyUI Manager** (Recommended for ComfyUI users)

1. Open **ComfyUI**.
2. Go to **Manager > Custom Node Manager**.
3. Search for `lora-manager`.
4. Click **Install**.

### Option 2: **Portable Standalone Edition** (No ComfyUI required)

1. Download the [Portable Package](https://github.com/willmiao/ComfyUI-Lora-Manager/releases/download/v1.0.0/lora_manager_portable.7z)
2. Copy the provided `settings.json.example` file to create a new file named `settings.json` in `comfyui-lora-manager` folder.
3. Edit the new `settings.json` to include your correct model folder paths and CivitAI API key
   - Set `"use_portable_settings": true` if you want the configuration to remain inside the repository folder instead of your user settings directory.
4. Run run.bat
    - To change the startup port, edit `run.bat` and modify the parameter (e.g. `--port 9001`)

### Option 3: **Manual Installation**

```bash
git clone https://github.com/willmiao/ComfyUI-Lora-Manager.git
cd ComfyUI-Lora-Manager
pip install -r requirements.txt
```

## Usage

1. There are two ways to access the LoRA manager:
   - Click the "Launch LoRA Manager" button in the ComfyUI menu
   - Visit http://localhost:8188/loras directly
2. From the interface, you can:
   - Browse and organize your LoRA models
   - Download models directly from CivitAI
   - Automatically fetch or manually set preview images
   - View and copy trigger words associated with each LoRA
   - Add personal notes and usage tips
3. To use LoRAs in your workflow:
   - Add the "Lora Loader (LoraManager)" node to your workflow
   - Select a LoRA in the manager interface
   - Click copy button or use right-click menu "Copy LoRA syntax"
   - Paste into the Lora Loader node's text input
   - The node will automatically apply preset strength and trigger words

### Wildcards for TextLM / PromptLM

`Text (LoraManager)` and `Prompt (LoraManager)` support `/wildcard` autocomplete plus runtime wildcard expansion.

- Wildcard files live in `{settings folder}/wildcards/`
- When you type `/wildcard` and no wildcard files exist yet, the autocomplete dropdown shows the exact folder path and lets you open it
- Supported formats: `.txt`, `.yaml`, `.yml`, `.json`

Format rules:

- `wildcards/animals/cat.txt` becomes `__animals/cat__`
- `.txt` files use one option per line
- YAML / JSON files use nested keys that end in string arrays

Examples:

```txt
# wildcards/color.txt
red
blue
green
```

Use it as `__color__`.

```yaml
# wildcards/colors.yaml
palette:
  warm:
    - red
    - orange
```

Use it as `__palette/warm__`.

### Filename Format Patterns for Save Image Node

The Save Image Node supports dynamic filename generation using pattern codes. You can customize how your images are named using the following format patterns:

#### Available Pattern Codes

- `%seed%` - Inserts the generation seed number
- `%width%` - Inserts the image width
- `%height%` - Inserts the image height
- `%pprompt:N%` - Inserts the positive prompt (limited to N characters)
- `%nprompt:N%` - Inserts the negative prompt (limited to N characters)
- `%model:N%` - Inserts the model/checkpoint name (limited to N characters)
- `%date%` - Inserts current date/time as "yyyyMMddhhmmss"
- `%date:FORMAT%` - Inserts date using custom format with:
  - `yyyy` - 4-digit year
  - `yy` - 2-digit year
  - `MM` - 2-digit month
  - `dd` - 2-digit day
  - `hh` - 2-digit hour
  - `mm` - 2-digit minute
  - `ss` - 2-digit second

#### Examples

- `image_%seed%` → `image_1234567890`
- `gen_%width%x%height%` → `gen_512x768`
- `%model:10%_%seed%` → `dreamshape_1234567890`
- `%date:yyyy-MM-dd%` → `2025-04-28`
- `%pprompt:20%_%seed%` → `beautiful landscape_1234567890`
- `%model%_%date:yyMMdd%_%seed%` → `dreamshaper_v8_250428_1234567890`

You can combine multiple patterns to create detailed, organized filenames for your generated images.

### Standalone Mode

You can now run LoRA Manager independently from ComfyUI:

1. **For ComfyUI users**:
   - Launch ComfyUI with LoRA Manager at least once to initialize the necessary path information in the `settings.json` file located in your user settings folder (see paths above).
   - Make sure dependencies are installed: `pip install -r requirements.txt`
   - From your ComfyUI root directory, run:
     ```bash
     python custom_nodes\comfyui-lora-manager\standalone.py
     ```
   - Access the interface at: `http://localhost:8188/loras`
   - You can specify a different host or port with arguments:
     ```bash
     python custom_nodes\comfyui-lora-manager\standalone.py --host 127.0.0.1 --port 9000
     ```

2. **For non-ComfyUI users**:
   - Copy the provided `settings.json.example` file to create a new file named `settings.json`. Update the API key, optional language, and folder paths only—the library registry is created automatically when LoRA Manager starts.
   - Edit `settings.json` to include your correct model folder paths and CivitAI API key (you can leave the defaults until ready to configure them)
   - Enable portable mode by setting `"use_portable_settings": true` if you prefer LoRA Manager to read and write the `settings.json` located in the project directory.
   - Install required dependencies: `pip install -r requirements.txt`
   - Run standalone mode:
     ```bash
     python standalone.py
     ```
   - Access the interface through your browser at: `http://localhost:8188/loras`

   > **Note:** Existing installations automatically migrate the legacy `settings.json` from the plugin folder to the user settings directory the first time you launch this version.

This standalone mode provides a lightweight option for managing your model and recipe collection without needing to run the full ComfyUI environment, making it useful even for users who primarily use other stable diffusion interfaces.

## Testing & Coverage

### Backend

Install the development dependencies and run pytest with coverage reports:

```bash
pip install -r requirements-dev.txt
COVERAGE_FILE=coverage/backend/.coverage pytest \
  --cov=py \
  --cov=standalone \
  --cov-report=term-missing \
  --cov-report=html:coverage/backend/html \
  --cov-report=xml:coverage/backend/coverage.xml \
  --cov-report=json:coverage/backend/coverage.json
```

HTML, XML, and JSON artifacts are stored under `coverage/backend/` so you can inspect hot spots locally or from CI artifacts.

### Frontend

Run the Vitest coverage suite to analyze widget hot spots:

```bash
npm run test:coverage
```

---

## Documentation

- **[metadata.json Schema Documentation](docs/metadata-json-schema.md)** — Complete reference for the `.metadata.json` sidecar file format, including all fields, types, and examples for LoRA, Checkpoint, and Embedding models.

---

## Contributing

Thank you for your interest in contributing to ComfyUI LoRA Manager! As this project is currently in its early stages and undergoing rapid development and refactoring, we are temporarily not accepting pull requests.

However, your feedback and ideas are extremely valuable to us:
- Please feel free to open issues for any bugs you encounter
- Submit feature requests through GitHub issues
- Share your suggestions for improvements

We appreciate your understanding and look forward to potentially accepting code contributions once the project architecture stabilizes.

---

## Credits

This project has been inspired by and benefited from other excellent ComfyUI extensions:

- [ComfyUI-QwenImageLoraLoader](https://github.com/ussoewwin/ComfyUI-QwenImageLoraLoader) - For the experimental Nunchaku Qwen-Image LoRA support
- [ComfyUI-SaveImageWithMetaData](https://github.com/nkchocoai/ComfyUI-SaveImageWithMetaData) - For the image metadata functionality
- [rgthree-comfy](https://github.com/rgthree/rgthree-comfy) - For the lora loader functionality

---

## ☕ Support

If you find this project helpful, consider supporting its development:

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/pixelpawsai)

[![Patreon](https://img.shields.io/badge/Become%20a%20Patron-F96854.svg?style=for-the-badge&logo=patreon&logoColor=white)](https://patreon.com/PixelPawsAI)

WeChat: [Click to view QR code](https://raw.githubusercontent.com/willmiao/ComfyUI-Lora-Manager/main/static/images/wechat-qr.webp)

## 💬 Community

Join our Discord community for support, discussions, and updates:
[Discord Server](https://discord.gg/vcqNrWVFvM)

---
## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=willmiao/ComfyUI-Lora-Manager&type=Date)](https://star-history.com/#willmiao/ComfyUI-Lora-Manager&Date)
