lingbot_video
Dense LingBot-Video T2V pipeline configuration.
fastvideo.configs.pipelines.lingbot_video.DiTConfig
DiTConfig(arch_config: DiTArchConfig = DiTArchConfig(), prefix: str = '', quant_config: QuantizationConfig | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)
fastvideo.configs.pipelines.lingbot_video.DiTConfig.add_cli_args
add_cli_args(parser: Any, prefix: str = 'dit-config') -> Any
Add CLI arguments for DiTConfig fields
fastvideo.configs.pipelines.lingbot_video.EncoderConfig
EncoderConfig(arch_config: ArchConfig = EncoderArchConfig(), prefix: str = '', quant_config: QuantizationConfig | None = None, lora_config: Any | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)
fastvideo.configs.pipelines.lingbot_video.VAEConfig
VAEConfig(arch_config: VAEArchConfig = VAEArchConfig(), load_encoder: bool = True, load_decoder: bool = True, tile_sample_min_height: int = 256, tile_sample_min_width: int = 256, tile_sample_min_num_frames: int = 16, tile_sample_stride_height: int = 192, tile_sample_stride_width: int = 192, tile_sample_stride_num_frames: int = 12, blend_num_frames: int = 0, use_tiling: bool = True, use_temporal_tiling: bool = True, use_parallel_tiling: bool = True, use_temporal_scaling_frames: bool = True, *, _resolved_attention_backend: AttentionBackendEnum | None = None)
fastvideo.configs.pipelines.lingbot_video.VAEConfig.add_cli_args
add_cli_args(parser: Any, prefix: str = 'vae-config') -> Any
Add CLI arguments for VAEConfig fields
fastvideo.configs.pipelines.lingbot_video.VAEConfig.from_cli_args
from_cli_args(args: argparse.Namespace) -> VAEConfig
fastvideo.configs.pipelines.lingbot_video.LingBotVideoConfig
LingBotVideoConfig(arch_config: DiTArchConfig = LingBotVideoArchConfig(), prefix: str = '', quant_config: QuantizationConfig | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)
FastVideo component configuration for LingBot-Video transformers.
fastvideo.configs.pipelines.lingbot_video.BaseEncoderOutput
BaseEncoderOutput(last_hidden_state: torch.FloatTensor | None = None, pooler_output: torch.FloatTensor | None = None, hidden_states: tuple[torch.FloatTensor, ...] | None = None, attentions: tuple[torch.FloatTensor, ...] | None = None, attention_mask: torch.Tensor | None = None)
fastvideo.configs.pipelines.lingbot_video.LingBotVideoQwen3VLTextConfig
LingBotVideoQwen3VLTextConfig(arch_config: TextEncoderArchConfig = LingBotVideoQwen3VLTextArchConfig(), prefix: str = 'language_model', quant_config: QuantizationConfig | None = None, lora_config: Any | None = None, is_chat_model: bool = False, treat_empty_as_dot: bool = False, *, _resolved_attention_backend: AttentionBackendEnum | None = None, chat_template_enable_thinking: bool = False)
FastVideo loader config for the LingBot-Video text-only Qwen3-VL path.
fastvideo.configs.pipelines.lingbot_video.WanVAEConfig
WanVAEConfig(arch_config: WanVAEArchConfig = WanVAEArchConfig(), load_encoder: bool = True, load_decoder: bool = True, tile_sample_min_height: int = 256, tile_sample_min_width: int = 256, tile_sample_min_num_frames: int = 16, tile_sample_stride_height: int = 192, tile_sample_stride_width: int = 192, tile_sample_stride_num_frames: int = 12, blend_num_frames: int = 0, use_tiling: bool = False, use_temporal_tiling: bool = False, use_parallel_tiling: bool = False, use_temporal_scaling_frames: bool = True, use_feature_cache: bool = True, use_light_vae: bool = False, *, _resolved_attention_backend: AttentionBackendEnum | None = None)
fastvideo.configs.pipelines.lingbot_video.PipelineConfig
PipelineConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = None, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = DiTConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = VAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = True, vae_sp: bool = True, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (EncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('fp32',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.tensor], ...] = (lambda: (postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None)
Base configuration for all pipeline architectures.
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.add_cli_args
add_cli_args(parser: FlexibleArgumentParser, prefix: str = '') -> FlexibleArgumentParser
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.update_config_from_dict
update_config_from_dict(args: dict[str, Any], prefix: str = '') -> None
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.from_pretrained
from_pretrained(model_path: str) -> PipelineConfig
use the pipeline class setting from model_path to match the pipeline config
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.from_kwargs
from_kwargs(kwargs: dict[str, Any], config_cli_prefix: str = '') -> PipelineConfig
Load PipelineConfig from kwargs Dictionary. kwargs: dictionary of kwargs config_cli_prefix: prefix of CLI arguments for this PipelineConfig instance
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.check_pipeline_config
check_pipeline_config() -> None
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.resolve_checkpoint_settings
resolve_checkpoint_settings(fastvideo_args: FastVideoArgs) -> None
Apply the run settings that the checkpoint at fastvideo_args.model_path fixes.
FastVideoArgs.__post_init__ calls this once in the main process, before
argument validation and before any weights load. Most checkpoints fix no
run settings, so the base implementation does nothing.
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.apply_request_constraints
apply_request_constraints(request: GenerationRequest, sampling_param: SamplingParam) -> SamplingParam
Apply this model's constraints on a generation request to its sampling parameters.
sampling_param holds the preset defaults with the request's explicit
fields applied. A model sets the values it fixes when the request leaves
them unset, and raises when the request sets a value it does not accept.
The base PipelineConfig accepts every request unchanged.
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.dump_to_json
dump_to_json(file_path: str)
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.load_from_json
load_from_json(file_path: str)
fastvideo.configs.pipelines.lingbot_video.PipelineConfig.update_pipeline_config
update_pipeline_config(source_pipeline_dict: dict[str, Any]) -> None
fastvideo.configs.pipelines.lingbot_video.preprocess_lingbot_video_prompt
preprocess_lingbot_video_prompt(prompt: str) -> str
Apply the released T2V system/user/assistant prompt template.
Source
def preprocess_lingbot_video_prompt(prompt: str) -> str:
"""Apply the released T2V system/user/assistant prompt template."""
return PROMPT_TEMPLATE.format(prompt)fastvideo.configs.pipelines.lingbot_video.postprocess_lingbot_video_text
postprocess_lingbot_video_text(outputs: BaseEncoderOutput, attention_mask: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]
Select the final hidden state, crop the template, and trim batch-one padding.
Source
def postprocess_lingbot_video_text(
outputs: BaseEncoderOutput,
attention_mask: torch.Tensor,
) -> tuple[torch.Tensor, torch.Tensor]:
"""Select the final hidden state, crop the template, and trim batch-one padding."""
if outputs.hidden_states is None:
raise ValueError("LingBot-Video requires text-encoder hidden states")
prompt_embeds = outputs.hidden_states[-1][:, PROMPT_CROP_START:]
prompt_mask = attention_mask[:, PROMPT_CROP_START:]
if prompt_embeds.shape[0] == 1:
true_length = int(prompt_mask[0].sum().item())
prompt_embeds = prompt_embeds[:, :true_length]
prompt_mask = prompt_mask[:, :true_length]
return prompt_embeds, prompt_maskfastvideo.configs.pipelines.lingbot_video.LingBotVideoT2VConfig
LingBotVideoT2VConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float | None = None, flow_shift: float | None = 3.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = True, is_causal: bool = False, dit_config: DiTConfig = LingBotVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = 'fp32', vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (LingBotVideoQwen3VLTextConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable, ...] = (lambda: (preprocess_lingbot_video_prompt,))(), postprocess_text_funcs: tuple[Callable, ...] = (lambda: (postprocess_lingbot_video_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None)
Released Dense T2V component wiring and numerical precision policy.
Source
@dataclass
class LingBotVideoT2VConfig(PipelineConfig):
"""Released Dense T2V component wiring and numerical precision policy."""
dit_config: DiTConfig = field(default_factory=LingBotVideoConfig)
vae_config: VAEConfig = field(default_factory=WanVAEConfig)
text_encoder_configs: tuple[EncoderConfig, ...] = field(default_factory=lambda: (LingBotVideoQwen3VLTextConfig(), ))
preprocess_text_funcs: tuple[Callable, ...] = field(default_factory=lambda: (preprocess_lingbot_video_prompt, ))
postprocess_text_funcs: tuple[Callable, ...] = field(default_factory=lambda: (postprocess_lingbot_video_text, ))
text_encoder_precisions: tuple[str, ...] = field(default_factory=lambda: ("bf16", ))
dit_precision: str = "bf16"
vae_precision: str = "fp32"
vae_decode_precision: str | None = "fp32"
vae_tiling: bool = False
vae_sp: bool = False
flow_shift: float | None = 3.0
embedded_cfg_scale: float | None = None
scheduler_step_in_fp32: bool = True
def __post_init__(self) -> None:
"""Load only the VAE decoder for the T2V workload."""
self.vae_config.load_encoder = False
self.vae_config.load_decoder = True</code></pre></details>