fastvideo.v1.pipelines.stages.encoding#

Encoding stage for diffusion pipelines.

Module Contents#

Classes#

EncodingStage

Stage for encoding pixel representations into latent space.

Data#

API#

class fastvideo.v1.pipelines.stages.encoding.EncodingStage(vae: fastvideo.v1.models.vaes.common.ParallelTiledVAE)[source]#

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

Stage for encoding pixel representations into latent space.

This stage handles the encoding of pixel representations into the final input format (e.g., latents).

Initialization

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 pixel representations into latent space.

Parameters:
  • batch – The current batch information.

  • fastvideo_args – The inference arguments.

Returns:

The batch with encoded outputs.

preprocess(image: PIL.Image.Image, vae_scale_factor: int, height: Optional[int] = None, width: Optional[int] = None, resize_mode: str = 'default') torch.Tensor[source]#
retrieve_latents(encoder_output: torch.Tensor, generator: Optional[torch.Generator] = None, sample_mode: str = 'sample')[source]#
fastvideo.v1.pipelines.stages.encoding.logger[source]#

β€˜init_logger(…)’