diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-09-12 20:12:17 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-09-12 20:12:17 +0900 |
| commit | fd987cb31fd20483080f8d80ce35b53f101f243f (patch) | |
| tree | 0e1d04c1f233e57d05f91006c8fd04f4caf89446 /tests/test_config.py | |
| parent | 23f6c0850385d873d2e55926a34855c479cd3def (diff) | |
feat: SD 1.x向けScheduler対応を5種類に整理
generation.schedulerの正式対応値をdpmpp_2m_karras、dpmpp_2m_sde_karras、euler_a、ddim、lcmに限定し、既定値をdpmpp_2m_karrasへ変更する。旧dpmpp_2m、eulerおよび未知値は起動時の設定validationで拒否する。
Scheduler生成処理をPipelineFactoryへ集約する。DPM++ 2M系はDPMSolverMultistepSchedulerを共用し、algorithm_type、solver_order=2、use_karras_sigmas=Trueで通常版とSDE版を切り替える。Euler Ancestral、DDIM、LCMは現在のpipeline scheduler configを引き継いで構築する。
LCM-LoRAは既存のmodel.lora設定から通常のLoRAとして読み込み、LCM選択時にもstepsとcfg_scaleを自動調整せずTOML値をそのまま使用する。MCP Tool schemaにはscheduler入力を追加しない。
Specifications.md、Design.md、config.mdおよびconfig.example.tomlのenum、既定値、対応表、設定例を新仕様へ統一する。5 schedulerの変換、DPM++ constructor option、旧値と未知値の拒否、省略時の既定値、MCP schema非公開をテストで検証する。
検証: ruff check、ruff format --check、pyright、pytest(39 passed)、インストール済みDiffusersで5 schedulerの実インスタンス構築を確認。
Diffstat (limited to 'tests/test_config.py')
| -rw-r--r-- | tests/test_config.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index 5e4341a..c24064b 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -76,6 +76,8 @@ def test_loads_and_resolves_all_model_paths(tmp_path: Path) -> None: [ ('checkpoint = "../base.safetensors"', "file name"), ("steps = 0", "steps"), + ('scheduler = "dpmpp_2m"', "scheduler"), + ('scheduler = "euler"', "scheduler"), ('scheduler = "unknown"', "scheduler"), ('default_size = "1024"', "default_size"), ('preprocessor = "zoe"', "preprocessor"), @@ -120,3 +122,4 @@ def test_can_skip_path_checks_for_schema_only_use(tmp_path: Path) -> None: ) config = load_config(path, validate_paths=False) assert config.model.root == (tmp_path / "missing").resolve() + assert config.generation.scheduler == "dpmpp_2m_karras" |
