fastvideo.v1.pipelines.stages.image_encoding

fastvideo.v1.pipelines.stages.image_encoding#

Image encoding stages for I2V diffusion pipelines.

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

Module Contents#

Classes#

ImageEncodingStage

Stage for encoding image prompts into embeddings for diffusion models.

Data#

API#

class fastvideo.v1.pipelines.stages.image_encoding.ImageEncodingStage(image_encoder, image_processor)[source]#

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

Stage for encoding image prompts into embeddings for diffusion models.

This stage handles the encoding of image 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 image 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 image 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.image_encoding.logger[source]#

β€˜init_logger(…)’