timestep_preparation ¶
Timestep preparation stages for diffusion pipelines.
This module contains implementations of timestep preparation stages for diffusion pipelines.
Classes¶
fastvideo.pipelines.stages.timestep_preparation.Cosmos25TimestepPreparationStage ¶
Bases: TimestepPreparationStage
Cosmos 2.5 timestep preparation with scheduler-specific kwargs.
Source code in fastvideo/pipelines/stages/timestep_preparation.py
fastvideo.pipelines.stages.timestep_preparation.SD35TimestepPreparationStage ¶
Bases: TimestepPreparationStage
SD3/SD3.5 timestep preparation with optional dynamic shifting (mu).
When the scheduler supports use_dynamic_shifting, this stage computes a resolution-dependent mu value and passes it to set_timesteps().
Source code in fastvideo/pipelines/stages/timestep_preparation.py
fastvideo.pipelines.stages.timestep_preparation.TimestepPreparationStage ¶
Bases: PipelineStage
Stage for preparing timesteps for the diffusion process.
This stage handles the preparation of the timestep sequence that will be used during the diffusion process.
Source code in fastvideo/pipelines/stages/timestep_preparation.py
Methods:¶
fastvideo.pipelines.stages.timestep_preparation.TimestepPreparationStage.forward ¶
forward(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> ForwardBatch
Prepare timesteps for the diffusion process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch | ForwardBatch | The current batch information. | required |
fastvideo_args | FastVideoArgs | The inference arguments. | required |
Returns:
| Type | Description |
|---|---|
ForwardBatch | The batch with prepared timesteps. |
Source code in fastvideo/pipelines/stages/timestep_preparation.py
fastvideo.pipelines.stages.timestep_preparation.TimestepPreparationStage.verify_input ¶
verify_input(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> VerificationResult
Verify timestep preparation stage inputs.
Source code in fastvideo/pipelines/stages/timestep_preparation.py
fastvideo.pipelines.stages.timestep_preparation.TimestepPreparationStage.verify_output ¶
verify_output(batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> VerificationResult
Verify timestep preparation stage outputs.