fastvideo.v1.pipelines.stages.base#

Base classes for pipeline stages.

This module defines the abstract base classes for pipeline stages that can be composed to create complete diffusion pipelines.

Module Contents#

Classes#

PipelineStage

Abstract base class for all pipeline stages.

Data#

API#

class fastvideo.v1.pipelines.stages.base.PipelineStage[source]#

Bases: abc.ABC

Abstract base class for all pipeline stages.

A pipeline stage represents a discrete step in the diffusion process that can be composed with other stages to create a complete pipeline. Each stage is responsible for a specific part of the process, such as prompt encoding, latent preparation, etc.

abstract backward(batch: fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch, fastvideo_args: fastvideo.v1.fastvideo_args.FastVideoArgs) fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch[source]#
property device: torch.device[source]#

Get the device for this stage.

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

Forward pass of the stageโ€™s processing.

This method should be implemented by subclasses to provide the forward processing logic for the stage.

Parameters:
  • batch โ€“ The current batch information.

  • fastvideo_args โ€“ The inference arguments.

Returns:

The updated batch information after this stageโ€™s processing.

set_logging(enable: bool)[source]#

Enable or disable logging for this stage.

Parameters:

enable โ€“ Whether to enable logging.

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

โ€˜init_logger(โ€ฆ)โ€™