From 213e738140859dbcc12c2540ce40d6b6d2875aa7 Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Sun, 13 Sep 2026 22:02:44 +0900 Subject: ddim timestep_spacingをtrailingに強制するモードを追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_config.py | 11 +++++++++++ tests/test_pipeline_factory.py | 1 + 2 files changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/test_config.py b/tests/test_config.py index 5d339f8..0e34086 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -282,6 +282,17 @@ def test_generation_defaults_clip_skip_and_pad_last_block(tmp_path: Path) -> Non assert config.generation.pad_last_block is False +def test_generation_accepts_ddim_trailing_scheduler(tmp_path: Path) -> None: + path = tmp_path / "config.toml" + path.write_text( + f'[model]\nroot = "{tmp_path.as_posix()}"\ncheckpoint = "base.safetensors"\n' + '[generation]\nscheduler = "ddim_trailing"\n', + encoding="utf-8", + ) + config = load_config(path, validate_paths=False) + assert config.generation.scheduler == "ddim_trailing" + + def test_generation_reads_clip_skip_and_pad_last_block(tmp_path: Path) -> None: path = tmp_path / "config.toml" path.write_text( diff --git a/tests/test_pipeline_factory.py b/tests/test_pipeline_factory.py index 14b771b..e7904ab 100644 --- a/tests/test_pipeline_factory.py +++ b/tests/test_pipeline_factory.py @@ -142,6 +142,7 @@ def test_checkpoint_without_vae_fails_pipeline_initialization(app_config, monkey ), ("euler_a", "FakeEulerAncestralDiscreteScheduler", {}), ("ddim", "FakeDDIMScheduler", {}), + ("ddim_trailing", "FakeDDIMScheduler", {"timestep_spacing": "trailing"}), ("lcm", "FakeLCMScheduler", {}), ], ) -- cgit v1.2.3