diff --git a/docs/assets/cookbook-recipes.json b/docs/assets/cookbook-recipes.json index 63a0cdbf5..8e8cc4576 100644 --- a/docs/assets/cookbook-recipes.json +++ b/docs/assets/cookbook-recipes.json @@ -1,5 +1,5 @@ { - "version": 14, + "version": 15, "recipes": [ { "id": "fastwan21-t2v", @@ -364,6 +364,38 @@ "expected_artifact": "MP4 video with synchronized audio under video_samples_kandinsky6_ti2va/", "related": ["kandinsky6-ti2va-base", "kandinsky6-vsr-distilled"] }, + { + "id": "kandinsky6-ti2va-lite", + "family": "kandinsky6", + "stage": "inference", + "task": "Text or image to video with audio", + "label": "Kandinsky 6 Lite TI2VA", + "summary": "Generate a five-second, 512x768 video with synchronized audio from text or an image with the 3.2B Lite checkpoint in fifty inference steps and guidance 5.0.", + "model": "kandinskylab/Kandinsky-6.0-Lite-5s-Diffusers", + "source": "examples/inference/basic/basic_kandinsky6_ti2va.py", + "command": "KANDINSKY6_MODEL_PATH=kandinskylab/Kandinsky-6.0-Lite-5s-Diffusers python examples/inference/basic/basic_kandinsky6_ti2va.py", + "gpu_types": ["NVIDIA"], + "hardware": {"platform": "cuda", "gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 video with synchronized audio under video_samples_kandinsky6_ti2va/", + "related": ["kandinsky6-ti2va-lite-piflow", "kandinsky6-ti2va-base"] + }, + { + "id": "kandinsky6-ti2va-lite-piflow", + "family": "kandinsky6", + "stage": "inference", + "task": "Distilled text or image to video with audio", + "label": "Kandinsky 6 Lite pi-Flow", + "summary": "Generate a five-second video with synchronized audio using the 3.2B Lite distilled pi-Flow checkpoint in ten inference steps and guidance 1.0.", + "model": "kandinskylab/Kandinsky-6.0-Lite-distill-5s-Diffusers", + "source": "examples/inference/basic/basic_kandinsky6_ti2va.py", + "command": "KANDINSKY6_MODEL_PATH=kandinskylab/Kandinsky-6.0-Lite-distill-5s-Diffusers python examples/inference/basic/basic_kandinsky6_ti2va.py", + "gpu_types": ["NVIDIA"], + "hardware": {"platform": "cuda", "gpu_count": 1, "evidence": "source-configured"}, + "evidence": "Source-backed", + "expected_artifact": "MP4 video with synchronized audio under video_samples_kandinsky6_ti2va/", + "related": ["kandinsky6-ti2va-lite", "kandinsky6-ti2va-piflow"] + }, { "id": "kandinsky6-vsr", "family": "kandinsky6", diff --git a/docs/cookbook/cosmos.md b/docs/cookbook/cosmos.md index 4d9c8c0fb..89ad17313 100644 --- a/docs/cookbook/cosmos.md +++ b/docs/cookbook/cosmos.md @@ -5,7 +5,7 @@ hide: # Cosmos recipes -
+
All model families
diff --git a/docs/cookbook/flux.md b/docs/cookbook/flux.md index 160c56ca5..bcb59a2fe 100644 --- a/docs/cookbook/flux.md +++ b/docs/cookbook/flux.md @@ -5,7 +5,7 @@ hide: # FLUX recipes -
+
All model families
diff --git a/docs/cookbook/glm-image.md b/docs/cookbook/glm-image.md index 93f8b5cf2..64bcdae21 100644 --- a/docs/cookbook/glm-image.md +++ b/docs/cookbook/glm-image.md @@ -5,7 +5,7 @@ hide: # GLM-Image recipes -
+
All model families
diff --git a/docs/cookbook/hunyuan.md b/docs/cookbook/hunyuan.md index dede8af94..52c11cd56 100644 --- a/docs/cookbook/hunyuan.md +++ b/docs/cookbook/hunyuan.md @@ -5,7 +5,7 @@ hide: # Hunyuan recipes -
+
All model families
diff --git a/docs/cookbook/kandinsky5.md b/docs/cookbook/kandinsky5.md index d899dd977..2389f1bd6 100644 --- a/docs/cookbook/kandinsky5.md +++ b/docs/cookbook/kandinsky5.md @@ -5,7 +5,7 @@ hide: # Kandinsky 5 recipes -
+
All model families
diff --git a/docs/cookbook/kandinsky6.md b/docs/cookbook/kandinsky6.md index fc9f32dff..9fd289c66 100644 --- a/docs/cookbook/kandinsky6.md +++ b/docs/cookbook/kandinsky6.md @@ -5,7 +5,7 @@ hide: # Kandinsky 6 recipes -
+
All model families
@@ -15,7 +15,7 @@ hide:

Maintained family · Inference

Kandinsky 6 inference recipes

-

Kandinsky 6 from the Kandinsky Lab generates five-second video with synchronized audio from text or an image, with base and distilled pi-Flow checkpoints, and upscales existing clips with base or distilled video super-resolution.

+

Kandinsky 6 from the Kandinsky Lab generates five-second video with synchronized audio from text or an image, in Pro (30.1B) and Lite (3.2B) sizes with base and distilled pi-Flow checkpoints, and upscales existing clips with base or distilled video super-resolution.

diff --git a/docs/cookbook/longcat.md b/docs/cookbook/longcat.md index 28f303deb..33addd0f4 100644 --- a/docs/cookbook/longcat.md +++ b/docs/cookbook/longcat.md @@ -5,7 +5,7 @@ hide: # LongCat recipes -
+
All model families
diff --git a/docs/cookbook/ltx.md b/docs/cookbook/ltx.md index f751661c9..d8878be7b 100644 --- a/docs/cookbook/ltx.md +++ b/docs/cookbook/ltx.md @@ -5,7 +5,7 @@ hide: # LTX recipes -
+
All model families
diff --git a/docs/cookbook/matrix-game.md b/docs/cookbook/matrix-game.md index b6d4e16cd..10f0eb4ca 100644 --- a/docs/cookbook/matrix-game.md +++ b/docs/cookbook/matrix-game.md @@ -5,7 +5,7 @@ hide: # Matrix Game recipes -
+
All model families
diff --git a/docs/cookbook/minimax-h3.md b/docs/cookbook/minimax-h3.md index 0ccb0b3bb..265a508d6 100644 --- a/docs/cookbook/minimax-h3.md +++ b/docs/cookbook/minimax-h3.md @@ -18,7 +18,7 @@ eight-forward T2VA command](../getting_started/installation/mlx.md#pruned-eight- It reads `fastvideo_inference.json` for the trained schedule. The command uses native 832x480 resolution and all requested frames. -
+
All model families
diff --git a/docs/cookbook/mmaudio.md b/docs/cookbook/mmaudio.md index 544241d44..8cd584cfa 100644 --- a/docs/cookbook/mmaudio.md +++ b/docs/cookbook/mmaudio.md @@ -5,7 +5,7 @@ hide: # MMAudio recipes -
+
All model families
diff --git a/docs/cookbook/stable-audio.md b/docs/cookbook/stable-audio.md index 5fa15b299..64f52ce32 100644 --- a/docs/cookbook/stable-audio.md +++ b/docs/cookbook/stable-audio.md @@ -5,7 +5,7 @@ hide: # Stable Audio recipes -
+
All model families
diff --git a/docs/cookbook/stable-diffusion.md b/docs/cookbook/stable-diffusion.md index 845a30594..9bd005ea0 100644 --- a/docs/cookbook/stable-diffusion.md +++ b/docs/cookbook/stable-diffusion.md @@ -5,7 +5,7 @@ hide: # Stable Diffusion recipes -
+
All model families
diff --git a/docs/cookbook/turbodiffusion.md b/docs/cookbook/turbodiffusion.md index df3dac64f..0c72c4fea 100644 --- a/docs/cookbook/turbodiffusion.md +++ b/docs/cookbook/turbodiffusion.md @@ -5,7 +5,7 @@ hide: # TurboDiffusion recipes -
+
All model families
diff --git a/docs/cookbook/wan.md b/docs/cookbook/wan.md index 7139d02fb..d23766ab3 100644 --- a/docs/cookbook/wan.md +++ b/docs/cookbook/wan.md @@ -5,7 +5,7 @@ hide: # Wan recipes -
+
All model families
diff --git a/docs/cookbook/z-image.md b/docs/cookbook/z-image.md index 4db21f991..e912e932a 100644 --- a/docs/cookbook/z-image.md +++ b/docs/cookbook/z-image.md @@ -5,7 +5,7 @@ hide: # Z-Image recipes -
+
All model families
diff --git a/docs/inference/kandinsky6.md b/docs/inference/kandinsky6.md index da4307f7b..f623b1400 100644 --- a/docs/inference/kandinsky6.md +++ b/docs/inference/kandinsky6.md @@ -7,12 +7,16 @@ mp4 automatically. To upscale a generated clip, see [Kandinsky 6 Video SR](kandi ## Models -Both variants are official Diffusers repos, loaded directly through their `model_index.json`: +Kandinsky 6 comes in two sizes, Pro (30.1B-parameter DiT) and Lite (3.2B), each with a base and a pi-Flow distilled +checkpoint. All four are official Diffusers repos, loaded directly through their `model_index.json`; Lite shares Pro's +architecture, text encoders, VAEs and schedulers, with a narrower and shallower DiT. -| Variant | Hub repo | Scheduler | Steps | Guidance | Example | -|---|---|---|---|---|---| -| T2IVA | `kandinskylab/Kandinsky-6.0-Pro-5s-Diffusers` | `FlowMatchEulerDiscreteScheduler` (shift 5.0) | 50 | 5.0 | [`basic_kandinsky6_ti2va.py`](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | -| T2IVA distilled | `kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers` | `PiflowScheduler` (`n_grid` 10, shift 5.0) | 10 | 1.0 | [`basic_kandinsky6_ti2va.py`](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | +| Size | Variant | Hub repo | Scheduler | Steps | Guidance | Example | +|---|---|---|---|---|---|---| +| Pro | T2IVA | `kandinskylab/Kandinsky-6.0-Pro-5s-Diffusers` | `FlowMatchEulerDiscreteScheduler` (shift 5.0) | 50 | 5.0 | [`basic_kandinsky6_ti2va.py`](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | +| Pro | T2IVA distilled | `kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers` | `PiflowScheduler` (`n_grid` 10, shift 5.0) | 10 | 1.0 | [`basic_kandinsky6_ti2va.py`](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | +| Lite | T2IVA | `kandinskylab/Kandinsky-6.0-Lite-5s-Diffusers` | `FlowMatchEulerDiscreteScheduler` (shift 5.0) | 50 | 5.0 | [`basic_kandinsky6_ti2va.py`](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | +| Lite | T2IVA distilled | `kandinskylab/Kandinsky-6.0-Lite-distill-5s-Diffusers` | `PiflowScheduler` (`n_grid` 10, shift 5.0) | 10 | 1.0 | [`basic_kandinsky6_ti2va.py`](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | The steps and guidance columns are the defaults of the preset the registry selects for each repo id. Everything else is shared: 512x768, 121 frames (5 s at 24 fps) and the Diffusers default negative prompt (only used when @@ -101,7 +105,7 @@ nothing: ## Memory -The Pro DiT has 30.1B parameters, about 60 GB in bf16 (`dit_precision` defaults to `bf16`), and the Qwen2.5-VL text -encoder adds 16.6 GB. FastVideo enables `dit_cpu_offload` by default; the examples turn it off (`dit_cpu_offload=False`) +The Pro DiT has 30.1B parameters, about 60 GB in bf16 (`dit_precision` defaults to `bf16`); the Lite DiT has 3.2B, +about 6.4 GB. Both use the same Qwen2.5-VL text encoder, which adds 16.6 GB. FastVideo enables `dit_cpu_offload` by default; the examples turn it off (`dit_cpu_offload=False`) to keep the DiT resident on the GPU and offload the text encoder instead (`text_encoder_cpu_offload=True`). See [Offloading](offloading.md) for the memory knobs. diff --git a/docs/inference/support_matrix.md b/docs/inference/support_matrix.md index c89be5ce8..16f7f10d9 100644 --- a/docs/inference/support_matrix.md +++ b/docs/inference/support_matrix.md @@ -54,8 +54,8 @@ column links a runnable script in `examples/inference/basic/` where one exists. | kandinsky5 | `kandinskylab/Kandinsky-5.0-I2V-Lite-5s-Diffusers` | I2V | [basic_kandinsky5_i2v.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky5_i2v.py) | | kandinsky5 | `kandinskylab/Kandinsky-5.0-I2V-Pro-sft-5s-Diffusers` | I2V | [basic_kandinsky5_i2v.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky5_i2v.py) | | kandinsky5 | `kandinskylab/Kandinsky-5.0-I2V-Pro-distilled-5s-Diffusers` | I2V | [basic_kandinsky5_i2v.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky5_i2v.py) | -| kandinsky6 | `kandinskylab/Kandinsky-6.0-Pro-5s-Diffusers`
`kandinskylab/Kandinsky-6.0-Pro-sft-5s-Diffusers` | T2V, I2V | [basic_kandinsky6_ti2va.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | -| kandinsky6 | `kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers` | T2V, I2V | [basic_kandinsky6_ti2va.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | +| kandinsky6 | `kandinskylab/Kandinsky-6.0-Pro-5s-Diffusers`
`kandinskylab/Kandinsky-6.0-Pro-sft-5s-Diffusers`
`kandinskylab/Kandinsky-6.0-Lite-5s-Diffusers` | T2V, I2V | [basic_kandinsky6_ti2va.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | +| kandinsky6 | `kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers`
`kandinskylab/Kandinsky-6.0-Lite-distill-5s-Diffusers` | T2V, I2V | [basic_kandinsky6_ti2va.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_ti2va.py) | | kandinsky6_sr | `kandinskylab/Kandinsky-6.0-VSR-5s-Diffusers`
`kandinskylab/Kandinsky-6.0-VSR-distilled2steps-5s-Diffusers` | — | [basic_kandinsky6_sr.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_kandinsky6_sr.py) | | lingbot_video | `FastVideo/LingBot-Video-MoE-30B-A3B-Diffusers` | T2V | [basic_lingbot_video.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_lingbot_video.py) | | lingbot_video | `FastVideo/LingBot-Video-Dense-1.3B-Diffusers` | T2V | [basic_lingbot_video.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_lingbot_video.py) | @@ -109,8 +109,8 @@ reference videos as sparse VSA regions) run through [basic_fasth3_omniref_pdd.py](https://github.com/hao-ai-lab/FastVideo/blob/main/examples/inference/basic/basic_fasth3_omniref_pdd.py); see [FastH3 distilled checkpoint schedules](fasth3-distilled.md#ref2va-pdd-students). -**Note (Kandinsky 6)**: the two `kandinsky6` IDs generate video with audio from -text, optionally plus an image (see the [T2IVA guide](kandinsky6.md)); the +**Note (Kandinsky 6)**: the `kandinsky6` IDs (Pro 30.1B and Lite 3.2B, each base +and distilled) generate video with audio from text, optionally plus an image (see the [T2IVA guide](kandinsky6.md)); the `kandinsky6_sr` IDs upscale an existing video (see the [Video SR guide](kandinsky6_sr.md)). diff --git a/fastvideo/registry.py b/fastvideo/registry.py index 8a8e2f068..6d2c9e7f8 100644 --- a/fastvideo/registry.py +++ b/fastvideo/registry.py @@ -814,7 +814,10 @@ def _register_configs() -> None: sampling_param_cls=None, pipeline_config_cls=Kandinsky6TI2VAConfig, workload_types=(WorkloadType.T2V, WorkloadType.I2V), - hf_model_paths=["kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers"], + hf_model_paths=[ + "kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers", + "kandinskylab/Kandinsky-6.0-Lite-distill-5s-Diffusers", + ], model_detectors=[ _is_kandinsky6_distilled, ], @@ -829,6 +832,7 @@ def _register_configs() -> None: hf_model_paths=[ "kandinskylab/Kandinsky-6.0-Pro-5s-Diffusers", "kandinskylab/Kandinsky-6.0-Pro-sft-5s-Diffusers", + "kandinskylab/Kandinsky-6.0-Lite-5s-Diffusers", ], model_detectors=[ _is_kandinsky6, diff --git a/fastvideo/tests/stages/test_kandinsky6_registry.py b/fastvideo/tests/stages/test_kandinsky6_registry.py index 4dfd6c809..b81383421 100644 --- a/fastvideo/tests/stages/test_kandinsky6_registry.py +++ b/fastvideo/tests/stages/test_kandinsky6_registry.py @@ -1,5 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -"""Registry routing and presets of the Kandinsky6 TI2VA checkpoints: base (Pro-sft) and pi-Flow distilled (Pro-distill). +"""Registry routing and presets of the Kandinsky6 TI2VA checkpoints: base and pi-Flow distilled, Pro and Lite sizes. Both official Diffusers repos declare the same model_index ``_class_name`` (``Kandinsky6TI2VAPipeline``), so they are told apart by repo id or directory name, laid out like the LTX-2 distilled/base pair: the distilled entry is registered @@ -28,6 +28,8 @@ from fastvideo.pipelines.basic.kandinsky6.presets import ( BASE_ID = "kandinskylab/Kandinsky-6.0-Pro-5s-Diffusers" OLD_BASE_ID = "kandinskylab/Kandinsky-6.0-Pro-sft-5s-Diffusers" DISTILLED_ID = "kandinskylab/Kandinsky-6.0-Pro-distill-5s-Diffusers" +LITE_ID = "kandinskylab/Kandinsky-6.0-Lite-5s-Diffusers" +LITE_DISTILLED_ID = "kandinskylab/Kandinsky-6.0-Lite-distill-5s-Diffusers" BASE_PRESET = "kandinsky6_ti2va" DISTILLED_PRESET = "kandinsky6_ti2va_distilled" @@ -48,7 +50,8 @@ def _matching_presets(text: str) -> set[str]: @pytest.mark.parametrize("repo_id,preset", [(BASE_ID, BASE_PRESET), (OLD_BASE_ID, BASE_PRESET), - (DISTILLED_ID, DISTILLED_PRESET)]) + (DISTILLED_ID, DISTILLED_PRESET), (LITE_ID, BASE_PRESET), + (LITE_DISTILLED_ID, DISTILLED_PRESET)]) def test_official_repo_ids_resolve_to_their_presets(repo_id, preset): assert repo_id in registry.get_registered_model_paths() assert registry.get_pipeline_config_cls_from_name(repo_id) is Kandinsky6TI2VAConfig @@ -60,7 +63,7 @@ def test_official_repo_ids_resolve_to_their_presets(repo_id, preset): assert info.workload_types == (WorkloadType.T2V, WorkloadType.I2V) -@pytest.mark.parametrize("repo_id", [BASE_ID, DISTILLED_ID]) +@pytest.mark.parametrize("repo_id", [BASE_ID, DISTILLED_ID, LITE_ID, LITE_DISTILLED_ID]) def test_get_model_info_resolves_both_repo_ids_to_the_ti2va_pipeline(monkeypatch, repo_id): model_index = {"_class_name": "Kandinsky6TI2VAPipeline", "_diffusers_version": "0.41.0.dev0"} monkeypatch.setattr(registry, "maybe_download_model_index", lambda *_args, **_kwargs: model_index) @@ -71,13 +74,15 @@ def test_get_model_info_resolves_both_repo_ids_to_the_ti2va_pipeline(monkeypatch def test_registered_model_listing_offers_both_repo_ids_for_text_and_image_workloads(): listed = {model["id"]: model["workload_types"] for model in registry.get_registered_models_with_workloads()} - assert listed[BASE_ID] == listed[DISTILLED_ID] == ["t2v", "i2v"] + assert listed[BASE_ID] == listed[DISTILLED_ID] == listed[LITE_ID] == listed[LITE_DISTILLED_ID] == ["t2v", "i2v"] @pytest.mark.parametrize("name,preset", [ ("Kandinsky-6.0-Pro-5s-Diffusers", BASE_PRESET), ("Kandinsky-6.0-Pro-sft-5s-Diffusers", BASE_PRESET), ("Kandinsky-6.0-Pro-distill-5s-Diffusers", DISTILLED_PRESET), + ("Kandinsky-6.0-Lite-5s-Diffusers", BASE_PRESET), + ("Kandinsky-6.0-Lite-distill-5s-Diffusers", DISTILLED_PRESET), ("kandinsky6-distilled-export", DISTILLED_PRESET), ("kandinsky6-export", BASE_PRESET), ("my_export", BASE_PRESET), @@ -102,6 +107,8 @@ def test_distill_in_a_parent_directory_does_not_make_a_base_checkpoint_distilled ("/models/kandinsky6-distilled-export", {DISTILLED_PRESET}), ("/models/kandinsky6-distilled-export/", {DISTILLED_PRESET}), ("kandinsky-6.0-pro-sft-5s-diffusers", {BASE_PRESET}), + ("kandinsky-6.0-lite-5s-diffusers", {BASE_PRESET}), + ("kandinsky-6.0-lite-distill-5s-diffusers", {DISTILLED_PRESET}), ("kandinsky6ti2vapipeline", {BASE_PRESET}), ("/distill_experiments/kandinsky6-export", {BASE_PRESET}), ]) @@ -141,7 +148,8 @@ def test_denoise_stage_overrides_accept_steps_and_guidance(preset): validate_preset_selection(preset, "kandinsky6", stage_overrides=overrides) -@pytest.mark.parametrize("repo_id,steps,guidance", [(BASE_ID, 50, 5.0), (DISTILLED_ID, 10, 1.0)]) +@pytest.mark.parametrize("repo_id,steps,guidance", [(BASE_ID, 50, 5.0), (DISTILLED_ID, 10, 1.0), (LITE_ID, 50, 5.0), + (LITE_DISTILLED_ID, 10, 1.0)]) def test_sampling_param_defaults_follow_the_repo_id(repo_id, steps, guidance): sampling_param = SamplingParam.from_pretrained(repo_id) assert (sampling_param.num_inference_steps, sampling_param.guidance_scale) == (steps, guidance) diff --git a/tests/local_tests/test_cookbook_serving.py b/tests/local_tests/test_cookbook_serving.py index f90b17c9d..a2ff32014 100644 --- a/tests/local_tests/test_cookbook_serving.py +++ b/tests/local_tests/test_cookbook_serving.py @@ -265,9 +265,12 @@ def test_kandinsky6_cookbook_recipes_match_maintained_examples(): assert [recipe["id"] for recipe in family] == [ "kandinsky6-ti2va-base", "kandinsky6-ti2va-piflow", + "kandinsky6-ti2va-lite", + "kandinsky6-ti2va-lite-piflow", "kandinsky6-vsr", "kandinsky6-vsr-distilled", ] + by_id = {recipe["id"]: recipe for recipe in family} assert all((ROOT / recipe["source"]).is_file() for recipe in family) assert all(recipe["evidence"] == "Source-backed" for recipe in family) assert all(recipe["hardware"] == { @@ -277,10 +280,14 @@ def test_kandinsky6_cookbook_recipes_match_maintained_examples(): } for recipe in family) assert all("accelerator" not in recipe["hardware"] and "peak_memory" not in recipe["hardware"] for recipe in family) - assert family[1]["model"].endswith("Pro-distill-5s-Diffusers") - # The distilled recipe reruns the shared example with KANDINSKY6_MODEL_PATH; the repo id selects the 10-step preset. - assert family[1]["command"].startswith("KANDINSKY6_MODEL_PATH=" + family[1]["model"] + " ") - assert "KANDINSKY6_MODEL_PATH" in (ROOT / family[1]["source"]).read_text() - assert all("INPUT_VIDEO" in recipe["command"] for recipe in family[2:]) - assert "VSR-distilled2steps" in family[3]["command"] + # The distilled and Lite recipes rerun the shared example with KANDINSKY6_MODEL_PATH; the repo id selects the preset. + for recipe_id, suffix in [("kandinsky6-ti2va-piflow", "Pro-distill-5s-Diffusers"), + ("kandinsky6-ti2va-lite", "Lite-5s-Diffusers"), + ("kandinsky6-ti2va-lite-piflow", "Lite-distill-5s-Diffusers")]: + recipe = by_id[recipe_id] + assert recipe["model"].endswith(suffix) + assert recipe["command"].startswith("KANDINSKY6_MODEL_PATH=" + recipe["model"] + " ") + assert "KANDINSKY6_MODEL_PATH" in (ROOT / by_id["kandinsky6-ti2va-piflow"]["source"]).read_text() + assert all("INPUT_VIDEO" in by_id[recipe_id]["command"] for recipe_id in ("kandinsky6-vsr", "kandinsky6-vsr-distilled")) + assert "VSR-distilled2steps" in by_id["kandinsky6-vsr-distilled"]["command"] validate_cookbook()