huggingface / huggingface/diffusers
Lora does not support module_to_save()
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
### 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_
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, pytorch
- Ambito
- machine-learning
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100