diff --git a/apps/dreamverse/dreamverse/minimax_h3_generation.py b/apps/dreamverse/dreamverse/minimax_h3_generation.py index 6c99b40b7..427600d4c 100644 --- a/apps/dreamverse/dreamverse/minimax_h3_generation.py +++ b/apps/dreamverse/dreamverse/minimax_h3_generation.py @@ -79,32 +79,24 @@ class MiniMaxH3GenerationBackend: from fastvideo import VideoGenerator from fastvideo.api import ( + AttentionConfig, CompileConfig, ComponentConfig, EngineConfig, GeneratorConfig, + MiniMaxH3Config, OffloadConfig, ParallelismConfig, PipelineSelection, ) adapter_path = hf_hub_download(repo_id=adapter_repo, filename=adapter_filename) - experimental = { - "attention_backend": attention_backend, - "inference_torch_compile": attention_backend == "FLASH_ATTN", - "vae_parallel_decode": True, - "vae_parallel_decode_strategy": "gather", - } - if attention_backend == "VIDEO_SPARSE_ATTN_H3": - experimental.update({ - "VSA_sparsity": 0.9, - "VSA_tile_size": 64, - }) + use_vsa = attention_backend == "VIDEO_SPARSE_ATTN_H3" generator_config = GeneratorConfig( model_path=model_path, pipeline=PipelineSelection( components=ComponentConfig(lora_path=adapter_path, lora_strength=1.0), - experimental=experimental, + minimax_h3=MiniMaxH3Config(vae_parallel_decode=True, vae_parallel_decode_strategy="gather"), ), engine=EngineConfig( num_gpus=DREAMVERSE_SP_SIZE, @@ -117,7 +109,12 @@ class MiniMaxH3GenerationBackend: vae=True, pin_cpu_memory=True, ), - compile=CompileConfig(enabled=False, vae_enabled=True), + compile=CompileConfig(enabled=False, vae_enabled=True, regional=attention_backend == "FLASH_ATTN"), + attention=AttentionConfig( + backend=attention_backend, + vsa_sparsity=0.9 if use_vsa else None, + vsa_tile_size=64 if use_vsa else None, + ), use_fsdp_inference=False, ), ) diff --git a/apps/dreamverse/dreamverse/tests/test_minimax_h3_generation.py b/apps/dreamverse/dreamverse/tests/test_minimax_h3_generation.py index c8d77c86e..c01385a3f 100644 --- a/apps/dreamverse/dreamverse/tests/test_minimax_h3_generation.py +++ b/apps/dreamverse/dreamverse/tests/test_minimax_h3_generation.py @@ -88,14 +88,13 @@ def test_initialize_builds_vsa_datafree_fasth3_generator(monkeypatch): assert config.model_path == "MiniMaxAI/MiniMax-H3" assert config.pipeline.components.lora_path.endswith("vsa-datafree/adapter_model.safetensors") assert config.pipeline.components.lora_strength == 1.0 - assert config.pipeline.experimental == { - "attention_backend": "VIDEO_SPARSE_ATTN_H3", - "inference_torch_compile": False, - "vae_parallel_decode": True, - "vae_parallel_decode_strategy": "gather", - "VSA_sparsity": 0.9, - "VSA_tile_size": 64, - } + assert config.pipeline.experimental == {} + assert config.engine.attention.backend == "VIDEO_SPARSE_ATTN_H3" + assert config.engine.attention.vsa_sparsity == 0.9 + assert config.engine.attention.vsa_tile_size == 64 + assert config.engine.compile.regional is False + assert config.pipeline.minimax_h3.vae_parallel_decode is True + assert config.pipeline.minimax_h3.vae_parallel_decode_strategy == "gather" assert config.engine.num_gpus == 4 assert config.engine.parallelism.tp_size == 1 assert config.engine.parallelism.sp_size == 4 diff --git a/examples/inference/basic/basic_dmd_new_api.py b/examples/inference/basic/basic_dmd_new_api.py index eb319fad4..fea714c6e 100644 --- a/examples/inference/basic/basic_dmd_new_api.py +++ b/examples/inference/basic/basic_dmd_new_api.py @@ -3,12 +3,12 @@ import time from fastvideo import VideoGenerator from fastvideo.api import ( + AttentionConfig, EngineConfig, GenerationRequest, GeneratorConfig, OffloadConfig, OutputConfig, - PipelineSelection, ) OUTPUT_PATH = "video_samples_dmd2_typed" @@ -29,12 +29,8 @@ def main(): dit=False, vae=False, ), + attention=AttentionConfig(vsa_sparsity=0.8), ), - # PR 2 still routes a few advanced inference knobs through the - # compatibility bridge until they get first-class typed fields. - pipeline=PipelineSelection(experimental={ - "VSA_sparsity": 0.8, - }, ), ) load_start_time = time.perf_counter() diff --git a/examples/inference/basic/basic_fasth3.py b/examples/inference/basic/basic_fasth3.py index 02f1e918b..eb8bf81ba 100644 --- a/examples/inference/basic/basic_fasth3.py +++ b/examples/inference/basic/basic_fasth3.py @@ -25,11 +25,13 @@ from pathlib import Path from fastvideo import VideoGenerator from fastvideo.api import ( + AttentionConfig, CompileConfig, ComponentConfig, EngineConfig, GenerationRequest, GeneratorConfig, + MiniMaxH3Config, OffloadConfig, OutputConfig, ParallelismConfig, @@ -254,23 +256,6 @@ def _execution_backend(args: argparse.Namespace) -> str: def build_generator_config(args: argparse.Namespace) -> GeneratorConfig: use_vsa = _uses_vsa(args) - experimental: dict[str, object] = { - "attention_backend": "VIDEO_SPARSE_ATTN_H3" if use_vsa else "FLASH_ATTN", - "inference_torch_compile": args.inference_torch_compile, - "vae_parallel_decode": args.parallel_vae, - "vae_parallel_decode_strategy": "gather", - } - if args.h3_sequential_load is not None: - experimental["h3_sequential_load"] = args.h3_sequential_load - if args.video_decode_backend != "h3-vae": - experimental["video_decode_backend"] = args.video_decode_backend - if args.taeh3_checkpoint is not None: - experimental["taeh3_checkpoint"] = args.taeh3_checkpoint - if use_vsa: - experimental.update({ - "VSA_sparsity": args.vsa_sparsity, - "VSA_tile_size": args.vsa_tile_size, - }) return GeneratorConfig( model_path=args.model_path, pipeline=PipelineSelection( @@ -278,7 +263,13 @@ def build_generator_config(args: argparse.Namespace) -> GeneratorConfig: lora_path=getattr(args, "lora_path", None), lora_strength=float(getattr(args, "lora_strength", 1.0)), ), - experimental=experimental, + minimax_h3=MiniMaxH3Config( + sequential_load=args.h3_sequential_load, + video_decode_backend=None if args.video_decode_backend == "h3-vae" else args.video_decode_backend, + taeh3_checkpoint=args.taeh3_checkpoint, + vae_parallel_decode=args.parallel_vae, + vae_parallel_decode_strategy="gather", + ), ), engine=EngineConfig( num_gpus=args.num_gpus, @@ -297,6 +288,12 @@ def build_generator_config(args: argparse.Namespace) -> GeneratorConfig: enabled=args.torch_compile, mode=args.compile_mode, vae_enabled=args.compile_vae, + regional=args.inference_torch_compile, + ), + attention=AttentionConfig( + backend="VIDEO_SPARSE_ATTN_H3" if use_vsa else "FLASH_ATTN", + vsa_sparsity=args.vsa_sparsity if use_vsa else None, + vsa_tile_size=args.vsa_tile_size if use_vsa else None, ), ), ) diff --git a/examples/inference/basic/basic_fasth3_simplified.py b/examples/inference/basic/basic_fasth3_simplified.py index b53bd655c..0bd565a39 100644 --- a/examples/inference/basic/basic_fasth3_simplified.py +++ b/examples/inference/basic/basic_fasth3_simplified.py @@ -17,11 +17,13 @@ sys.path.insert(0, str(FASTVIDEO_ROOT)) from fastvideo import VideoGenerator # noqa: E402 from fastvideo.api import ( # noqa: E402 + AttentionConfig, CompileConfig, ComponentConfig, EngineConfig, GenerationRequest, GeneratorConfig, + MiniMaxH3Config, OffloadConfig, OutputConfig, ParallelismConfig, @@ -57,17 +59,7 @@ def main() -> None: args = parse_args() attention_backend = VARIANT_BACKENDS[args.variant] - experimental = { - "attention_backend": attention_backend, - "inference_torch_compile": attention_backend == "FLASH_ATTN", - "vae_parallel_decode": True, - "vae_parallel_decode_strategy": "gather", - } - if attention_backend == "VIDEO_SPARSE_ATTN_H3": - experimental.update({ - "VSA_sparsity": 0.9, - "VSA_tile_size": 64, - }) + use_vsa = attention_backend == "VIDEO_SPARSE_ATTN_H3" adapter_path = hf_hub_download( repo_id="FastVideo/FastVideo-FastH3-4-step-Preview-v1-LoRA", @@ -81,13 +73,18 @@ def main() -> None: model_path="MiniMaxAI/MiniMax-H3", pipeline=PipelineSelection( components=ComponentConfig(lora_path=adapter_path, lora_strength=1.0), - experimental=experimental, + minimax_h3=MiniMaxH3Config(vae_parallel_decode=True, vae_parallel_decode_strategy="gather"), ), engine=EngineConfig( num_gpus=4, parallelism=ParallelismConfig(tp_size=1, sp_size=4), offload=OffloadConfig(dit=False, dit_layerwise=False), - compile=CompileConfig(vae_enabled=True), + compile=CompileConfig(vae_enabled=True, regional=attention_backend == "FLASH_ATTN"), + attention=AttentionConfig( + backend=attention_backend, + vsa_sparsity=0.9 if use_vsa else None, + vsa_tile_size=64 if use_vsa else None, + ), ), ) ) diff --git a/examples/inference/basic/basic_fasth3_simplified_profile.py b/examples/inference/basic/basic_fasth3_simplified_profile.py index c33b9de23..a700ed32e 100644 --- a/examples/inference/basic/basic_fasth3_simplified_profile.py +++ b/examples/inference/basic/basic_fasth3_simplified_profile.py @@ -11,11 +11,13 @@ from huggingface_hub import hf_hub_download from fastvideo import VideoGenerator from fastvideo.api import ( + AttentionConfig, CompileConfig, ComponentConfig, EngineConfig, GenerationRequest, GeneratorConfig, + MiniMaxH3Config, OffloadConfig, OutputConfig, ParallelismConfig, @@ -50,17 +52,7 @@ def main() -> None: output_dir.mkdir(parents=True, exist_ok=True) attention_backend = VARIANT_BACKENDS[args.variant] - experimental = { - "attention_backend": attention_backend, - "inference_torch_compile": attention_backend == "FLASH_ATTN", - "vae_parallel_decode": True, - "vae_parallel_decode_strategy": "gather", - } - if attention_backend == "VIDEO_SPARSE_ATTN_H3": - experimental.update({ - "VSA_sparsity": 0.9, - "VSA_tile_size": 64, - }) + use_vsa = attention_backend == "VIDEO_SPARSE_ATTN_H3" adapter_path = hf_hub_download( repo_id="FastVideo/FastVideo-FastH3-4-step-Preview-v1-LoRA", @@ -71,13 +63,18 @@ def main() -> None: model_path="MiniMaxAI/MiniMax-H3", pipeline=PipelineSelection( components=ComponentConfig(lora_path=adapter_path, lora_strength=1.0), - experimental=experimental, + minimax_h3=MiniMaxH3Config(vae_parallel_decode=True, vae_parallel_decode_strategy="gather"), ), engine=EngineConfig( num_gpus=4, parallelism=ParallelismConfig(tp_size=1, sp_size=4), offload=OffloadConfig(dit=False, dit_layerwise=False), - compile=CompileConfig(vae_enabled=True), + compile=CompileConfig(vae_enabled=True, regional=attention_backend == "FLASH_ATTN"), + attention=AttentionConfig( + backend=attention_backend, + vsa_sparsity=0.9 if use_vsa else None, + vsa_tile_size=64 if use_vsa else None, + ), quantization=QuantizationConfig(transformer_quant="MXFP8"), ), ) diff --git a/examples/inference/basic/basic_fasth3_spark.yaml b/examples/inference/basic/basic_fasth3_spark.yaml index 3cbff23d0..909c14240 100644 --- a/examples/inference/basic/basic_fasth3_spark.yaml +++ b/examples/inference/basic/basic_fasth3_spark.yaml @@ -30,12 +30,13 @@ generator: compile: enabled: false vae_enabled: true + regional: true + attention: + backend: VIDEO_SPARSE_ATTN_H3 + vsa_sparsity: 0.9 + vsa_tile_size: 64 pipeline: - experimental: - attention_backend: VIDEO_SPARSE_ATTN_H3 - VSA_sparsity: 0.9 - VSA_tile_size: 64 - inference_torch_compile: true + minimax_h3: vae_parallel_decode: true vae_parallel_decode_strategy: gather request: diff --git a/examples/inference/basic/basic_fasth3_spark_pair.yaml b/examples/inference/basic/basic_fasth3_spark_pair.yaml index 4f81a1007..336c13035 100644 --- a/examples/inference/basic/basic_fasth3_spark_pair.yaml +++ b/examples/inference/basic/basic_fasth3_spark_pair.yaml @@ -30,12 +30,13 @@ generator: compile: enabled: false vae_enabled: true + regional: true + attention: + backend: VIDEO_SPARSE_ATTN_H3 + vsa_sparsity: 0.9 + vsa_tile_size: 64 pipeline: - experimental: - attention_backend: VIDEO_SPARSE_ATTN_H3 - VSA_sparsity: 0.9 - VSA_tile_size: 64 - inference_torch_compile: true + minimax_h3: vae_parallel_decode: true vae_parallel_decode_strategy: gather request: diff --git a/examples/inference/basic/basic_minimax_h3_t2v.py b/examples/inference/basic/basic_minimax_h3_t2v.py index d4224f116..8e8d3af16 100644 --- a/examples/inference/basic/basic_minimax_h3_t2v.py +++ b/examples/inference/basic/basic_minimax_h3_t2v.py @@ -16,7 +16,6 @@ from fastvideo.api import ( OffloadConfig, OutputConfig, ParallelismConfig, - PipelineSelection, SamplingConfig, ) @@ -82,17 +81,10 @@ def main() -> None: output_dir = Path(args.output) output_dir.mkdir(parents=True, exist_ok=True) - # Boot-time run configuration folded into FastVideoArgs (the same - # experimental-dict route basic_fasth3.py uses for the VSA knobs). - experimental: dict[str, object] = {} - if args.inference_torch_compile: - experimental["inference_torch_compile"] = True - execution_backend = args.execution_backend or ("ray" if os.environ.get("RAY_ADDRESS") else "mp") generator = VideoGenerator.from_config( GeneratorConfig( model_path=args.model_path, - pipeline=PipelineSelection(experimental=experimental), engine=EngineConfig( num_gpus=args.num_gpus, execution_backend=execution_backend, @@ -110,6 +102,7 @@ def main() -> None: enabled=args.torch_compile, mode=args.compile_mode, vae_enabled=args.compile_vae, + regional=True if args.inference_torch_compile else None, ), ), )) diff --git a/examples/inference/lora/minimax_h3_lora_inference.py b/examples/inference/lora/minimax_h3_lora_inference.py index 9a0c6c78a..9a7c4d913 100644 --- a/examples/inference/lora/minimax_h3_lora_inference.py +++ b/examples/inference/lora/minimax_h3_lora_inference.py @@ -157,8 +157,9 @@ def main(argv: Sequence[str] | None = None) -> None: # Backend selection is finalized from the adapter before model construction. from fastvideo.models.loader.lora_patch import DenseLoRAPatch from fastvideo import VideoGenerator - from fastvideo.api import (CompileConfig, ComponentConfig, EngineConfig, GenerationRequest, GeneratorConfig, - OffloadConfig, OutputConfig, ParallelismConfig, PipelineSelection, SamplingConfig) + from fastvideo.api import (AttentionConfig, CompileConfig, ComponentConfig, EngineConfig, GenerationRequest, + GeneratorConfig, MiniMaxH3Config, OffloadConfig, OutputConfig, ParallelismConfig, + PipelineSelection, SamplingConfig) # An adapter carrying to_gate_compress needs the VSA backend, because that is the # only configuration in which the module exists. One that does not carry it runs @@ -177,30 +178,23 @@ def main(argv: Sequence[str] | None = None) -> None: "compression branch at its zero-initialized value.") configure_environment(args) - experimental: dict[str, object] = { - "inference_torch_compile": True, - "vae_parallel_decode": True, - "vae_parallel_decode_strategy": "gather", - } - if args.vsa: - experimental.update({ - "attention_backend": "VIDEO_SPARSE_ATTN_H3", - "VSA_sparsity": args.vsa_sparsity, - "VSA_tile_size": args.vsa_tile_size, - }) - config = GeneratorConfig( model_path=args.model_path, pipeline=PipelineSelection( components=ComponentConfig(lora_path=args.lora_path, lora_strength=args.lora_strength), - experimental=experimental, + minimax_h3=MiniMaxH3Config(vae_parallel_decode=True, vae_parallel_decode_strategy="gather"), ), engine=EngineConfig( num_gpus=args.num_gpus, use_fsdp_inference=False, parallelism=ParallelismConfig(tp_size=1, sp_size=args.num_gpus), offload=OffloadConfig(dit=False, dit_layerwise=False, text_encoder=True, vae=True, pin_cpu_memory=True), - compile=CompileConfig(enabled=False, vae_enabled=True), + compile=CompileConfig(enabled=False, vae_enabled=True, regional=True), + attention=AttentionConfig( + backend="VIDEO_SPARSE_ATTN_H3" if args.vsa else None, + vsa_sparsity=args.vsa_sparsity if args.vsa else None, + vsa_tile_size=args.vsa_tile_size if args.vsa else None, + ), ), ) diff --git a/examples/serving/openai_fasth3.yaml b/examples/serving/openai_fasth3.yaml index 1158d9598..1884c081e 100644 --- a/examples/serving/openai_fasth3.yaml +++ b/examples/serving/openai_fasth3.yaml @@ -17,13 +17,14 @@ generator: compile: enabled: false vae_enabled: false + regional: false + attention: + backend: VIDEO_SPARSE_ATTN_H3 + vsa_sparsity: 0.9 + vsa_tile_size: 64 pipeline: workload_type: t2v - experimental: - attention_backend: VIDEO_SPARSE_ATTN_H3 - VSA_sparsity: 0.9 - VSA_tile_size: 64 - inference_torch_compile: false + minimax_h3: vae_parallel_decode: true vae_parallel_decode_strategy: gather diff --git a/examples/serving/openai_fasth3_8step.yaml b/examples/serving/openai_fasth3_8step.yaml index 243dcbbe3..04fbe5cee 100644 --- a/examples/serving/openai_fasth3_8step.yaml +++ b/examples/serving/openai_fasth3_8step.yaml @@ -17,13 +17,14 @@ generator: compile: enabled: false vae_enabled: false + regional: false + attention: + backend: VIDEO_SPARSE_ATTN_H3 + vsa_sparsity: 0.8 + vsa_tile_size: 64 pipeline: workload_type: t2v - experimental: - attention_backend: VIDEO_SPARSE_ATTN_H3 - VSA_sparsity: 0.8 - VSA_tile_size: 64 - inference_torch_compile: false + minimax_h3: vae_parallel_decode: true vae_parallel_decode_strategy: gather diff --git a/examples/serving/openai_fasth3_lora.yaml b/examples/serving/openai_fasth3_lora.yaml index b204c1323..1e3e806f3 100644 --- a/examples/serving/openai_fasth3_lora.yaml +++ b/examples/serving/openai_fasth3_lora.yaml @@ -18,15 +18,16 @@ generator: compile: enabled: false vae_enabled: false + regional: false + attention: + backend: FLASH_ATTN pipeline: workload_type: t2v components: lora_path: /path/to/adapter_model.safetensors lora_nickname: fasth3-dense-datafree lora_strength: 1.0 - experimental: - attention_backend: FLASH_ATTN - inference_torch_compile: false + minimax_h3: vae_parallel_decode: true vae_parallel_decode_strategy: gather diff --git a/examples/serving/openai_fasth3_spark.yaml b/examples/serving/openai_fasth3_spark.yaml index f240e4346..1ffe93f48 100644 --- a/examples/serving/openai_fasth3_spark.yaml +++ b/examples/serving/openai_fasth3_spark.yaml @@ -26,13 +26,14 @@ generator: compile: enabled: false vae_enabled: true + regional: false + attention: + backend: VIDEO_SPARSE_ATTN_H3 + vsa_sparsity: 0.9 + vsa_tile_size: 64 pipeline: workload_type: t2v - experimental: - attention_backend: VIDEO_SPARSE_ATTN_H3 - VSA_sparsity: 0.9 - VSA_tile_size: 64 - inference_torch_compile: false + minimax_h3: vae_parallel_decode: true vae_parallel_decode_strategy: gather diff --git a/examples/serving/openai_fastwan21_1_3b.yaml b/examples/serving/openai_fastwan21_1_3b.yaml index 38538ea59..9b7de73fc 100644 --- a/examples/serving/openai_fastwan21_1_3b.yaml +++ b/examples/serving/openai_fastwan21_1_3b.yaml @@ -14,10 +14,10 @@ generator: pin_cpu_memory: false compile: enabled: true + attention: + vsa_sparsity: 0.8 pipeline: - experimental: - VSA_sparsity: 0.8 - dmd_denoising_steps: [1000, 757, 522] + dmd_denoising_steps: [1000, 757, 522] server: host: 0.0.0.0 diff --git a/examples/serving/openai_wan21_i2v_14b.yaml b/examples/serving/openai_wan21_i2v_14b.yaml index 0e0305d18..56f608b74 100644 --- a/examples/serving/openai_wan21_i2v_14b.yaml +++ b/examples/serving/openai_wan21_i2v_14b.yaml @@ -19,8 +19,7 @@ generator: pin_cpu_memory: true pipeline: workload_type: i2v - experimental: - flow_shift: 3.0 + flow_shift: 3.0 server: host: 0.0.0.0 diff --git a/fastvideo/fastvideo_args.py b/fastvideo/fastvideo_args.py index 8cb4ef920..772fcf373 100644 --- a/fastvideo/fastvideo_args.py +++ b/fastvideo/fastvideo_args.py @@ -224,8 +224,8 @@ class FastVideoArgs: # tile-64 inference route; other VSA routes degrade the transformer to # eager with one warning. Dense FA2/FA3/FA4 inference uses compile-visible # custom-op boundaries. Opt-in via FASTVIDEO_INFERENCE_TORCH_COMPILE=1 (folded in - # __post_init__) or PipelineSelection.experimental - # {"inference_torch_compile": true}. Distinct from ``enable_torch_compile``, + # __post_init__) or the typed config field engine.compile.regional. + # Distinct from ``enable_torch_compile``, # which keeps the pipeline-level compile semantics. inference_torch_compile: bool = False diff --git a/fastvideo/tests/api/config_snapshot.py b/fastvideo/tests/api/config_snapshot.py index f5134545e..ed3f48013 100644 --- a/fastvideo/tests/api/config_snapshot.py +++ b/fastvideo/tests/api/config_snapshot.py @@ -319,7 +319,7 @@ def collect_cases() -> list[SnapshotCase]: SnapshotCase("yaml", path.relative_to(REPO_ROOT).as_posix(), _yaml_case(path)) for path in _repository_config_files() ] - # One case per kind of branch in legacy_from_pretrained_to_config: typed keys, keys left in + # One case per kind of branch in legacy_from_pretrained_to_config: flat names of typed fields, keys left in # pipeline.experimental, compile sub-keys, LTX-2 refine keys, and a pipeline config JSON path. pipeline_json = str(REPO_ROOT / "fastvideo/configs/fasthunyuan_t2v.json") kwargs_cases = { @@ -329,12 +329,17 @@ def collect_cases() -> list[SnapshotCase]: "dit_cpu_offload": False, "vae_cpu_offload": False, }), - "untyped_experimental_keys": (WAN_T2V, { + "attention_precision_and_flow_shift": (WAN_T2V, { "attention_backend": "TORCH_SDPA", "flow_shift": 5.0, "VSA_sparsity": 0.5, "dit_precision": "fp32", }), + "keys_without_typed_fields": (WAN_T2V, { + "master_port": 29600, + "refine_enabled": True, + "boundary_ratio": 0.5, + }), "torch_compile_kwargs_typed_and_extra": (WAN_T2V, { "enable_torch_compile": True, "torch_compile_kwargs": { diff --git a/fastvideo/tests/api/config_snapshot_goldens/kwargs/untyped_experimental_keys.json b/fastvideo/tests/api/config_snapshot_goldens/kwargs/attention_precision_and_flow_shift.json similarity index 100% rename from fastvideo/tests/api/config_snapshot_goldens/kwargs/untyped_experimental_keys.json rename to fastvideo/tests/api/config_snapshot_goldens/kwargs/attention_precision_and_flow_shift.json 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 new file mode 100644 index 000000000..5b3b98a0c --- /dev/null +++ b/fastvideo/tests/api/config_snapshot_goldens/kwargs/keys_without_typed_fields.json @@ -0,0 +1,375 @@ +{ + "fastvideo_args": { + "VSA_sparsity": 0.0, + "VSA_tile_size": 256, + "attention_backend": null, + "boundary_ratio": 0.875, + "disable_autocast": false, + "dist_timeout": null, + "distributed_executor_backend": "mp", + "dit_cpu_offload": true, + "dit_layerwise_offload": true, + "enable_stage_verification": true, + "enable_torch_compile": false, + "enable_torch_compile_audio_vae": false, + "enable_torch_compile_text_encoder": false, + "enable_torch_compile_vae": false, + "h3_sequential_load": null, + "hsdp_replicate_dim": 1, + "hsdp_shard_dim": 1, + "image_encoder_cpu_offload": true, + "inference_mode": true, + "inference_torch_compile": false, + "init_weights_from_safetensors": "", + "init_weights_from_safetensors_2": "", + "lazy_module_load": null, + "lora_nickname": "default", + "lora_path": null, + "lora_strength": 1.0, + "lora_target_modules": null, + "ltx2_audio_latent_path": null, + "ltx2_initial_latent_path": null, + "ltx2_legacy_native_noise_order": false, + "ltx2_refine_add_noise": true, + "ltx2_refine_audio_noise_path": null, + "ltx2_refine_enabled": true, + "ltx2_refine_guidance_scale": 1.0, + "ltx2_refine_lora_path": null, + "ltx2_refine_noise_path": null, + "ltx2_refine_num_inference_steps": 3, + "ltx2_refine_transformer_path": null, + "ltx2_refine_upsampler_path": null, + "ltx2_use_distilled_sigmas": true, + "ltx2_vae_spatial_tile_overlap_in_pixels": null, + "ltx2_vae_spatial_tile_size_in_pixels": null, + "ltx2_vae_temporal_tile_overlap_in_frames": null, + "ltx2_vae_temporal_tile_size_in_frames": null, + "ltx2_vae_tiling": null, + "master_port": 29600, + "moba_config": {}, + "moba_config_path": null, + "mode": "inference", + "model_loaded": { + "transformer": true, + "upsampler": true, + "vae": true + }, + "model_path": "Wan-AI/Wan2.1-T2V-1.3B-Diffusers", + "model_paths": {}, + "num_gpus": 1, + "output_type": "pil", + "override_pipeline_cls_name": null, + "override_text_encoder_quant": null, + "override_text_encoder_safetensors": null, + "override_transformer_cls_name": null, + "pin_cpu_memory": true, + "preprocess_config": null, + "prompt_txt": null, + "ray_placement_group": null, + "ray_runtime_env": null, + "refine_add_noise": null, + "refine_audio_noise_path": null, + "refine_enabled": true, + "refine_guidance_scale": null, + "refine_lora_path": null, + "refine_noise_path": null, + "refine_num_inference_steps": null, + "refine_transformer_path": null, + "refine_upsampler_path": null, + "revision": null, + "sp_size": 1, + "taeh3_checkpoint": null, + "taeh3_chunk_size": 5, + "text_encoder_cpu_offload": true, + "torch_compile_kwargs": {}, + "torch_compile_kwargs_audio_vae": {}, + "torch_compile_kwargs_dit": {}, + "torch_compile_kwargs_text_encoder": {}, + "torch_compile_kwargs_vae": {}, + "tp_size": 1, + "transformer_quant": null, + "trust_remote_code": false, + "use_fsdp_inference": false, + "vae_cpu_offload": true, + "vae_parallel_decode": false, + "vae_parallel_decode_strategy": "gather", + "vae_parallel_encode": false, + "video_decode_backend": "h3-vae", + "workload_type": "t2v" + }, + "pipeline_config": { + "boundary_ratio": 0.5, + "disable_autocast": false, + "dit_config": { + "_resolved_attention_backend": null, + "arch_config": { + "_supported_attention_backends": [ + 3, + 1, + 2, + 7, + 10, + 4, + 5, + 6, + 11, + 12 + ], + "added_kv_proj_dim": null, + "attention_head_dim": 128, + "boundary_ratio": null, + "cast_prompt_embeds_to_dit_dtype": false, + "cross_attn_norm": true, + "eps": 1e-06, + "exclude_lora_layers": [ + "embedder" + ], + "ffn_dim": 13824, + "freq_dim": 256, + "hidden_size": 5120, + "image_dim": null, + "in_channels": 16, + "local_attn_size": -1, + "num_attention_heads": 40, + "num_channels_latents": 16, + "num_frames_per_block": 3, + "num_layers": 40, + "out_channels": 16, + "patch_size": [ + 1, + 2, + 2 + ], + "pos_embed_seq_len": null, + "qk_norm": "rms_norm_across_heads", + "r_embedder": false, + "r_embedder_deltatime_type": "r", + "r_embedder_fusion": "additive", + "r_embedder_gate_value": 0.25, + "rope_cache_policy": "absolute", + "rope_max_seq_len": 1024, + "sink_size": 0, + "sliding_window_num_frames": 21, + "stacked_params_mapping": [], + "text_dim": 4096 + }, + "prefix": "Wan", + "quant_config": null + }, + "dit_precision": "bf16", + "dmd_denoising_steps": null, + "embedded_cfg_scale": 6.0, + "flow_shift": 3.0, + "flow_shift_sr": null, + "image_encoder_config": { + "_resolved_attention_backend": null, + "arch_config": { + "_supported_attention_backends": [ + 1, + 2 + ], + "architectures": [], + "output_hidden_states": false, + "stacked_params_mapping": [], + "use_return_dict": true + }, + "lora_config": null, + "prefix": "", + "quant_config": null + }, + "image_encoder_configs": null, + "image_encoder_precision": "fp32", + "image_encoder_precisions": null, + "is_causal": false, + "lucy_edit_task": false, + "model_path": "Wan-AI/Wan2.1-T2V-1.3B-Diffusers", + "pipeline_config_path": null, + "postprocess_text_funcs": [ + "fastvideo.models.wan.pipeline_config.t5_postprocess_text" + ], + "precision": "bf16", + "preprocess_text_funcs": [ + "fastvideo.configs.pipelines.base.preprocess_text" + ], + "scheduler_step_in_fp32": false, + "text_encoder_configs": [ + { + "_resolved_attention_backend": null, + "arch_config": { + "_supported_attention_backends": [ + 1, + 2 + ], + "architectures": [], + "classifier_dropout": 0.0, + "d_ff": 2048, + "d_kv": 64, + "d_model": 512, + "decoder_start_token_id": 0, + "dense_act_fn": "relu", + "dropout_rate": 0.1, + "dtype": null, + "eos_token_id": 1, + "feed_forward_proj": "relu", + "gradient_checkpointing": false, + "hidden_size": 512, + "hidden_state_skip_layer": 0, + "initializer_factor": 1.0, + "is_encoder_decoder": true, + "is_gated_act": false, + "layer_norm_epsilon": 1e-06, + "n_positions": 512, + "num_attention_heads": 0, + "num_decoder_layers": null, + "num_heads": 8, + "num_hidden_layers": 0, + "num_layers": 6, + "output_hidden_states": false, + "output_past": true, + "pad_token_id": 0, + "relative_attention_max_distance": 128, + "relative_attention_num_buckets": 32, + "require_processor": false, + "scalable_attention": true, + "stacked_params_mapping": [ + [ + ".qkv_proj", + ".q", + "q" + ], + [ + ".qkv_proj", + ".k", + "k" + ], + [ + ".qkv_proj", + ".v", + "v" + ] + ], + "task_specific_params": null, + "text_len": 512, + "tie_word_embeddings": false, + "tokenizer_kwargs": { + "add_special_tokens": true, + "max_length": 512, + "return_attention_mask": true, + "return_tensors": "pt", + "truncation": true + }, + "use_cache": true, + "use_return_dict": true, + "vocab_size": 32128 + }, + "chat_template_enable_thinking": false, + "is_chat_model": false, + "lora_config": null, + "prefix": "t5", + "quant_config": null, + "treat_empty_as_dot": false + } + ], + "text_encoder_precisions": [ + "fp32" + ], + "ti2v_task": false, + "upsampler_config": { + "_resolved_attention_backend": null, + "arch_config": { + "stacked_params_mapping": [] + } + }, + "upsampler_precision": "fp32", + "vae_config": { + "_resolved_attention_backend": null, + "arch_config": { + "attn_scales": [], + "base_dim": 96, + "clip_output": true, + "decoder_base_dim": null, + "dim_mult": [ + 1, + 2, + 4, + 4 + ], + "dropout": 0.0, + "in_channels": 3, + "is_residual": false, + "latents_mean": [ + -0.7571, + -0.7089, + -0.9113, + 0.1075, + -0.1745, + 0.9653, + -0.1517, + 1.5508, + 0.4134, + -0.0715, + 0.5517, + -0.3632, + -0.1922, + -0.9497, + 0.2503, + -0.2921 + ], + "latents_std": [ + 2.8184, + 1.4541, + 2.3275, + 2.6558, + 1.2196, + 1.7708, + 2.6052, + 2.0743, + 3.2687, + 2.1526, + 2.8652, + 1.5579, + 1.6382, + 1.1253, + 2.8251, + 1.916 + ], + "num_res_blocks": 2, + "out_channels": 3, + "patch_size": null, + "scale_factor_spatial": 8, + "scale_factor_temporal": 4, + "scaling_factor": "", + "spatial_compression_ratio": 8, + "stacked_params_mapping": [], + "temperal_downsample": [ + false, + true, + true + ], + "temporal_compression_ratio": 4, + "z_dim": 16 + }, + "blend_num_frames": 8, + "load_decoder": true, + "load_encoder": false, + "tile_sample_min_height": 256, + "tile_sample_min_num_frames": 16, + "tile_sample_min_width": 256, + "tile_sample_stride_height": 192, + "tile_sample_stride_num_frames": 12, + "tile_sample_stride_width": 192, + "use_feature_cache": true, + "use_light_vae": false, + "use_parallel_tiling": false, + "use_temporal_scaling_frames": true, + "use_temporal_tiling": false, + "use_tiling": false + }, + "vae_decode_precision": "bf16", + "vae_precision": "fp32", + "vae_sp": false, + "vae_tiling": false, + "warp_denoising_step": true + }, + "pipeline_config_class": "fastvideo.models.wan.pipeline_config.WanT2V480PConfig" +} 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 eb5082510..142ba67be 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 @@ -153,8 +153,8 @@ }, "dit_precision": "bf16", "dmd_denoising_steps": null, - "embedded_cfg_scale": 6, - "flow_shift": 17, + "embedded_cfg_scale": 6.0, + "flow_shift": 17.0, "flow_shift_sr": null, "image_encoder_config": { "_resolved_attention_backend": null, 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 4e4c0d9ec..43e61f42e 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 @@ -153,8 +153,8 @@ }, "dit_precision": "bf16", "dmd_denoising_steps": null, - "embedded_cfg_scale": 6, - "flow_shift": 7, + "embedded_cfg_scale": 6.0, + "flow_shift": 7.0, "flow_shift_sr": null, "image_encoder_config": { "_resolved_attention_backend": null, diff --git a/fastvideo/tests/inference/bsa/test_bsa_inference.py b/fastvideo/tests/inference/bsa/test_bsa_inference.py index fd5795ebb..722cd59e6 100644 --- a/fastvideo/tests/inference/bsa/test_bsa_inference.py +++ b/fastvideo/tests/inference/bsa/test_bsa_inference.py @@ -34,9 +34,7 @@ def test_inference_bsa(env_overrides): }, }, "pipeline": { - "experimental": { - "flow_shift": 8.0, - }, + "flow_shift": 8.0, }, }, "request": { diff --git a/fastvideo/tests/inference/test_basic_fasth3_profile.py b/fastvideo/tests/inference/test_basic_fasth3_profile.py index 7fa7c7431..11d4c1998 100644 --- a/fastvideo/tests/inference/test_basic_fasth3_profile.py +++ b/fastvideo/tests/inference/test_basic_fasth3_profile.py @@ -57,14 +57,13 @@ def test_default_all_profile_matches_fastest_contract(tmp_path): assert config.engine.offload.pin_cpu_memory is True assert config.engine.compile.enabled is False assert config.engine.compile.vae_enabled is True - assert config.pipeline.experimental == { - "attention_backend": "VIDEO_SPARSE_ATTN_H3", - "VSA_sparsity": 0.9, - "VSA_tile_size": 64, - "inference_torch_compile": True, - "vae_parallel_decode": True, - "vae_parallel_decode_strategy": "gather", - } + assert config.pipeline.experimental == {} + assert config.engine.attention.backend == "VIDEO_SPARSE_ATTN_H3" + assert config.engine.attention.vsa_sparsity == 0.9 + assert config.engine.attention.vsa_tile_size == 64 + assert config.engine.compile.regional is True + assert config.pipeline.minimax_h3.vae_parallel_decode is True + assert config.pipeline.minimax_h3.vae_parallel_decode_strategy == "gather" assert environment["FASTVIDEO_VSA_SM100A"] == "1" assert environment["FASTVIDEO_VSA_CUTEDSL"] == "0" @@ -106,7 +105,7 @@ def test_fast_profile_supports_measured_durations_without_separate_scripts(tmp_p assert args.inference_torch_compile is True assert args.ulysses_a2a == "off" - assert config.pipeline.experimental["inference_torch_compile"] is True + assert config.engine.compile.regional is True assert request.sampling.num_frames == num_frames @@ -141,15 +140,15 @@ def test_strict_profile_changes_only_non_parity_fusions(): assert fasth3.build_generator_config(all_args) == fasth3.build_generator_config(strict_args) -def test_h3_sequential_load_is_opt_in_experimental(): +def test_h3_sequential_load_is_opt_in(): default = fasth3.build_generator_config(_args()) - assert "h3_sequential_load" not in default.pipeline.experimental + assert default.pipeline.minimax_h3.sequential_load is None enabled = fasth3.build_generator_config(_args("--h3-sequential-load")) - assert enabled.pipeline.experimental["h3_sequential_load"] is True + assert enabled.pipeline.minimax_h3.sequential_load is True disabled = fasth3.build_generator_config(_args("--no-h3-sequential-load")) - assert disabled.pipeline.experimental["h3_sequential_load"] is False + assert disabled.pipeline.minimax_h3.sequential_load is False def test_opt_outs_override_inherited_environment(monkeypatch): @@ -183,7 +182,7 @@ def test_opt_outs_override_inherited_environment(monkeypatch): assert fasth3.os.environ["FASTVIDEO_VAE_PARALLEL_DECODE"] == "0" assert fasth3.os.environ["FASTVIDEO_ULYSSES_A2A"] == "off" assert config.engine.compile.vae_enabled is False - assert config.pipeline.experimental["vae_parallel_decode"] is False + assert config.pipeline.minimax_h3.vae_parallel_decode is False assert config.engine.use_fsdp_inference is True assert config.engine.offload.pin_cpu_memory is False @@ -261,12 +260,12 @@ def test_run_excludes_warmup_and_uses_distinct_measured_outputs(monkeypatch, tmp assert "Median denoising time: 2.500s" in output -def test_taeh3_backend_is_opt_in_experimental(): +def test_taeh3_backend_is_opt_in(): default = fasth3.build_generator_config(_args()) taeh3 = fasth3.build_generator_config(_args("--video-decode-backend", "taeh3")) - assert "video_decode_backend" not in default.pipeline.experimental - assert taeh3.pipeline.experimental["video_decode_backend"] == "taeh3" + assert default.pipeline.minimax_h3.video_decode_backend is None + assert taeh3.pipeline.minimax_h3.video_decode_backend == "taeh3" EIGHT_STEP_EXAMPLE_PATH = REPO_ROOT / "examples" / "inference" / "basic" / "basic_fasth3_8step.py" diff --git a/fastvideo/tests/inference/vmoba/test_vmoba_inference.py b/fastvideo/tests/inference/vmoba/test_vmoba_inference.py index c543a55ff..9f54a02cc 100644 --- a/fastvideo/tests/inference/vmoba/test_vmoba_inference.py +++ b/fastvideo/tests/inference/vmoba/test_vmoba_inference.py @@ -32,13 +32,13 @@ def test_inference_vmoba(env_overrides): "text_encoder": True, "pin_cpu_memory": False, }, - }, - "pipeline": { - "experimental": { - "flow_shift": 8.0, + "attention": { "moba_config_path": moba_config, }, }, + "pipeline": { + "flow_shift": 8.0, + }, }, "request": { "prompt": diff --git a/scripts/inference/inference_fasthunyuan.yaml b/scripts/inference/inference_fasthunyuan.yaml index f3c8a4038..445853912 100644 --- a/scripts/inference/inference_fasthunyuan.yaml +++ b/scripts/inference/inference_fasthunyuan.yaml @@ -8,9 +8,8 @@ generator: tp_size: 1 sp_size: 4 pipeline: - experimental: - embedded_cfg_scale: 6 - flow_shift: 17 + embedded_cfg_scale: 6 + flow_shift: 17 request: prompt: A beautiful woman in a red dress walking down a street sampling: diff --git a/scripts/inference/inference_hunyuan.yaml b/scripts/inference/inference_hunyuan.yaml index 2efe846b6..2706cfda9 100644 --- a/scripts/inference/inference_hunyuan.yaml +++ b/scripts/inference/inference_hunyuan.yaml @@ -8,9 +8,8 @@ generator: tp_size: 1 sp_size: 4 pipeline: - experimental: - embedded_cfg_scale: 6 - flow_shift: 7 + embedded_cfg_scale: 6 + flow_shift: 7 request: prompt: A beautiful woman in a red dress walking down a street sampling: diff --git a/scripts/inference/inference_longcat.yaml b/scripts/inference/inference_longcat.yaml index 7887a28a7..50565e61e 100644 --- a/scripts/inference/inference_longcat.yaml +++ b/scripts/inference/inference_longcat.yaml @@ -13,7 +13,7 @@ generator: vae: false pin_cpu_memory: false pipeline: - experimental: + longcat: enable_bsa: false request: prompt: >- diff --git a/scripts/inference/inference_longcat_distill.yaml b/scripts/inference/inference_longcat_distill.yaml index 8e6b77d3d..c2c41df0a 100644 --- a/scripts/inference/inference_longcat_distill.yaml +++ b/scripts/inference/inference_longcat_distill.yaml @@ -13,9 +13,9 @@ generator: pipeline: components: lora_path: FastVideo/LongCat-Video-T2V-Distilled-LoRA - experimental: - enable_bsa: false lora_nickname: distilled + longcat: + enable_bsa: false request: prompt: >- In a realistic photography style, a white boy around seven or eight years diff --git a/scripts/inference/inference_longcat_i2v.yaml b/scripts/inference/inference_longcat_i2v.yaml index 7ab21af18..7e6b79387 100644 --- a/scripts/inference/inference_longcat_i2v.yaml +++ b/scripts/inference/inference_longcat_i2v.yaml @@ -12,7 +12,7 @@ generator: pin_cpu_memory: false pipeline: workload_type: i2v - experimental: + longcat: enable_bsa: false request: prompt: >- diff --git a/scripts/inference/inference_longcat_refine_fromvideo.yaml b/scripts/inference/inference_longcat_refine_fromvideo.yaml index 29046b684..5b46d0821 100644 --- a/scripts/inference/inference_longcat_refine_fromvideo.yaml +++ b/scripts/inference/inference_longcat_refine_fromvideo.yaml @@ -12,12 +12,12 @@ generator: pipeline: components: lora_path: FastVideo/LongCat-Video-T2V-Refinement-LoRA - experimental: + lora_nickname: refinement + longcat: enable_bsa: true bsa_sparsity: 0.875 bsa_chunk_q: [4, 4, 8] bsa_chunk_k: [4, 4, 8] - lora_nickname: refinement request: prompt: >- In a realistic photography style, a white boy around seven or eight years diff --git a/scripts/inference/inference_longcat_vc.yaml b/scripts/inference/inference_longcat_vc.yaml index 0fe5c78b3..1a97e6020 100644 --- a/scripts/inference/inference_longcat_vc.yaml +++ b/scripts/inference/inference_longcat_vc.yaml @@ -11,7 +11,7 @@ generator: dit: false pin_cpu_memory: false pipeline: - experimental: + longcat: enable_bsa: false request: prompt: >- diff --git a/scripts/inference/inference_wan.yaml b/scripts/inference/inference_wan.yaml index 2baa89deb..b93162f7d 100644 --- a/scripts/inference/inference_wan.yaml +++ b/scripts/inference/inference_wan.yaml @@ -12,8 +12,7 @@ generator: vae: false pin_cpu_memory: false pipeline: - experimental: - flow_shift: 8.0 + flow_shift: 8.0 request: negative_prompt: >- Bright tones, overexposed, static, blurred details, subtitles, style, diff --git a/scripts/inference/inference_wan_1.3B_VMoba.yaml b/scripts/inference/inference_wan_1.3B_VMoba.yaml index 02a65dc10..906a8f06e 100644 --- a/scripts/inference/inference_wan_1.3B_VMoba.yaml +++ b/scripts/inference/inference_wan_1.3B_VMoba.yaml @@ -11,10 +11,10 @@ generator: dit: false vae: false pin_cpu_memory: false - pipeline: - experimental: - flow_shift: 8.0 + attention: moba_config_path: fastvideo/configs/backend/vmoba/wan_1.3B_77_480_832.json + pipeline: + flow_shift: 8.0 request: negative_prompt: >- Bright tones, overexposed, static, blurred details, subtitles, style, diff --git a/scripts/inference/inference_wan_VSA.yaml b/scripts/inference/inference_wan_VSA.yaml index d92d94bcd..28fb6464d 100644 --- a/scripts/inference/inference_wan_VSA.yaml +++ b/scripts/inference/inference_wan_VSA.yaml @@ -11,10 +11,10 @@ generator: dit: false vae: false pin_cpu_memory: false + attention: + vsa_sparsity: 0.9 pipeline: - experimental: - flow_shift: 5.0 - VSA_sparsity: 0.9 + flow_shift: 5.0 request: negative_prompt: >- Bright tones, overexposed, static, blurred details, subtitles, style, diff --git a/scripts/inference/inference_wan_VSA_DMD_14B_480P.yaml b/scripts/inference/inference_wan_VSA_DMD_14B_480P.yaml index a184c1093..dd7592e88 100644 --- a/scripts/inference/inference_wan_VSA_DMD_14B_480P.yaml +++ b/scripts/inference/inference_wan_VSA_DMD_14B_480P.yaml @@ -9,10 +9,10 @@ generator: parallelism: tp_size: 1 sp_size: 1 + attention: + vsa_sparsity: 0.9 pipeline: - experimental: - VSA_sparsity: 0.9 - dmd_denoising_steps: [1000, 757, 522] + dmd_denoising_steps: [1000, 757, 522] request: negative_prompt: >- Bright tones, overexposed, static, blurred details, subtitles, style, diff --git a/scripts/inference/inference_wan_VSA_DMD_14B_720P.yaml b/scripts/inference/inference_wan_VSA_DMD_14B_720P.yaml index 395bb1a3c..bda28dd62 100644 --- a/scripts/inference/inference_wan_VSA_DMD_14B_720P.yaml +++ b/scripts/inference/inference_wan_VSA_DMD_14B_720P.yaml @@ -9,10 +9,10 @@ generator: parallelism: tp_size: 1 sp_size: 1 + attention: + vsa_sparsity: 0.9 pipeline: - experimental: - VSA_sparsity: 0.9 - dmd_denoising_steps: [1000, 757, 522] + dmd_denoising_steps: [1000, 757, 522] request: negative_prompt: >- Bright tones, overexposed, static, blurred details, subtitles, style, diff --git a/scripts/inference/inference_wan_VSA_DMD_1_3B.yaml b/scripts/inference/inference_wan_VSA_DMD_1_3B.yaml index 4c99c29a8..0b5c808dd 100644 --- a/scripts/inference/inference_wan_VSA_DMD_1_3B.yaml +++ b/scripts/inference/inference_wan_VSA_DMD_1_3B.yaml @@ -13,10 +13,10 @@ generator: dit: false vae: false pin_cpu_memory: false + attention: + vsa_sparsity: 0.8 pipeline: - experimental: - VSA_sparsity: 0.8 - dmd_denoising_steps: [1000, 757, 522] + dmd_denoising_steps: [1000, 757, 522] request: negative_prompt: >- Bright tones, overexposed, static, blurred details, subtitles, style, diff --git a/scripts/inference/inference_wan_VSA_DMD_5B_720P.yaml b/scripts/inference/inference_wan_VSA_DMD_5B_720P.yaml index d0f6dc0c5..d02d20827 100644 --- a/scripts/inference/inference_wan_VSA_DMD_5B_720P.yaml +++ b/scripts/inference/inference_wan_VSA_DMD_5B_720P.yaml @@ -10,8 +10,7 @@ generator: tp_size: 1 sp_size: 1 pipeline: - experimental: - dmd_denoising_steps: [1000, 757, 522] + dmd_denoising_steps: [1000, 757, 522] request: negative_prompt: >- Bright tones, overexposed, static, blurred details, subtitles, style, diff --git a/scripts/inference/inference_wan_i2v.yaml b/scripts/inference/inference_wan_i2v.yaml index 53585b482..6a5954601 100644 --- a/scripts/inference/inference_wan_i2v.yaml +++ b/scripts/inference/inference_wan_i2v.yaml @@ -15,8 +15,7 @@ generator: pin_cpu_memory: true pipeline: workload_type: i2v - experimental: - flow_shift: 3.0 + flow_shift: 3.0 request: prompt: >- An astronaut hatching from an egg, on the surface of the moon, the diff --git a/tests/local_tests/test_cookbook_serving.py b/tests/local_tests/test_cookbook_serving.py index 833c2d869..776ea218d 100644 --- a/tests/local_tests/test_cookbook_serving.py +++ b/tests/local_tests/test_cookbook_serving.py @@ -44,8 +44,7 @@ def test_spark_configs_use_lazy_load_not_sequential(config_path): cfg = yaml.safe_load((ROOT / config_path).read_text()) offload = cfg["generator"]["engine"]["offload"] assert offload["lazy_module_load"] is True - experimental = cfg["generator"]["pipeline"]["experimental"] - assert "h3_sequential_load" not in experimental + assert "sequential_load" not in cfg["generator"]["pipeline"].get("minimax_h3", {}) def test_spark_preview_is_a_runtime_with_one_or_two_devices():