Skip to content

stages

Pipeline stages for the native Z-Image text-to-image path.

Classes

fastvideo.pipelines.basic.zimage.stages.ZImageConditioningStage

Bases: PipelineStage

Trim padded Qwen states and materialize variable-length CFG streams.

fastvideo.pipelines.basic.zimage.stages.ZImageDecodingStage

ZImageDecodingStage(vae)

Bases: PipelineStage

Apply the official latent transform and decode one image frame.

Source code in fastvideo/pipelines/basic/zimage/stages.py
def __init__(self, vae) -> None:
    self.vae = vae

fastvideo.pipelines.basic.zimage.stages.ZImageDenoisingStage

ZImageDenoisingStage(transformer, scheduler)

Bases: PipelineStage

Run the native Z-Image flow-matching loop.

Source code in fastvideo/pipelines/basic/zimage/stages.py
def __init__(self, transformer, scheduler) -> None:
    self.transformer = transformer
    self.scheduler = scheduler

fastvideo.pipelines.basic.zimage.stages.ZImageInputValidationStage

Bases: InputValidationStage

Validate the image geometry and reproduce the official device RNG.

fastvideo.pipelines.basic.zimage.stages.ZImageLatentPreparationStage

ZImageLatentPreparationStage(transformer)

Bases: PipelineStage

Create the official fp32 image latents on the transformer device.

Source code in fastvideo/pipelines/basic/zimage/stages.py
def __init__(self, transformer) -> None:
    self.transformer = transformer

fastvideo.pipelines.basic.zimage.stages.ZImageTimestepPreparationStage

ZImageTimestepPreparationStage(scheduler)

Bases: PipelineStage

Apply the native scheduler's zero endpoint and discrete schedule.

Source code in fastvideo/pipelines/basic/zimage/stages.py
def __init__(self, scheduler) -> None:
    self.scheduler = scheduler

Functions: