-
Notifications
You must be signed in to change notification settings - Fork 2.7k
bulk remove models loras #8659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Pfannkuchensack
wants to merge
5
commits into
invoke-ai:main
Choose a base branch
from
Pfannkuchensack:claude/bulk-remove-models-loras-011CV37qYSq2sFP94tNrrfmN
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
bulk remove models loras #8659
Pfannkuchensack
wants to merge
5
commits into
invoke-ai:main
from
Pfannkuchensack:claude/bulk-remove-models-loras-011CV37qYSq2sFP94tNrrfmN
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
Implements a comprehensive bulk deletion feature for the model manager that allows users to select and delete multiple models, LoRAs, and embeddings at once. Key changes: Frontend: - Add multi-selection state management to modelManagerV2 slice - Update ModelListItem to support Ctrl/Cmd+Click multi-selection with checkboxes - Create ModelListHeader component showing selection count and bulk actions - Create BulkDeleteModelsModal for confirming bulk deletions - Integrate bulk delete UI into ModelList with proper error handling - Add API mutation for bulk delete operations Backend: - Add POST /api/v2/models/i/bulk_delete endpoint - Implement BulkDeleteModelsRequest and BulkDeleteModelsResponse schemas - Handle partial failures with detailed error reporting - Return lists of successfully deleted and failed models This feature significantly improves user experience when managing large model libraries, especially when restructuring model storage locations. Fixes issue where users had to delete models individually after moving model files to new storage locations.
- Added proper error serialization using serialize-error for better error logging - Explicitly defined BulkDeleteModelsResponse type instead of relying on generated schema reference
- Reordered imports to follow conventional grouping (external, internal, then third-party utilities) - Added type assertion for error serialization to satisfy TypeScript - Extracted inline event handler into named callback function for better readability
Collaborator
|
I did some quick testing of this and it works as advertised. Certainly makes it much easier to do bulk deletions. I have a couple of suggestions for the UI:
Two frontend checks are failing, but look easily fixed. Could you look into this? |
|
Love this! |
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
This PR implements a comprehensive bulk deletion feature for the Model Manager, allowing users to select and delete multiple models, LoRAs, and embeddings at once.
Key Features:
Backend Changes:
Frontend Changes:
This significantly improves UX when managing large model libraries, especially when restructuring storage locations.
Related Issues / Discussions
Addresses the pain point where users had to delete models individually after moving model files to new storage locations.
#6240
#6749
QA Instructions
Merge Plan
No special considerations needed. Can be merged after review.
Checklist
Screenshot:
