Skip to content

Add Krea 2 LoRA block support - #57

Open
diodiogod wants to merge 1 commit into
shootthesound:mainfrom
diodiogod:codex/krea2-support
Open

Add Krea 2 LoRA block support#57
diodiogod wants to merge 1 commit into
shootthesound:mainfrom
diodiogod:codex/krea2-support

Conversation

@diodiogod

Copy link
Copy Markdown

Adds Krea 2 support to the LoRA analysis and selective loading nodes.

What this adds:

  • Krea 2 detection in the V1 and V2 LoRA analyzers
  • Selective LoRA Loader (Krea 2)
  • Krea 2 Analyzer + Selective Loader V2
  • 28 main SingleStreamBlock controls: block_0 through block_27
  • frontend preset/widget support for the new Krea 2 nodes

Implementation notes:

  • Non-main Krea 2 Linear layers such as txtfusion, tmlp, txtmlp, tproj, first, and last are grouped under other_weights.
  • This is for Krea 2 LoRA analysis/loading only; it does not add Krea 2 training support.
  • The block layout follows the current Musubi Krea 2 implementation, where Krea 2 has 28 main SingleStreamBlocks.

Caveats:

  • This may still have bugs. Krea 2 support is new and I only tested it with the LoRAs/workflows I have available.
  • The analyzer color/impact detection may need refinement, especially around how much weight should be attributed to other_weights versus the 28 main blocks.
  • In my testing, the Krea 2 selective loader itself appears to work well for block manipulation.

Tested:

  • Python compile check for the touched Python files
  • frontend JS syntax check
  • smoke tests for Krea 2 detection and block extraction
  • manual Krea 2 LoRA loading/block manipulation in ComfyUI

@diodiogod

Copy link
Copy Markdown
Author

Compatibility note for #56 / #57: when both branches are combined, connected Krea 2 block_weights_string values are ignored because Krea 2 is missing from the shared Python profile parser. The node falls back to its local slider values.

Tested fix: register the 28 Krea blocks, accept 28-value profiles or 29 values including other_weights, support named syntax, and include other_weights in the output. Verified with a connected runtime string on both Krea nodes.

Fix is preserved in diodiogod:personal/krea2-v1-save at commit 396970d. It should be applied when whichever PR merges second is rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant