fastvideo.v1.pipelines.stages.latent_preparation
#
Latent preparation stage for diffusion pipelines.
Module Contents#
Classes#
Stage for preparing initial latent variables for the diffusion process. |
Data#
API#
- class fastvideo.v1.pipelines.stages.latent_preparation.LatentPreparationStage(scheduler, transformer)[source]#
Bases:
fastvideo.v1.pipelines.stages.base.PipelineStage
Stage for preparing initial latent variables for the diffusion process.
This stage handles the preparation of the initial latent variables that will be denoised during the diffusion process.
Initialization
- adjust_video_length(batch: fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch, fastvideo_args: fastvideo.v1.fastvideo_args.FastVideoArgs) int [source]#
Adjust video length based on VAE version.
- Parameters:
batch β The current batch information.
fastvideo_args β The inference arguments.
- Returns:
The batch with adjusted video length.
- forward(batch: fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch, fastvideo_args: fastvideo.v1.fastvideo_args.FastVideoArgs) fastvideo.v1.pipelines.pipeline_batch_info.ForwardBatch [source]#
Prepare initial latent variables for the diffusion process.
- Parameters:
batch β The current batch information.
fastvideo_args β The inference arguments.
- Returns:
The batch with prepared latent variables.