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#
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.