OFTv2 / BOFT のネットワークモジュールを追加#2357
Open
umisetokikaze wants to merge 1 commit into
Open
Conversation
- add shared orthogonal adapter helpers - support OFTv2 and BOFT training, loading, and merge flows - add compatibility tests for PEFT-style adapter keys - ignore local .codex reference artifacts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
SD1/SD2/SDXL の network training 向けに、直交変換系アダプタの新しい network module を追加しました。
networks.oft_v2oft_R.weightの保存・読み込みに対応networks.boftboft_R/boft_sの保存・読み込みに対応既存の legacy
networks.oftは変更していません。対象範囲
今回の対象としたのは、
train_network.py/sdxl_train_network.py経由の SD1/SD2/SDXL 向け network training です。今回のPRで、以下のアーキテクチャ群はひとまず対象外にしました。
互換性
新規モジュールでは、以下の形式を読み込めるようにしました。
lora_unet_...oft_R.weightoft_R.weightBOFT は PEFT の保存形式に合わせ、保存対象を以下にしています。
boft_Rboft_sboft_Pは実行時に再構築するため保存しません。使い方の例
OFTv2:
検証
- 追加ファイルの py_compile を確認
- 軽量テストで forward hook と merge 後の出力一致を確認
- PEFT風の oft_R.weight / boft_R / boft_s キーから network を作成できることを確認
- Ubuntu 環境で sdxl_train_network.py による SDXL OFTv2 の短時間学習が完走することを確認
その他
Codex 使用時の作業ファイルを管理対象外にするため、.gitignore に .codex を追加しました。