huggingface / huggingface/diffusers
Lora does not support module_to_save()
- 主要言語
- Python
- スター
- 34.5k
- フォーク
- 7.3k
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 91
説明
### 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_
コントリビューションガイド
調査の方向性
diffusers/src/diffusers/loaders/lora_pipeline.py の2681行目から始め、LoraConfig に modules_to_save が含まれる場合に state_dict の形式チェックがどのように動作するかを調べてください。diffusers 0.32.0 で報告された設定を再現し、その後、modules_to_save を含む adapter の読み込みが誤った形式結果なしに受け入れられることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, pytorch
- 領域
- machine-learning
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100