feat(model-manager): add CivitAI LoRA trigger refresh#9138
Draft
AsuraAce wants to merge 2 commits intoinvoke-ai:mainfrom
Draft
feat(model-manager): add CivitAI LoRA trigger refresh#9138AsuraAce wants to merge 2 commits intoinvoke-ai:mainfrom
AsuraAce wants to merge 2 commits intoinvoke-ai:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Feature: add CivitAI metadata support for LoRA trigger phrase refresh and install metadata enrichment.
This PR adds CivitAI as a metadata source alongside Hugging Face for LoRA installs and Model Manager trigger phrase refresh. CivitAI
trainedWordsare mapped into existingtrigger_phrases, while custom user phrases are preserved. The refresh path stores a concrete CivitAI model-version source URL when metadata is resolved, including cases where CivitAI returns no trained words.The frontend adds a LoRA-only refresh action in the Model Manager trigger phrase panel. Prompt insertion continues to use the existing Add Prompt Trigger UI.
Follow-up noted separately on the PR: consider adding CivitAI API key management in Settings so users do not need to edit YAML/config files manually.
View Screenshots
Related Issues / Discussions
None linked.
QA Instructions
Validated locally with:
uv run --extra test pytest tests\backend\model_manager\model_metadata\test_civitai_metadata_fetch.py tests\app\routers\test_model_manager.py tests\app\services\model_install\test_model_install.py::test_civitai_download_url_metadata_fetch_failure_falls_back_to_direct_download tests\app\services\model_install\test_model_install.py::test_civitai_download_url_metadata_fetch_returns_metadata_files -quv run --extra test pytest tests\app\services\model_install\test_model_install.py -quv run --extra test pytest tests\app\routers\test_model_manager.py -quv run --extra test ruff check invokeai\backend\model_manager\metadata\fetch\civitai.py invokeai\app\api\routers\model_manager.py invokeai\app\services\model_install\model_install_default.py tests\backend\model_manager\model_metadata\test_civitai_metadata_fetch.py tests\app\routers\test_model_manager.py tests\app\services\model_install\test_model_install.pypnpm --dir invokeai\frontend\web lint:tscManual QA target:
Merge Plan
No special merge sequencing required. This PR does not include database migrations or model record schema migrations.
Checklist
What's Newcopy (if doing a release after this PR)