Files
Kohya-ss-sd-scripts/tests
Kohya S a8643095ca fix: LECO PR #2285 のレビュー指摘事項を修正
- train_util.py/deepspeed_utils.py の getattr 化を元に戻し、LECO パーサーにダミー引数を追加
- sdxl_train_util のモジュールレベルインポートをローカルインポートに変更
- PromptEmbedsCache.__getitem__ でキャッシュミス時に KeyError を送出するよう修正
- 設定ファイル形式を YAML から TOML に変更(リポジトリの規約に統一)
- 重複コード (build_network_kwargs, get_save_extension, save_weights) を leco_train_util.py に統合
- _expand_slider_target の冗長な PromptSettings 構築を簡素化
- add_time_ids 用に専用の batch_add_time_ids 関数を追加

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 20:06:34 +09:00
..
2024-12-02 13:51:57 -05:00
2024-11-29 15:52:03 -05:00

Tests

Install

pip install pytest

Usage

pytest

Contribution

Pytest is configured to run tests in this directory. It might be a good idea to add tests closer in the code, as well as doctests.

Tests are functions starting with test_ and files with the pattern test_*.py.

def test_x():
    assert 1 == 2, "Invalid test response"

Resources

pytest

PyTorch testing