From d26aa6b2d758ebd3fcba6731c1da3001e4ac5473 Mon Sep 17 00:00:00 2001 From: Davids048 Date: Fri, 2 Oct 2026 19:21:25 +0000 Subject: [PATCH] [refactor]: fill unset typed fields from the model's PipelineConfig during resolution The resolution step fill_pipeline_config_defaults[] fills each typed field that is still None with the value that the model's PipelineConfig holds for the field's flat name. That PipelineConfig is the one flattening starts from: the registry class for model_path, plus a pipeline config file or object when one is given. The covered fields are the engine.precision fields, pipeline.vae_sp, flow_shift, embedded_cfg_scale, dmd_denoising_steps, and the pipeline.longcat BSA settings. The resolved config therefore holds the effective value of these fields, and provenance tells a model default apart from user input. The step runs after the environment steps and before the derived values, so the precedence is user input, then environment variables, then model defaults. inference_resolution_steps(config) builds the ordered step list. The values that the step fills are the values that PipelineConfig already had, so FastVideoArgs and PipelineConfig are unchanged; the golden snapshots add the decisions. Tests that flatten unregistered model paths skip this step. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012M91wnVFmPEvJ9h39r5BH7 --- fastvideo/api/inference_resolution.py | 55 ++++++++++++++++--- .../attention_precision_and_flow_shift.json | 13 +++++ .../kwargs/boundary_ratio.json | 21 +++++++ .../kwargs/disable_autocast.json | 15 +++++ .../kwargs/keys_without_typed_fields.json | 15 +++++ .../kwargs/ltx2_refine_lora_disabled.json | 13 +++++ .../kwargs/ltx2_refine_lora_path.json | 13 +++++ .../kwargs/pipeline_config_json_path.json | 15 +++++ .../torch_compile_kwargs_typed_and_extra.json | 15 +++++ .../kwargs/typed_offload_and_parallelism.json | 15 +++++ .../kwargs/vae_tiling_typed.json | 13 +++++ ...e__serve_configs__streaming_demo.yaml.json | 13 +++++ ...rence__ltx2_3__i2v_5s2_1024x1536.yaml.json | 13 +++++ ...erence__ltx2_3__i2v_5s2_1280x832.yaml.json | 13 +++++ ...ference__ltx2_3__i2v_5s2_512x768.yaml.json | 13 +++++ ...erence__ltx2_3__i2v_5s2_768x1280.yaml.json | 13 +++++ ...rence__ltx2_3__i2v_8s3_1024x1536.yaml.json | 13 +++++ ...erence__ltx2_3__i2v_8s3_1280x832.yaml.json | 13 +++++ ...ference__ltx2_3__i2v_8s3_512x768.yaml.json | 13 +++++ ...erence__ltx2_3__i2v_8s3_768x1280.yaml.json | 13 +++++ ...rence__ltx2_3__t2v_5s2_1024x1536.yaml.json | 13 +++++ ...erence__ltx2_3__t2v_5s2_1280x832.yaml.json | 13 +++++ ...ference__ltx2_3__t2v_5s2_512x768.yaml.json | 13 +++++ ...erence__ltx2_3__t2v_5s2_768x1280.yaml.json | 13 +++++ ...rence__ltx2_3__t2v_8s3_1024x1536.yaml.json | 13 +++++ ...erence__ltx2_3__t2v_8s3_1280x832.yaml.json | 13 +++++ ...ference__ltx2_3__t2v_8s3_512x768.yaml.json | 13 +++++ ...erence__ltx2_3__t2v_8s3_768x1280.yaml.json | 13 +++++ ...examples__serving__openai_fasth3.yaml.json | 12 ++++ ...es__serving__openai_fasth3_8step.yaml.json | 12 ++++ ...les__serving__openai_fasth3_lora.yaml.json | 12 ++++ ...__serving__openai_fastwan21_1_3b.yaml.json | 15 +++++ ...s__serving__openai_wan21_i2v_14b.yaml.json | 14 +++++ ...__serving__openai_wan22_t2v_a14b.yaml.json | 21 +++++++ ...s__serving__openai_wan22_ti2v_5b.yaml.json | 15 +++++ ...xamples__serving__streaming_demo.yaml.json | 13 +++++ ...inference__inference_fasthunyuan.yaml.json | 13 +++++ ...inference__inference_flux2_klein.yaml.json | 12 ++++ ...ts__inference__inference_hunyuan.yaml.json | 13 +++++ ...ts__inference__inference_longcat.yaml.json | 13 +++++ ...rence__inference_longcat_distill.yaml.json | 13 +++++ ...inference__inference_longcat_i2v.yaml.json | 13 +++++ ...ference_longcat_refine_fromvideo.yaml.json | 13 +++++ ..._inference__inference_longcat_vc.yaml.json | 13 +++++ ...cripts__inference__inference_wan.yaml.json | 14 +++++ ...erence__inference_wan_1.3B_VMoba.yaml.json | 14 +++++ ...ts__inference__inference_wan_VSA.yaml.json | 14 +++++ ...__inference_wan_VSA_DMD_14B_480P.yaml.json | 15 +++++ ...__inference_wan_VSA_DMD_14B_720P.yaml.json | 15 +++++ ...ence__inference_wan_VSA_DMD_1_3B.yaml.json | 15 +++++ ...e__inference_wan_VSA_DMD_5B_720P.yaml.json | 15 +++++ ...ts__inference__inference_wan_i2v.yaml.json | 14 +++++ .../tests/api/test_compat_translation.py | 8 ++- .../api/test_inference_resolution_steps.py | 41 ++++++++++++++ .../api/test_ltx2_gpu_pool_translation.py | 3 + .../tests/entrypoints/test_video_generator.py | 3 + 56 files changed, 803 insertions(+), 9 deletions(-) diff --git a/fastvideo/api/inference_resolution.py b/fastvideo/api/inference_resolution.py index e726a1d7b..d1f33e461 100644 --- a/fastvideo/api/inference_resolution.py +++ b/fastvideo/api/inference_resolution.py @@ -1,14 +1,16 @@ # SPDX-License-Identifier: Apache-2.0 """Resolution of an inference ``GeneratorConfig`` into the frozen values that the run starts with. -``resolve_inference_config`` runs ``INFERENCE_RESOLUTION_STEPS`` in order through +``resolve_inference_config`` runs the steps from ``inference_resolution_steps`` in order through :func:`fastvideo.api.resolution.resolve_generator_config`, so every value that a step decides is recorded with the step's name. ``generator_config_to_fastvideo_args`` flattens the resolved values into ``FastVideoArgs``. -The steps run in this order, so an earlier step takes precedence over a later one that fills the same field: +The steps run in this order. A fill step sets a field only while it is ``None``, so an earlier step takes +precedence over a later one: user input, then environment variables, then model defaults. 1. Environment variables fill typed fields. -2. Derived values replace placeholders. +2. Model defaults from the model's ``PipelineConfig`` fill the typed fields that are still unset. +3. Derived values replace placeholders. ``FastVideoArgs.__post_init__`` and ``check_fastvideo_args`` still apply the same rules to a ``FastVideoArgs`` that is built directly; for a resolved config they find the values already decided and change nothing. @@ -16,10 +18,12 @@ is built directly; for a resolved config they find the values already decided an from __future__ import annotations from collections.abc import Mapping +from copy import deepcopy from dataclasses import fields, is_dataclass from typing import Any import fastvideo.envs as envs +from fastvideo.api.parser import parse_config from fastvideo.api.resolution import ResolutionStep, ResolutionView, ResolvedGeneratorConfig, resolve_generator_config from fastvideo.api.schema import GeneratorConfig @@ -61,6 +65,36 @@ def fill_vae_parallel_from_env(view: ResolutionView) -> dict[str, Any]: return values +def pipeline_config_defaults_step(config: GeneratorConfig) -> ResolutionStep: + """Build the step that fills unset typed fields with the values of the model's ``PipelineConfig``. + + The ``PipelineConfig`` is the one that flattening starts from: the registry class for ``model_path``, updated + by a ``pipeline_config`` entry in ``pipeline.experimental`` or else by ``pipeline.components.pipeline_config_path``. + A typed field is filled when its flat name is an attribute of that ``PipelineConfig``, its value is ``None``, + and the attribute is not ``None``. The step's source name carries the ``PipelineConfig`` class name. + """ + from fastvideo.api.compat import _FLAT_NAME_FIELDS + from fastvideo.configs.pipelines.base import PipelineConfig + + pipeline_config_source = config.pipeline.experimental.get("pipeline_config", + config.pipeline.components.pipeline_config_path) + kwargs: dict[str, Any] = {"model_path": config.model_path} + if pipeline_config_source is not None: + kwargs["pipeline_config"] = deepcopy(pipeline_config_source) + defaults = PipelineConfig.from_kwargs(kwargs) + + def fill_pipeline_config_defaults(view: ResolutionView) -> dict[str, Any]: + values: dict[str, Any] = {} + for flat_name, (dotted_path, _) in _FLAT_NAME_FIELDS.items(): + default = getattr(defaults, flat_name, None) + if default is not None and view.get(dotted_path) is None: + values[dotted_path] = deepcopy(default) + return values + + fill_pipeline_config_defaults.__qualname__ = f"fill_pipeline_config_defaults[{type(defaults).__name__}]" + return fill_pipeline_config_defaults + + def derive_parallel_sizes(view: ResolutionView) -> dict[str, Any]: """Replace the -1 placeholders: ``tp_size`` becomes 1, and ``sp_size`` and ``hsdp_shard_dim`` become ``num_gpus``.""" num_gpus = view.get("engine.num_gpus") @@ -72,14 +106,18 @@ def derive_parallel_sizes(view: ResolutionView) -> dict[str, Any]: return {path: value for path, value in placeholders.items() if view.get(path) == -1} -INFERENCE_RESOLUTION_STEPS: tuple[ResolutionStep, ...] = ( +ENVIRONMENT_STEPS: tuple[ResolutionStep, ...] = ( fill_attention_backend_from_env, fill_regional_compile_from_env, fill_vae_parallel_from_env, - derive_parallel_sizes, ) +def inference_resolution_steps(config: GeneratorConfig) -> tuple[ResolutionStep, ...]: + """The resolution steps for ``config``, in the order that they run.""" + return (*ENVIRONMENT_STEPS, pipeline_config_defaults_step(config), derive_parallel_sizes) + + def resolve_inference_config(config: GeneratorConfig | Mapping[str, Any]) -> ResolvedGeneratorConfig: """Resolve an inference config and freeze the result. @@ -88,7 +126,8 @@ def resolve_inference_config(config: GeneratorConfig | Mapping[str, Any]) -> Res schema defaults count as written. """ raw = config if isinstance(config, Mapping) else written_fields(config) - return resolve_generator_config(raw, INFERENCE_RESOLUTION_STEPS) + typed_config = config if isinstance(config, GeneratorConfig) else parse_config(GeneratorConfig, config) + return resolve_generator_config(raw, inference_resolution_steps(typed_config)) def written_fields(config: GeneratorConfig) -> dict[str, Any]: @@ -125,11 +164,13 @@ def _non_default_fields(value: Any, default: Any) -> dict[str, Any]: __all__ = [ - "INFERENCE_RESOLUTION_STEPS", + "ENVIRONMENT_STEPS", "derive_parallel_sizes", "fill_attention_backend_from_env", "fill_regional_compile_from_env", "fill_vae_parallel_from_env", + "inference_resolution_steps", + "pipeline_config_defaults_step", "resolve_inference_config", "written_fields", ] diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/attention_precision_and_flow_shift.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/attention_precision_and_flow_shift.json index 3a31045aa..9e1a8b489 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/attention_precision_and_flow_shift.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/attention_precision_and_flow_shift.json @@ -379,6 +379,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V480PConfig]", + { + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/boundary_ratio.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/boundary_ratio.json index cb9a87d33..c8614f8e1 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/boundary_ratio.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/boundary_ratio.json @@ -384,6 +384,27 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[Wan2_2_T2V_A14B_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.dmd_denoising_steps": [ + 1000, + 750, + 500, + 250 + ], + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 12.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/disable_autocast.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/disable_autocast.json index 314225ab7..cfcb8bb69 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/disable_autocast.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/disable_autocast.json @@ -379,6 +379,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 3.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/keys_without_typed_fields.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/keys_without_typed_fields.json index bbed8fa48..59272f468 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/keys_without_typed_fields.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/keys_without_typed_fields.json @@ -379,6 +379,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 3.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_disabled.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_disabled.json index 846b75301..e70dc3413 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_disabled.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_disabled.json @@ -360,6 +360,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_path.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_path.json index f2446f5dd..7f3cb102e 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_path.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/ltx2_refine_lora_path.json @@ -360,6 +360,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/pipeline_config_json_path.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/pipeline_config_json_path.json index 09794b14e..1576a8ddb 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/pipeline_config_json_path.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/pipeline_config_json_path.json @@ -407,6 +407,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[FastHunyuanConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp16", + "fp16" + ], + "engine.precision.vae": "fp32", + "pipeline.embedded_cfg_scale": 6, + "pipeline.flow_shift": 17, + "pipeline.vae_sp": true + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/torch_compile_kwargs_typed_and_extra.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/torch_compile_kwargs_typed_and_extra.json index 9bc0894a2..f11b9c881 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/torch_compile_kwargs_typed_and_extra.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/torch_compile_kwargs_typed_and_extra.json @@ -386,6 +386,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 3.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/typed_offload_and_parallelism.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/typed_offload_and_parallelism.json index a47d30d1a..8513bc592 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/typed_offload_and_parallelism.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/typed_offload_and_parallelism.json @@ -379,6 +379,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 3.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/vae_tiling_typed.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/vae_tiling_typed.json index 9648681cd..dfb133bcf 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/kwargs/vae_tiling_typed.json +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/vae_tiling_typed.json @@ -360,6 +360,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/apps__dreamverse__serve_configs__streaming_demo.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/apps__dreamverse__serve_configs__streaming_demo.yaml.json index a713cb44a..1c56d2c8d 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/apps__dreamverse__serve_configs__streaming_demo.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/apps__dreamverse__serve_configs__streaming_demo.yaml.json @@ -377,6 +377,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1024x1536.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1024x1536.yaml.json index 739b08551..c4f57c759 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1024x1536.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1024x1536.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1280x832.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1280x832.yaml.json index e611b1cc7..600600226 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1280x832.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_1280x832.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_512x768.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_512x768.yaml.json index 30382d9ee..3b00255e8 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_512x768.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_512x768.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_768x1280.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_768x1280.yaml.json index 1e2955609..c554250d9 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_768x1280.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_5s2_768x1280.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1024x1536.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1024x1536.yaml.json index a137b6d4b..5aee67771 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1024x1536.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1024x1536.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1280x832.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1280x832.yaml.json index 2b0146640..141522841 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1280x832.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_1280x832.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_512x768.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_512x768.yaml.json index 264dfdac3..8dac77c8b 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_512x768.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_512x768.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_768x1280.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_768x1280.yaml.json index b40038552..3d6b79fb0 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_768x1280.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__i2v_8s3_768x1280.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1024x1536.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1024x1536.yaml.json index 430cee95a..1bc4bfc40 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1024x1536.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1024x1536.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1280x832.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1280x832.yaml.json index 58be6c0f4..7c3efe2ae 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1280x832.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_1280x832.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_512x768.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_512x768.yaml.json index 6bef40fe9..9fff3e3a3 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_512x768.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_512x768.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_768x1280.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_768x1280.yaml.json index 93f124a59..b58333088 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_768x1280.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_5s2_768x1280.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1024x1536.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1024x1536.yaml.json index 9e21c63a6..c712c2d76 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1024x1536.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1024x1536.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1280x832.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1280x832.yaml.json index 5fa3c33d2..01b508a60 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1280x832.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_1280x832.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_512x768.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_512x768.yaml.json index 5421eced5..df120987c 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_512x768.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_512x768.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_768x1280.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_768x1280.yaml.json index be8e3ac44..4bab0a3b7 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_768x1280.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__inference__ltx2_3__t2v_8s3_768x1280.yaml.json @@ -362,6 +362,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3.yaml.json index 951614dac..3f4f9d0f4 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3.yaml.json @@ -486,6 +486,18 @@ "request_batch_extra": {}, "request_pipeline_overrides": {}, "resolution_decisions": [ + [ + "fill_pipeline_config_defaults[MiniMaxH3PipelineConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "fp32", + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_8step.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_8step.yaml.json index 8b56d6f2b..693468f65 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_8step.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_8step.yaml.json @@ -486,6 +486,18 @@ "request_batch_extra": {}, "request_pipeline_overrides": {}, "resolution_decisions": [ + [ + "fill_pipeline_config_defaults[MiniMaxH3PipelineConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "fp32", + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_lora.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_lora.yaml.json index 0c2e76c46..1dde803ed 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_lora.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fasth3_lora.yaml.json @@ -486,6 +486,18 @@ "request_batch_extra": {}, "request_pipeline_overrides": {}, "resolution_decisions": [ + [ + "fill_pipeline_config_defaults[MiniMaxH3PipelineConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "fp32", + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fastwan21_1_3b.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fastwan21_1_3b.yaml.json index ef183900d..54314fbf7 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fastwan21_1_3b.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_fastwan21_1_3b.yaml.json @@ -385,6 +385,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[FastWan2_1_T2V_480P_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 8.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan21_i2v_14b.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan21_i2v_14b.yaml.json index 5e9abf5f9..19d7a9fdc 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan21_i2v_14b.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan21_i2v_14b.yaml.json @@ -415,6 +415,20 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanI2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_t2v_a14b.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_t2v_a14b.yaml.json index 16a5d4102..0c39be93b 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_t2v_a14b.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_t2v_a14b.yaml.json @@ -386,6 +386,27 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[Wan2_2_T2V_A14B_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.dmd_denoising_steps": [ + 1000, + 750, + 500, + 250 + ], + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 12.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_ti2v_5b.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_ti2v_5b.yaml.json index 78b770796..1fb1c1e15 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_ti2v_5b.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__openai_wan22_ti2v_5b.yaml.json @@ -382,6 +382,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[Wan2_2_TI2V_5B_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 5.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__streaming_demo.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__streaming_demo.yaml.json index a713cb44a..1c56d2c8d 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__streaming_demo.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/examples__serving__streaming_demo.yaml.json @@ -377,6 +377,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LTX2T2VConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_fasthunyuan.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_fasthunyuan.yaml.json index 1360a607a..21501b014 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_fasthunyuan.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_fasthunyuan.yaml.json @@ -409,6 +409,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[FastHunyuanConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp16", + "fp16" + ], + "engine.precision.vae": "fp16", + "pipeline.vae_sp": true + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_flux2_klein.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_flux2_klein.yaml.json index 5307e0dcb..a0b660282 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_flux2_klein.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_flux2_klein.yaml.json @@ -349,6 +349,18 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[Flux2KleinPipelineConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "fp32", + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_hunyuan.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_hunyuan.yaml.json index 131a09a2a..453607d2f 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_hunyuan.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_hunyuan.yaml.json @@ -409,6 +409,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[HunyuanConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp16", + "fp16" + ], + "engine.precision.vae": "fp16", + "pipeline.vae_sp": true + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat.yaml.json index a44b695db..73b80a018 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat.yaml.json @@ -381,6 +381,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LongCatT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_distill.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_distill.yaml.json index 604fd1811..297323a88 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_distill.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_distill.yaml.json @@ -381,6 +381,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LongCatT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_i2v.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_i2v.yaml.json index 68ad228f2..9ae977848 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_i2v.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_i2v.yaml.json @@ -381,6 +381,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LongCatT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_refine_fromvideo.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_refine_fromvideo.yaml.json index 2c70cc388..97402734a 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_refine_fromvideo.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_refine_fromvideo.yaml.json @@ -389,6 +389,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LongCatT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_vc.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_vc.yaml.json index eb9750d45..24e71b2a7 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_vc.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_longcat_vc.yaml.json @@ -381,6 +381,19 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[LongCatT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "bf16" + ], + "engine.precision.vae": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan.yaml.json index 937b382c4..2cb10e9ca 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan.yaml.json @@ -381,6 +381,20 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_1.3B_VMoba.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_1.3B_VMoba.yaml.json index 13a8bc953..e649c50c9 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_1.3B_VMoba.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_1.3B_VMoba.yaml.json @@ -403,6 +403,20 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA.yaml.json index a4cfe434e..b986a034e 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA.yaml.json @@ -381,6 +381,20 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanT2V720PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_480P.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_480P.yaml.json index 70951449d..7c3e94141 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_480P.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_480P.yaml.json @@ -385,6 +385,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[FastWan2_1_T2V_480P_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 8.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_720P.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_720P.yaml.json index dbabff153..86e414d38 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_720P.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_14B_720P.yaml.json @@ -385,6 +385,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[FastWan2_1_T2V_480P_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 8.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_1_3B.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_1_3B.yaml.json index 1963614d5..701a5ad04 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_1_3B.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_1_3B.yaml.json @@ -385,6 +385,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[FastWan2_1_T2V_480P_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 8.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_5B_720P.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_5B_720P.yaml.json index aace81601..70e5b0e86 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_5B_720P.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_VSA_DMD_5B_720P.yaml.json @@ -386,6 +386,21 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[FastWan2_2_TI2V_5B_Config]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.flow_shift": 5.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_i2v.yaml.json b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_i2v.yaml.json index e818b6ddf..d44e6f1ca 100644 --- a/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_i2v.yaml.json +++ b/fastvideo/tests/api/config_snapshot_goldens/yaml/scripts__inference__inference_wan_i2v.yaml.json @@ -415,6 +415,20 @@ "pipeline.minimax_h3.vae_parallel_decode_strategy": "gather" } ], + [ + "fill_pipeline_config_defaults[WanI2V480PConfig]", + { + "engine.precision.dit": "bf16", + "engine.precision.image_encoder": "fp32", + "engine.precision.text_encoders": [ + "fp32" + ], + "engine.precision.vae": "fp32", + "engine.precision.vae_decode": "bf16", + "pipeline.embedded_cfg_scale": 6.0, + "pipeline.vae_sp": false + } + ], [ "derive_parallel_sizes", { diff --git a/fastvideo/tests/api/test_compat_translation.py b/fastvideo/tests/api/test_compat_translation.py index 2c8002eda..2af59568a 100644 --- a/fastvideo/tests/api/test_compat_translation.py +++ b/fastvideo/tests/api/test_compat_translation.py @@ -192,9 +192,13 @@ def _engine_with_compile(compile_config): def _stub_fastvideo_args_from_kwargs(monkeypatch): - """Swap ``FastVideoArgs.from_kwargs`` for a capture-only stub so - translation tests don't need to construct a valid FastVideoArgs.""" + """Swap ``FastVideoArgs.from_kwargs`` for a capture-only stub, and skip the + model-default resolution step, so translation tests need neither a valid + FastVideoArgs nor a resolvable model path.""" from fastvideo import fastvideo_args as fva + from fastvideo.api import inference_resolution + + monkeypatch.setattr(inference_resolution, "pipeline_config_defaults_step", lambda config: lambda view: {}) class _Captured: diff --git a/fastvideo/tests/api/test_inference_resolution_steps.py b/fastvideo/tests/api/test_inference_resolution_steps.py index 1bf3c2f00..72a0ee4d8 100644 --- a/fastvideo/tests/api/test_inference_resolution_steps.py +++ b/fastvideo/tests/api/test_inference_resolution_steps.py @@ -84,3 +84,44 @@ def test_object_fields_that_differ_from_defaults_are_explicit(): assert resolved.is_explicit("engine.attention.backend") assert not resolved.is_explicit("engine.parallelism.tp_size") assert resolved.engine.attention.backend == "FLASH_ATTN" + + +def test_model_defaults_fill_unset_fields_and_keep_explicit_ones(): + raw = {"model_path": WAN_T2V, "engine": {"precision": {"dit": "fp32"}}} + resolved = _resolve(raw) + + dit = resolved.provenance("engine.precision.dit") + assert (dit.value, dit.source) == ("fp32", "input") + vae = resolved.provenance("engine.precision.vae") + assert vae.value == "fp32" + assert vae.source == "fill_pipeline_config_defaults[WanT2V480PConfig]" + flow_shift = resolved.provenance("pipeline.flow_shift") + assert (flow_shift.raw_value, flow_shift.value) == (None, 3.0) + + +def test_environment_takes_precedence_over_model_defaults(): + from fastvideo.api.inference_resolution import inference_resolution_steps + + names = [step.__qualname__ for step in inference_resolution_steps(GeneratorConfig(model_path=WAN_T2V))] + assert names == [ + "fill_attention_backend_from_env", + "fill_regional_compile_from_env", + "fill_vae_parallel_from_env", + "fill_pipeline_config_defaults[WanT2V480PConfig]", + "derive_parallel_sizes", + ] + + +def test_video_generator_keeps_the_resolved_config(monkeypatch): + from types import SimpleNamespace + + from fastvideo.entrypoints.video_generator import VideoGenerator + + monkeypatch.setattr(VideoGenerator, "from_fastvideo_args", + classmethod(lambda cls, fastvideo_args, log_queue=None: SimpleNamespace(args=fastvideo_args))) + with isolated_environment(): + generator = VideoGenerator.from_config({"model_path": WAN_T2V, "engine": {"num_gpus": 2}}) + + assert generator.args.sp_size == 2 + provenance = generator.resolved_config.provenance("engine.parallelism.sp_size") + assert (provenance.value, provenance.source) == (2, "derive_parallel_sizes") diff --git a/fastvideo/tests/api/test_ltx2_gpu_pool_translation.py b/fastvideo/tests/api/test_ltx2_gpu_pool_translation.py index 2f51a7772..302174589 100644 --- a/fastvideo/tests/api/test_ltx2_gpu_pool_translation.py +++ b/fastvideo/tests/api/test_ltx2_gpu_pool_translation.py @@ -226,6 +226,9 @@ class TestRefineFlattenCoversAllTypedFields: return _Captured(**kw) monkeypatch.setattr(fva.FastVideoArgs, "from_kwargs", _capture) + # The model path is not a registered model, so skip the model-default resolution step. + from fastvideo.api import inference_resolution + monkeypatch.setattr(inference_resolution, "pipeline_config_defaults_step", lambda config: lambda view: {}) refine_payload = { # Preset-override fields. diff --git a/fastvideo/tests/entrypoints/test_video_generator.py b/fastvideo/tests/entrypoints/test_video_generator.py index e446b4389..5baf94a5e 100644 --- a/fastvideo/tests/entrypoints/test_video_generator.py +++ b/fastvideo/tests/entrypoints/test_video_generator.py @@ -85,6 +85,9 @@ def _patch_fastvideo_args_from_kwargs(monkeypatch): "fastvideo.api.compat.FastVideoArgs.from_kwargs", classmethod(fake_from_kwargs), ) + # "test-model" is not a registered model, so skip the model-default resolution step. + monkeypatch.setattr("fastvideo.api.inference_resolution.pipeline_config_defaults_step", + lambda config: lambda view: {}) return captured