huggingface / huggingface/diffusers
Unloading multiple loras: norms do not return to their original values
- Lingua principale
- Python
- Stelle
- 34.5k
- Fork
- 7.3k
- Merge medio
- 3g 3h
- PR unite (30g)
- 91
Descrizione
When unloading from multiple loras on flux pipeline, I believe that the norm layers are not restored [here](https://github.com/huggingface/diffusers/blob/464374fb87610c53b2cf81e08d3df628fada3ce4/src/diffusers/loaders/lora_pipeline.py#L1575).
Shouldn't we have:
```python
if len(transformer_norm_state_dict) > 0:
original_norm_layers_state_dict = self._load_norm_into_transformer(
transformer_norm_state_dict,
transformer=transformer,
discard_original_layers=False,
)
if not hasattr(transformer, "_transformer_norm_layers"):
transformer._transformer_norm_layers = original_norm_layers_state_dict
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start in src/diffusers/loaders/lora_pipeline.py around line 1575 and trace how transformer norm state is saved and restored when unloading multiple LoRAs from the Flux pipeline. Reproduce the unload sequence and verify that the norm layers return to their original values.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- machine-learning
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 42/100