Files
Kohya-ss-sd-scripts/tests
Umisetokikaze 4ea6032c66 feat: SD1.x/2.x と SDXL 向けの LECO 学習スクリプトを追加 (#2285)
* Add LECO training script and associated tests

- Implemented `sdxl_train_leco.py` for training with LECO prompts, including argument parsing, model setup, training loop, and weight saving functionality.
- Created unit tests for `load_prompt_settings` in `test_leco_train_util.py` to validate loading of prompt configurations in both original and slider formats.
- Added basic syntax tests for `train_leco.py` and `sdxl_train_leco.py` to ensure modules are importable.

* fix: use getattr for safe attribute access in argument verification

* feat: add CUDA device compatibility validation and corresponding tests

* Revert "feat: add CUDA device compatibility validation and corresponding tests"

This reverts commit 6d3e51431b.

* feat: update predict_noise_xl to use vector embedding from add_time_ids

* feat: implement checkpointing in predict_noise and predict_noise_xl functions

* feat: remove unused submodules and update .gitignore to exclude .codex-tmp

---------

Co-authored-by: Kohya S. <52813779+kohya-ss@users.noreply.github.com>
2026-03-28 19:25:16 +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