Skip to content

ErnieImagePipeline / PixArtSigmaPipeline: no LoRA loading support #14004

@dxqb

Description

@dxqb

Describe the bug

Calling pipe.load_lora_weights(...) on ErnieImagePipeline raises AttributeError: 'ErnieImagePipeline' object has no attribute 'load_lora_weights'. Neither the pipeline nor its denoiser, ErnieImageTransformer2DModel, currently has LoRA support wired up:

  • ErnieImagePipeline doesn't inherit a *LoraLoaderMixin (checked the registry in diffusers/loaders/lora_pipeline.py — there's no ErnieLoraLoaderMixin, unlike the ~20 other architectures that have one: SD, SDXL, SD3, Flux, Sana, Lumina2, QwenImage, ZImage, HiDream, etc.).
  • ErnieImageTransformer2DModel doesn't inherit PeftAdapterMixin, so there's no transformer.add_adapter() route either.

Side note, same gap, another model: PixArtSigmaPipeline is in the same spot — no *LoraLoaderMixin, and PixArtTransformer2DModel has no PeftAdapterMixin either. But that one's been around since early 2024 (#7654) without LoRA support landing since.

Reproduction

import torch
from diffusers import DiffusionPipeline

pipe = DiffusionPipeline.from_pretrained("<ernie-image-repo-id>", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("path/to/lora.safetensors")
AttributeError: 'ErnieImagePipeline' object has no attribute 'load_lora_weights'

The same call on PixArtSigmaPipeline.from_pretrained("PixArt-alpha/PixArt-Sigma-XL-2-1024-MS") hits the identical AttributeError.

Logs

AttributeError: 'ErnieImagePipeline' object has no attribute 'load_lora_weights'

System Info

  • diffusers commit: 0f1abc4 (main)
  • Python: 3.12
  • Platform: Linux

Who can help?

@yiyixuxu @sayakpaul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions