huggingface / huggingface/diffusers
Lora does not support module_to_save()
- Vorherrschende Sprache
- Python
- Sterne
- 34.5k
- Forks
- 7.3k
- Ø Merge
- 3 T. 3 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Describe the bug
When we set
```
LoraConfig(
r=args.rank,
lora_alpha=args.lora_alpha,
init_lora_weights=True,
target_modules=["to_k", "to_q", "to_v", "to_out.0"],
modules_to_save=["other"],
)
```
if `modules_to_save` is not none, then we load the adapter,`diffusers/src/diffusers/loaders/lora_pipeline.py` line 2681 `is_correct_format = all("lora" in key for key in state_dict.keys())` will be `False`
### Reproduction
See Descrination
### Logs
_No response_
### System Info
diffusers 0.32.0
### Who can help?
_No response_
Beitragsleitfaden
Rechercherichtung
Start in diffusers/src/diffusers/loaders/lora_pipeline.py at line 2681 and inspect how the state_dict format check behaves when LoraConfig includes modules_to_save. Reproduce the reported configuration with diffusers 0.32.0, then verify that loading an adapter with modules_to_save is accepted without the incorrect format result.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, pytorch
- Bereich
- machine-learning
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100