huggingface / huggingface/diffusers

PixArtSigmaPipeline: no LoRA loading support

Offen
#14,004 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
34.5k
Forks
7.3k
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
91

Beschreibung

### 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

```python
import torch
from diffusers import DiffusionPipeline

pipe = DiffusionPipeline.from_pretrained("", 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: 0f1abc4ae8b0eb2a3b40e82a310507281144c423 (main)
- Python: 3.12
- Platform: Linux

### Who can help?

@yiyixuxu @sayakpaul

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit diffusers/loaders/lora_pipeline.py und untersuche anschließend ErnieImagePipeline, PixArtSigmaPipeline, ErnieImageTransformer2DModel und PixArtTransformer2DModel. Führe zuerst die gemeldeten Reproduktionen von load_lora_weights aus. Die Aufgabe ist abgeschlossen, wenn die betroffenen Pipelines und Denoiser den angeforderten LoRA-Ladepfad ohne den gemeldeten AttributeError unterstützen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
machine-learning
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
43/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.