Fix LoKr key mapping for AI-Toolkit Chroma/Flux models#5
Open
Valheol wants to merge 1 commit intoAbstractEyes:mainfrom
Open
Fix LoKr key mapping for AI-Toolkit Chroma/Flux models#5Valheol wants to merge 1 commit intoAbstractEyes:mainfrom
Valheol wants to merge 1 commit intoAbstractEyes:mainfrom
Conversation
This fix resolves the issue where LoKr models trained with AI-Toolkit for Chroma (Flux-based) models were not loading correctly, resulting in hundreds of "lora key not loaded" errors. Changes: - Added key conversion for lycoris_double_blocks_* and lycoris_single_blocks_* patterns to properly map AI-Toolkit naming to ComfyUI's expected format - Removed incorrect img_attn/txt_attn dot-to-underscore conversions that were breaking the correct format for Chroma/Flux models The fix only modifies key names (strings) and does not duplicate or copy any tensors, ensuring zero VRAM impact. Fixes key mapping for: - Double block layers (img_attn, txt_attn, img_mlp, txt_mlp) - Single block layers (linear1, linear2) - All LoKr component types (lokr_w1, lokr_w2, alpha, etc.) 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
This fix resolves the issue where LoKr models trained with AI-Toolkit for Chroma (Flux-based) models were not loading correctly, resulting in hundreds of "lora key not loaded" errors.
Changes:
The fix only modifies key names (strings) and does not duplicate or copy any tensors, ensuring zero VRAM impact.
Fixes key mapping for: