mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-14 00:17:18 +00:00
- 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>
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
- https://docs.pytest.org/en/stable/index.html
- https://docs.pytest.org/en/stable/how-to/assert.html
- https://docs.pytest.org/en/stable/how-to/doctest.html