---
title: lingbotworld2
---

<div class="python-reference">
<a id="fastvideo.configs.pipelines.lingbotworld2-classes"></a>
<a id="fastvideo.configs.pipelines.lingbotworld2"></a>

<h2 id="fastvideo.configs.pipelines.lingbotworld2.DiTConfig"><code>fastvideo.configs.pipelines.lingbotworld2.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.lingbotworld2.DiTConfig.add_cli_args"><code>fastvideo.configs.pipelines.lingbotworld2.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.lingbotworld2.LingBotWorld2CausalFastVideoConfig"><code>fastvideo.configs.pipelines.lingbotworld2.LingBotWorld2CausalFastVideoConfig</code></h2>
<pre class="doc-signature"><code>LingBotWorld2CausalFastVideoConfig(arch_config: DiTArchConfig = LingBotWorld2CausalFastArchConfig(), prefix: str = &#x27;Wan&#x27;, quant_config: QuantizationConfig | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)</code></pre>


<h2 id="fastvideo.configs.pipelines.lingbotworld2.BaseEncoderOutput"><code>fastvideo.configs.pipelines.lingbotworld2.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.lingbotworld2.LingBotWorld2UMT5Config"><code>fastvideo.configs.pipelines.lingbotworld2.LingBotWorld2UMT5Config</code></h2>
<pre class="doc-signature"><code>LingBotWorld2UMT5Config(arch_config: TextEncoderArchConfig = LingBotWorld2UMT5ArchConfig(), prefix: str = &#x27;text_encoder&#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>


<h2 id="fastvideo.configs.pipelines.lingbotworld2.WanVAEConfig"><code>fastvideo.configs.pipelines.lingbotworld2.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.lingbotworld2.Wan2_2_I2V_A14B_Config"><code>fastvideo.configs.pipelines.lingbotworld2.Wan2_2_I2V_A14B_Config</code></h2>
<pre class="doc-signature"><code>Wan2_2_I2V_A14B_Config(model_path: str = &#x27;&#x27;, pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = WanVideoConfig(), 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 = &#x27;bf16&#x27;, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = CLIPVisionConfig(), 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: (T5Config(),))(), 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: (t5_postprocess_text,))(), dmd_denoising_steps: list&#91;int&#93; | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = 0.9, precision: str = &#x27;bf16&#x27;, warp_denoising_step: bool = True)</code></pre>


<h2 id="fastvideo.configs.pipelines.lingbotworld2.lingbotworld2_whitespace_preprocess"><code>fastvideo.configs.pipelines.lingbotworld2.lingbotworld2_whitespace_preprocess</code></h2>
<pre class="doc-signature"><code>lingbotworld2_whitespace_preprocess(prompt: str) -&gt; str</code></pre>

<details><summary>Source</summary><pre><code>def lingbotworld2_whitespace_preprocess(prompt: str) -&gt; str:
    text = ftfy.fix_text(prompt)
    text = html.unescape(html.unescape(text))
    return &quot; &quot;.join(text.strip().split())</code></pre></details>
<h2 id="fastvideo.configs.pipelines.lingbotworld2.lingbotworld2_t5_postprocess_text"><code>fastvideo.configs.pipelines.lingbotworld2.lingbotworld2_t5_postprocess_text</code></h2>
<pre class="doc-signature"><code>lingbotworld2_t5_postprocess_text(outputs: BaseEncoderOutput) -&gt; torch.Tensor</code></pre>

<details><summary>Source</summary><pre><code>def lingbotworld2_t5_postprocess_text(outputs: BaseEncoderOutput) -&gt; torch.Tensor:
    assert outputs.last_hidden_state is not None
    return outputs.last_hidden_state</code></pre></details>
<h2 id="fastvideo.configs.pipelines.lingbotworld2.LingBotWorld2CausalFastI2V480PConfig"><code>fastvideo.configs.pipelines.lingbotworld2.LingBotWorld2CausalFastI2V480PConfig</code></h2>
<pre class="doc-signature"><code>LingBotWorld2CausalFastI2V480PConfig(model_path: str = &#x27;&#x27;, pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 10.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = LingBotWorld2CausalFastVideoConfig(), dit_precision: str = &#x27;bf16&#x27;, upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = &#x27;fp32&#x27;, vae_config: WanVAEConfig = 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 = CLIPVisionConfig(), 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 = (lambda: (LingBotWorld2UMT5Config(),))(), text_encoder_precisions: tuple&#91;str, ...&#93; = (lambda: (&#x27;bf16&#x27;,))(), preprocess_text_funcs: tuple = (lambda: (lingbotworld2_whitespace_preprocess,))(), postprocess_text_funcs: tuple = (lambda: (lingbotworld2_t5_postprocess_text,))(), dmd_denoising_steps: list&#91;int&#93; | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = 0.947, precision: str = &#x27;bf16&#x27;, warp_denoising_step: bool = True)</code></pre>


<details><summary>Source</summary><pre><code>@dataclass
class LingBotWorld2CausalFastI2V480PConfig(Wan2_2_I2V_A14B_Config):
    dit_config: DiTConfig = field(default_factory=LingBotWorld2CausalFastVideoConfig)
    vae_config: WanVAEConfig = field(default_factory=WanVAEConfig)
    text_encoder_configs: tuple = field(default_factory=lambda: (LingBotWorld2UMT5Config(), ))
    preprocess_text_funcs: tuple = field(default_factory=lambda: (lingbotworld2_whitespace_preprocess, ))
    postprocess_text_funcs: tuple = field(default_factory=lambda: (lingbotworld2_t5_postprocess_text, ))
    text_encoder_precisions: tuple&#91;str, ...&#93; = field(default_factory=lambda: (&quot;bf16&quot;, ))
    flow_shift: float | None = 10.0
    boundary_ratio: float | None = 0.947
    vae_precision: str = &quot;fp32&quot;
    vae_decode_precision: str | None = &quot;fp32&quot;
    vae_tiling: bool = False
    vae_sp: bool = False
    dit_precision: str = &quot;bf16&quot;
    is_causal: bool = False

    def __post_init__(self) -&gt; None:
        self.vae_config.load_encoder = True
        self.vae_config.load_decoder = True</code></pre></details>
</div>
