Skip to content

PixArtSigmaPipeline: no LoRA loading support #14004

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

importtorchfromdiffusersimportDiffusionPipelinepipe=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

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions