FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Qwen-Image-2.1 LoRAs with a fused img_mlp.gate_up load partially without an error · Issue #14937 · huggingface/diffusers · GitHub

Repository navigation

Qwen-Image-2.1 LoRAs with a fused img_mlp.gate_up load partially without an error #14937

Description

Describe the bug

Qwen-Image-2.1 LoRAs trained with ComfyUI or ai-toolkit target the fused SwiGLU layer img_mlp.gate_up (lora_A [r, 4096], lora_B [24576, r]). QwenImage21Transformer2DModel keeps that layer as two, img_mlp.gate_layer and img_mlp.proj. _convert_non_diffusers_qwen_lora_to_diffusers passes the gate_up keys through unchanged, PEFT drops them as unexpected keys with only a warning, and the LoRA loads without its MLP gate/up update and without any error.

Affected LoRAs include ausboss/Qwen-Image-2.1-Outpaint-LoRA, Danrisi/grainscape_qwen2.1, lilylilith/QI_2.1_AnyAngle and ML-Intern-lab/Qwen-Image-2.1-doodle-in-LoRA (whose authors publish a hand-split copy as a workaround).

Reproduction

from diffusers import QwenImage21Pipeline

sd = QwenImage21Pipeline.lora_state_dict(
    "ausboss/Qwen-Image-2.1-Outpaint-LoRA",
    weight_name="qwen-image-2.1-outpaint-v2.safetensors",
)
print(sum("gate_up" in k for k in sd), "of", len(sd))

Logs

64 of 384
# e.g. transformer.transformer_blocks.0.img_mlp.gate_up.lora_A.weight - no module of that name exists, so load_lora_weights drops all 64

System Info

diffusers main at 8b33bfc, Python 3.14, torch 2.14.1, peft 0.21.2.

Who can help?

@sayakpaul

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL