pipeline.model is a tagged union: a mapping with exactly one key, which names the model family (ltx2, minimax_h3, longcat, or generic) and selects that family's options class. The former sibling sections pipeline.ltx2, pipeline.minimax_h3, and pipeline.longcat, and the DiT/VAE architecture override dicts pipeline.dit and pipeline.vae, live inside the family block. The parser implements tagged unions as a general mechanism (a dataclass with a TAGS table); the family is readable as pipeline.model.family. Resolution validates the tag against the family that the registry chose for model_path (validate_model_family raises and names the registry class and the right block) and fills the family's empty block when the input has none (fill_model_family), so readers never see None. Family-only fills and derivations (the MiniMax-H3 parallel-VAE environment variables, the LTX-2 tile-size derivation and refine preset copy, the LongCat BSA mirrors) run only for their family. Against the3f6893a0goldens every PipelineConfig is identical and no other field differs beyond the allowed categories; family-only settings are no longer decided on models of another family. LingBot-Video reads its refiner switch from pipeline.preset_overrides.refine.enabled and loads the refiner by default when the checkpoint has one, as at3f6893a0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CbSuTKA9oX4YsECdcBPAsX
126 lines
2.8 KiB
Python
126 lines
2.8 KiB
Python
# SPDX-License-Identifier: Apache-2.0
|
|
from fastvideo.api.schema import (
|
|
AttentionConfig,
|
|
CompileConfig,
|
|
ComponentConfig,
|
|
ContinuationState,
|
|
EngineConfig,
|
|
GenerationPlan,
|
|
GenerationRequest,
|
|
GeneratorConfig,
|
|
GenericModelOptions,
|
|
GpuPoolConfig,
|
|
InputConfig,
|
|
LTX2Options,
|
|
LTX2RefineOptions,
|
|
LongCatOptions,
|
|
MiniMaxH3Options,
|
|
ModelOptions,
|
|
OffloadConfig,
|
|
OutputConfig,
|
|
ParallelismConfig,
|
|
PipelineSelection,
|
|
PlannedStage,
|
|
PrecisionConfig,
|
|
PromptEnhancerConfig,
|
|
PromptSafetyConfig,
|
|
QuantizationConfig,
|
|
RequestRuntimeConfig,
|
|
RunConfig,
|
|
SamplingConfig,
|
|
ServeConfig,
|
|
ServerConfig,
|
|
StreamingConfig,
|
|
WarmupConfig,
|
|
)
|
|
from fastvideo.api.errors import ConfigValidationError
|
|
from fastvideo.api.overrides import apply_overrides, parse_cli_overrides
|
|
from fastvideo.api.presets import (
|
|
InferencePreset,
|
|
PresetStageSpec,
|
|
get_all_preset_names,
|
|
get_preset,
|
|
get_presets_for_family,
|
|
register_preset,
|
|
validate_preset_selection,
|
|
validate_stage_names,
|
|
validate_stage_overrides,
|
|
)
|
|
from fastvideo.api.parser import (
|
|
config_to_dict,
|
|
load_config,
|
|
load_raw_config,
|
|
load_run_config,
|
|
load_serve_config,
|
|
parse_config,
|
|
)
|
|
from fastvideo.api.results import (
|
|
GenerationResult,
|
|
VideoEvent,
|
|
VideoFinalEvent,
|
|
VideoPartialEvent,
|
|
VideoProgressEvent,
|
|
VideoResult,
|
|
)
|
|
from fastvideo.api.sampling_param import SamplingParam
|
|
|
|
__all__ = [
|
|
"AttentionConfig",
|
|
"CompileConfig",
|
|
"ComponentConfig",
|
|
"ContinuationState",
|
|
"ConfigValidationError",
|
|
"EngineConfig",
|
|
"GenerationResult",
|
|
"GenerationPlan",
|
|
"GenerationRequest",
|
|
"GeneratorConfig",
|
|
"GenericModelOptions",
|
|
"GpuPoolConfig",
|
|
"InputConfig",
|
|
"LTX2Options",
|
|
"LTX2RefineOptions",
|
|
"LongCatOptions",
|
|
"MiniMaxH3Options",
|
|
"ModelOptions",
|
|
"OffloadConfig",
|
|
"OutputConfig",
|
|
"ParallelismConfig",
|
|
"PipelineSelection",
|
|
"PlannedStage",
|
|
"PrecisionConfig",
|
|
"PromptEnhancerConfig",
|
|
"PromptSafetyConfig",
|
|
"QuantizationConfig",
|
|
"RequestRuntimeConfig",
|
|
"RunConfig",
|
|
"SamplingConfig",
|
|
"SamplingParam",
|
|
"ServeConfig",
|
|
"ServerConfig",
|
|
"StreamingConfig",
|
|
"VideoEvent",
|
|
"VideoFinalEvent",
|
|
"VideoPartialEvent",
|
|
"VideoProgressEvent",
|
|
"VideoResult",
|
|
"WarmupConfig",
|
|
"InferencePreset",
|
|
"PresetStageSpec",
|
|
"apply_overrides",
|
|
"config_to_dict",
|
|
"load_config",
|
|
"load_raw_config",
|
|
"load_run_config",
|
|
"load_serve_config",
|
|
"parse_cli_overrides",
|
|
"get_all_preset_names",
|
|
"get_preset",
|
|
"get_presets_for_family",
|
|
"parse_config",
|
|
"register_preset",
|
|
"validate_preset_selection",
|
|
"validate_stage_names",
|
|
"validate_stage_overrides",
|
|
]
|