---
title: lingbot_video
---

<div class="python-reference">
<a id="fastvideo.configs.pipelines.lingbot_video-classes"></a>
<a id="fastvideo.configs.pipelines.lingbot_video-functions"></a>
<a id="fastvideo.configs.pipelines.lingbot_video.LingBotVideoT2VConfig-functions"></a>
<a id="fastvideo.configs.pipelines.lingbot_video.LingBotVideoT2VConfig.__post_init__"></a>
<a id="fastvideo.configs.pipelines.lingbot_video"></a>
<p>Dense LingBot-Video T2V pipeline configuration.</p>
<h2 id="fastvideo.configs.pipelines.lingbot_video.DiTConfig"><code>fastvideo.configs.pipelines.lingbot_video.DiTConfig</code></h2>
<pre class="doc-signature"><code>DiTConfig(arch_config: DiTArchConfig = DiTArchConfig(), prefix: str = &#x27;&#x27;, quant_config: QuantizationConfig | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)</code></pre>


<h3 id="fastvideo.configs.pipelines.lingbot_video.DiTConfig.add_cli_args"><code>fastvideo.configs.pipelines.lingbot_video.DiTConfig.add_cli_args</code></h3>
<pre class="doc-signature"><code>add_cli_args(parser: Any, prefix: str = &#x27;dit-config&#x27;) -&gt; Any</code></pre>
<p>Add CLI arguments for DiTConfig fields</p>
<h2 id="fastvideo.configs.pipelines.lingbot_video.EncoderConfig"><code>fastvideo.configs.pipelines.lingbot_video.EncoderConfig</code></h2>
<pre class="doc-signature"><code>EncoderConfig(arch_config: ArchConfig = EncoderArchConfig(), prefix: str = &#x27;&#x27;, quant_config: QuantizationConfig | None = None, lora_config: Any | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)</code></pre>


<h2 id="fastvideo.configs.pipelines.lingbot_video.VAEConfig"><code>fastvideo.configs.pipelines.lingbot_video.VAEConfig</code></h2>
<pre class="doc-signature"><code>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)</code></pre>


<h3 id="fastvideo.configs.pipelines.lingbot_video.VAEConfig.add_cli_args"><code>fastvideo.configs.pipelines.lingbot_video.VAEConfig.add_cli_args</code></h3>
<pre class="doc-signature"><code>add_cli_args(parser: Any, prefix: str = &#x27;vae-config&#x27;) -&gt; Any</code></pre>
<p>Add CLI arguments for VAEConfig fields</p>
<h3 id="fastvideo.configs.pipelines.lingbot_video.VAEConfig.from_cli_args"><code>fastvideo.configs.pipelines.lingbot_video.VAEConfig.from_cli_args</code></h3>
<pre class="doc-signature"><code>from_cli_args(args: argparse.Namespace) -&gt; VAEConfig</code></pre>

<h2 id="fastvideo.configs.pipelines.lingbot_video.LingBotVideoConfig"><code>fastvideo.configs.pipelines.lingbot_video.LingBotVideoConfig</code></h2>
<pre class="doc-signature"><code>LingBotVideoConfig(arch_config: DiTArchConfig = LingBotVideoArchConfig(), prefix: str = &#x27;&#x27;, quant_config: QuantizationConfig | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)</code></pre>
<p>FastVideo component configuration for LingBot-Video transformers.</p>

<h2 id="fastvideo.configs.pipelines.lingbot_video.BaseEncoderOutput"><code>fastvideo.configs.pipelines.lingbot_video.BaseEncoderOutput</code></h2>
<pre class="doc-signature"><code>BaseEncoderOutput(last_hidden_state: torch.FloatTensor | None = None, pooler_output: torch.FloatTensor | None = None, hidden_states: tuple&#91;torch.FloatTensor, ...&#93; | None = None, attentions: tuple&#91;torch.FloatTensor, ...&#93; | None = None, attention_mask: torch.Tensor | None = None)</code></pre>


<h2 id="fastvideo.configs.pipelines.lingbot_video.LingBotVideoQwen3VLTextConfig"><code>fastvideo.configs.pipelines.lingbot_video.LingBotVideoQwen3VLTextConfig</code></h2>
<pre class="doc-signature"><code>LingBotVideoQwen3VLTextConfig(arch_config: TextEncoderArchConfig = LingBotVideoQwen3VLTextArchConfig(), prefix: str = &#x27;language_model&#x27;, 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)</code></pre>
<p>FastVideo loader config for the LingBot-Video text-only Qwen3-VL path.</p>

<h2 id="fastvideo.configs.pipelines.lingbot_video.WanVAEConfig"><code>fastvideo.configs.pipelines.lingbot_video.WanVAEConfig</code></h2>
<pre class="doc-signature"><code>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)</code></pre>


<h2 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig</code></h2>
<pre class="doc-signature"><code>PipelineConfig(model_path: str = &#x27;&#x27;, 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 = &#x27;bf16&#x27;, upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = &#x27;fp32&#x27;, vae_config: VAEConfig = VAEConfig(), vae_precision: str = &#x27;fp32&#x27;, vae_decode_precision: str | None = None, vae_tiling: bool = True, vae_sp: bool = True, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = &#x27;fp32&#x27;, image_encoder_configs: tuple&#91;EncoderConfig, ...&#93; | None = None, image_encoder_precisions: tuple&#91;str, ...&#93; | None = None, text_encoder_configs: tuple&#91;EncoderConfig, ...&#93; = (lambda: (EncoderConfig(),))(), text_encoder_precisions: tuple&#91;str, ...&#93; = (lambda: (&#x27;fp32&#x27;,))(), preprocess_text_funcs: tuple&#91;Callable&#91;&#91;str&#93;, str&#93;, ...&#93; = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple&#91;Callable&#91;&#91;BaseEncoderOutput&#93;, torch.tensor&#93;, ...&#93; = (lambda: (postprocess_text,))(), dmd_denoising_steps: list&#91;int&#93; | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None)</code></pre>
<p>Base configuration for all pipeline architectures.</p>

<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.add_cli_args"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.add_cli_args</code></h3>
<pre class="doc-signature"><code>add_cli_args(parser: FlexibleArgumentParser, prefix: str = &#x27;&#x27;) -&gt; FlexibleArgumentParser</code></pre>

<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.update_config_from_dict"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.update_config_from_dict</code></h3>
<pre class="doc-signature"><code>update_config_from_dict(args: dict&#91;str, Any&#93;, prefix: str = &#x27;&#x27;) -&gt; None</code></pre>

<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.from_pretrained"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.from_pretrained</code></h3>
<pre class="doc-signature"><code>from_pretrained(model_path: str) -&gt; PipelineConfig</code></pre>
<p>use the pipeline class setting from model_path to match the pipeline config</p>
<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.from_kwargs"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.from_kwargs</code></h3>
<pre class="doc-signature"><code>from_kwargs(kwargs: dict&#91;str, Any&#93;, config_cli_prefix: str = &#x27;&#x27;) -&gt; PipelineConfig</code></pre>
<p>Load PipelineConfig from kwargs Dictionary.
kwargs: dictionary of kwargs
config_cli_prefix: prefix of CLI arguments for this PipelineConfig instance</p>
<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.check_pipeline_config"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.check_pipeline_config</code></h3>
<pre class="doc-signature"><code>check_pipeline_config() -&gt; None</code></pre>

<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.resolve_checkpoint_settings"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.resolve_checkpoint_settings</code></h3>
<pre class="doc-signature"><code>resolve_checkpoint_settings(fastvideo_args: FastVideoArgs) -&gt; None</code></pre>
<p>Apply the run settings that the checkpoint at <code>fastvideo_args.model_path</code> fixes.</p>
<p><code>FastVideoArgs.__post_init__</code> 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.</p>
<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.apply_request_constraints"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.apply_request_constraints</code></h3>
<pre class="doc-signature"><code>apply_request_constraints(request: GenerationRequest, sampling_param: SamplingParam) -&gt; SamplingParam</code></pre>
<p>Apply this model's constraints on a generation request to its sampling parameters.</p>
<p><code>sampling_param</code> 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.</p>
<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.dump_to_json"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.dump_to_json</code></h3>
<pre class="doc-signature"><code>dump_to_json(file_path: str)</code></pre>

<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.load_from_json"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.load_from_json</code></h3>
<pre class="doc-signature"><code>load_from_json(file_path: str)</code></pre>

<h3 id="fastvideo.configs.pipelines.lingbot_video.PipelineConfig.update_pipeline_config"><code>fastvideo.configs.pipelines.lingbot_video.PipelineConfig.update_pipeline_config</code></h3>
<pre class="doc-signature"><code>update_pipeline_config(source_pipeline_dict: dict&#91;str, Any&#93;) -&gt; None</code></pre>

<h2 id="fastvideo.configs.pipelines.lingbot_video.preprocess_lingbot_video_prompt"><code>fastvideo.configs.pipelines.lingbot_video.preprocess_lingbot_video_prompt</code></h2>
<pre class="doc-signature"><code>preprocess_lingbot_video_prompt(prompt: str) -&gt; str</code></pre>
<p>Apply the released T2V system/user/assistant prompt template.</p>
<details><summary>Source</summary><pre><code>def preprocess_lingbot_video_prompt(prompt: str) -&gt; str:
    &quot;&quot;&quot;Apply the released T2V system/user/assistant prompt template.&quot;&quot;&quot;
    return PROMPT_TEMPLATE.format(prompt)</code></pre></details>
<h2 id="fastvideo.configs.pipelines.lingbot_video.postprocess_lingbot_video_text"><code>fastvideo.configs.pipelines.lingbot_video.postprocess_lingbot_video_text</code></h2>
<pre class="doc-signature"><code>postprocess_lingbot_video_text(outputs: BaseEncoderOutput, attention_mask: torch.Tensor) -&gt; tuple&#91;torch.Tensor, torch.Tensor&#93;</code></pre>
<p>Select the final hidden state, crop the template, and trim batch-one padding.</p>
<details><summary>Source</summary><pre><code>def postprocess_lingbot_video_text(
    outputs: BaseEncoderOutput,
    attention_mask: torch.Tensor,
) -&gt; tuple&#91;torch.Tensor, torch.Tensor&#93;:
    &quot;&quot;&quot;Select the final hidden state, crop the template, and trim batch-one padding.&quot;&quot;&quot;
    if outputs.hidden_states is None:
        raise ValueError(&quot;LingBot-Video requires text-encoder hidden states&quot;)
    prompt_embeds = outputs.hidden_states&#91;-1&#93;&#91;:, PROMPT_CROP_START:&#93;
    prompt_mask = attention_mask&#91;:, PROMPT_CROP_START:&#93;
    if prompt_embeds.shape&#91;0&#93; == 1:
        true_length = int(prompt_mask&#91;0&#93;.sum().item())
        prompt_embeds = prompt_embeds&#91;:, :true_length&#93;
        prompt_mask = prompt_mask&#91;:, :true_length&#93;
    return prompt_embeds, prompt_mask</code></pre></details>
<h2 id="fastvideo.configs.pipelines.lingbot_video.LingBotVideoT2VConfig"><code>fastvideo.configs.pipelines.lingbot_video.LingBotVideoT2VConfig</code></h2>
<pre class="doc-signature"><code>LingBotVideoT2VConfig(model_path: str = &#x27;&#x27;, 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 = &#x27;bf16&#x27;, upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = &#x27;fp32&#x27;, vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = &#x27;fp32&#x27;, vae_decode_precision: str | None = &#x27;fp32&#x27;, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = &#x27;fp32&#x27;, image_encoder_configs: tuple&#91;EncoderConfig, ...&#93; | None = None, image_encoder_precisions: tuple&#91;str, ...&#93; | None = None, text_encoder_configs: tuple&#91;EncoderConfig, ...&#93; = (lambda: (LingBotVideoQwen3VLTextConfig(),))(), text_encoder_precisions: tuple&#91;str, ...&#93; = (lambda: (&#x27;bf16&#x27;,))(), preprocess_text_funcs: tuple&#91;Callable, ...&#93; = (lambda: (preprocess_lingbot_video_prompt,))(), postprocess_text_funcs: tuple&#91;Callable, ...&#93; = (lambda: (postprocess_lingbot_video_text,))(), dmd_denoising_steps: list&#91;int&#93; | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None)</code></pre>
<p>Released Dense T2V component wiring and numerical precision policy.</p>

<details><summary>Source</summary><pre><code>@dataclass
class LingBotVideoT2VConfig(PipelineConfig):
    &quot;&quot;&quot;Released Dense T2V component wiring and numerical precision policy.&quot;&quot;&quot;

    dit_config: DiTConfig = field(default_factory=LingBotVideoConfig)
    vae_config: VAEConfig = field(default_factory=WanVAEConfig)
    text_encoder_configs: tuple&#91;EncoderConfig, ...&#93; = field(default_factory=lambda: (LingBotVideoQwen3VLTextConfig(), ))
    preprocess_text_funcs: tuple&#91;Callable, ...&#93; = field(default_factory=lambda: (preprocess_lingbot_video_prompt, ))
    postprocess_text_funcs: tuple&#91;Callable, ...&#93; = field(default_factory=lambda: (postprocess_lingbot_video_text, ))
    text_encoder_precisions: tuple&#91;str, ...&#93; = field(default_factory=lambda: (&quot;bf16&quot;, ))
    dit_precision: str = &quot;bf16&quot;
    vae_precision: str = &quot;fp32&quot;
    vae_decode_precision: str | None = &quot;fp32&quot;
    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) -&gt; None:
        &quot;&quot;&quot;Load only the VAE decoder for the T2V workload.&quot;&quot;&quot;
        self.vae_config.load_encoder = False
        self.vae_config.load_decoder = True</code></pre></details>
</div>
