Will Miao 682e964f89 fix(usage-control): enrich usageControl from CivitAI by-hash API for all model types
The model-level API (GET /api/v1/models/{id}) does not include usageControl
on version entries, causing generation-only models to show as downloadable.

Backend changes:
- Add get_model_versions_by_hashes() to CivitaiClient (POST by-hash batch)
- Propagate through all provider classes including RateLimitRetryingProvider
- Add _enrich_version_entries() pipeline: extract SHA256 from files[].hashes,
  batch-call by-hash endpoint, inject usageControl+earlyAccessEndsAt in-place
- Wire enrichment into both bulk (_fetch_model_versions_bulk) and individual
  (_refresh_single_model) refresh paths
- Fix _build_record_from_remote dropping usage_control field
- Fix POST by-hash request format (plain JSON array, not {hashes:[...]} object)

Frontend changes:
- Fix disabled download button tooltip: wrap in <span> since HTML title
  attribute does not fire on disabled elements
2026-05-07 08:56:19 +08:00
2026-03-29 08:28:00 +08:00
2026-03-27 19:26:13 +08:00
2025-04-30 16:04:41 +08:00
2026-04-15 23:07:36 +08:00

ComfyUI LoRA Manager

Revolutionize your workflow with the ultimate LoRA companion for ComfyUI!

Discord Release Release Date

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

📺 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

🌐 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

📚 Learn More: Complete Tutorial


🤝 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.

🌟 Special Thanks

dispenser, EbonEagle, DanielMagPizza, Scott R

💖 Supporters (739)

Click to view all awesome supporters

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

⚠ 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

  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
  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

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:
  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:

# wildcards/color.txt
red
blue
green

Use it as __color__.

# 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:
      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:
      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:
      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:

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:

npm run test:coverage

Documentation

  • metadata.json Schema Documentation — 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:


Support

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

ko-fi

Patreon

WeChat: Click to view QR code

💬 Community

Join our Discord community for support, discussions, and updates: Discord Server


Star History

Star History Chart

Description
LoRA Manager for ComfyUI - A powerful extension for organizing, previewing, and integrating LoRA models with metadata and workflow support.
Readme GPL-3.0 69 MiB
Languages
Python 49.5%
JavaScript 38.4%
CSS 4.9%
HTML 3.1%
Vue 2.4%
Other 1.7%