fastvideo.v1.pipelines.stages.text_encoding

fastvideo.v1.pipelines.stages.text_encoding#

Prompt encoding stages for diffusion pipelines.

This module contains implementations of prompt encoding stages for diffusion pipelines.

Module Contents#

Classes#

TextEncodingStage

Stage for encoding text prompts into embeddings for diffusion models.

Data#

API#

class fastvideo.v1.pipelines.stages.text_encoding.TextEncodingStage(text_encoders, tokenizers)[source]#

Bases: fastvideo.v1.pipelines.stages.base.PipelineStage

Stage for encoding text prompts into embeddings for diffusion models.

This stage handles the encoding of text prompts into the embedding space expected by the diffusion model.

Initialization

Initialize the prompt encoding stage.

Parameters:
  • enable_logging – Whether to enable logging for this stage.

  • is_secondary – Whether this is a secondary text encoder.

forward(batch: fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch, fastvideo_args: fastvideo.v1.fastvideo_args.FastVideoArgs) fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch[source]#

Encode the prompt into text encoder hidden states.

Parameters:
  • batch – The current batch information.

  • fastvideo_args – The inference arguments.

Returns:

The batch with encoded prompt embeddings.

fastvideo.v1.pipelines.stages.text_encoding.logger[source]#

β€˜init_logger(…)’