Skip to content

fix: skip incompatible LoRA weights - #1825

Merged
leejet merged 1 commit into
masterfrom
fix/skip-incompatible-lora-weights
Jul 27, 2026
Merged

fix: skip incompatible LoRA weights#1825
leejet merged 1 commit into
masterfrom
fix/skip-incompatible-lora-weights

Conversation

@leejet

@leejet leejet commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • skip shape-incompatible LoRA weights with a warning instead of aborting
  • validate runtime linear LoRA down/mid/up dimensions against the base weight
  • track skipped tensors separately and avoid repeated warnings or misleading applied counts

Related Issue / Discussion

Fix #1796.

Additional Information

N/A

Checklist

@leejet
leejet merged commit 2251699 into master Jul 27, 2026
9 checks passed
@leejet
leejet deleted the fix/skip-incompatible-lora-weights branch July 27, 2026 16:09
@masamaru-san

Copy link
Copy Markdown

FYI: I use only the SD 3.5 series but when using sd-cli with --lora-apply-mode at_runtime, this PR causes many tensors in LoRA to be skipped. For example, the 8‑step LoRA for the Medium‑Turbo model.

... should I create new issue?

@stduhpf

stduhpf commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

I beleive it's because of the split qkv loras, the .add_q_proj.weight.lora_A gets renamed as .qkv.weight.lora_down, and is supposed to be concatenated with .qkv.weight.1.lora_down (add_k_proj) and .qkv.weight.2.lora_down (add_v_proj), so it doesn't match the size of the full .qkv.weight matrix alone.

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.

[Bug] Anima - LoRA shape mismatch handled ungracefully

3 participants