[feat]: Kandinsky 6 Lite: register the 3.2B checkpoints and add docs + cookbook recipes (#1927)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Cosmos recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="cosmos" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="cosmos" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# FLUX recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="flux" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="flux" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# GLM-Image recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="glm_image" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="glm_image" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Hunyuan recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="hunyuan" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="hunyuan" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Kandinsky 5 recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="kandinsky5" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="kandinsky5" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Kandinsky 6 recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="kandinsky6" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="kandinsky6" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
@@ -15,7 +15,7 @@ hide:
|
||||
<div>
|
||||
<p class="cookbook-eyebrow">Maintained family · Inference</p>
|
||||
<h2>Kandinsky 6 inference recipes</h2>
|
||||
<p>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.</p>
|
||||
<p>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.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cookbook-lifecycle" aria-label="Lifecycle stages">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# LongCat recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="longcat" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="longcat" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# LTX recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="ltx2" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="ltx2" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Matrix Game recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="matrixgame" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="matrixgame" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -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.
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="minimax_h3" data-default-recipe="fasth3-preview-cuda" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="minimax_h3" data-default-recipe="fasth3-preview-cuda" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# MMAudio recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="mmaudio" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="mmaudio" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Stable Audio recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="stable_audio" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="stable_audio" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Stable Diffusion recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="sd35" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="sd35" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# TurboDiffusion recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="turbodiffusion" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="turbodiffusion" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Wan recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="wan" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="wan" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -5,7 +5,7 @@ hide:
|
||||
|
||||
# Z-Image recipes
|
||||
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="zimage" data-recipes="../../assets/cookbook-recipes.json?v=14">
|
||||
<div class="cookbook-shell cookbook-family-page" data-cookbook data-family="zimage" data-recipes="../../assets/cookbook-recipes.json?v=15">
|
||||
<header class="cookbook-family-header">
|
||||
<a class="cookbook-back-link" href="../"><span aria-hidden="true">←</span> All model families</a>
|
||||
<div class="cookbook-family-header__body">
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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`<br>`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`<br>`kandinskylab/Kandinsky-6.0-Pro-sft-5s-Diffusers`<br>`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`<br>`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`<br>`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)).
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user