Skip to content

flux_2_text_encoding

Flux2 text encoding stages.

Classes

fastvideo.pipelines.basic.flux_2.flux_2_text_encoding.Flux2TextEncodingStage

Flux2TextEncodingStage(text_encoders, tokenizers)

Bases: TextEncodingStage

Text encoding for Flux2 full and Klein variants.

Source code in fastvideo/pipelines/stages/text_encoding.py
def __init__(self, text_encoders, tokenizers) -> None:
    """
    Initialize the prompt encoding stage.

    Args:
        enable_logging: Whether to enable logging for this stage.
        is_secondary: Whether this is a secondary text encoder.
    """
    super().__init__()
    self.tokenizers = tokenizers
    self.text_encoders = text_encoders
    self._last_audio_embeds: list[torch.Tensor] | None = None

Functions: