feat: introduce two LoKR variants - KronA and CDKA#2370
Open
gesen2egee wants to merge 13 commits into
Open
Conversation
…icial DiffuseKronA
gesen2egee
force-pushed
the
feat/krona-support
branch
from
June 10, 2026 10:28
fb949c2 to
5996c84
Compare
Muffalo52
added a commit
to Muffalo52/sd-scripts
that referenced
this pull request
Jul 11, 2026
from kohya_ss/sd-scripts PR kohya-ss#2370
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 PR introduces two Kronecker-product-based network adapter variants designed for parameter-efficient fine-tuning: KronA and CDKA.
KronA is inspired by the WACV-2025 paper "DiffuseKronA".
CDKA is an improved successor to KronA, operating with a default R=1 and adapted for LoKR structures.
These adapters achieve significant parameter reduction while enhancing anti-overfitting capabilities, making them highly effective for personalizing and fine-tuning diffusion models on small datasets.
Both modules share a unified isomorphic codebase architecture. By adjusting parameters and default configurations, they can easily convert into each other:
cdka_alphascaling mechanism.References
KronA (DiffuseKronA):
CDKA:
Extra Features Supported:
DoRA: Introduced weight decomposition support (
weight_decompose=True) to decouple weight updates into magnitude and direction.ALLoRA: Dynamically schedules layer-wise learning rates based on adapter weight norms. It automates learning rate balancing (like LoRA+) and prevents gradient collapse across deep layers.
Recommended Configurations
You can configure the network in your training configuration (e.g.,
.tomlfiles) as follows.And use any method that supports general LoKR to infer the trained model.
A slightly higher learning rate than usual (e.g., 3e-4) can be used.