Skip to content

Commit 332f918

Browse files
committed
align scheduler
1 parent 189ab41 commit 332f918

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

fastvideo/pipelines/basic/wan/wan_svi_i2v_pipeline.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from fastvideo.fastvideo_args import FastVideoArgs
1515
from fastvideo.logger import init_logger
16+
from fastvideo.models.schedulers.scheduling_flow_match_euler_discrete import FlowMatchEulerDiscreteScheduler
1617
from fastvideo.pipelines.basic.wan.wan_i2v_pipeline import WanImageToVideoPipeline
1718
from fastvideo.pipelines.pipeline_batch_info import ForwardBatch
1819

@@ -39,6 +40,8 @@ class WanSVIImageToVideoPipeline(WanImageToVideoPipeline):
3940

4041
def create_pipeline_stages(self, fastvideo_args: FastVideoArgs):
4142
"""Set up pipeline stages with proper dependency injection."""
43+
self.modules["scheduler"] = FlowMatchEulerDiscreteScheduler(num_train_timesteps=1000, shift=5.0)
44+
4245
self.add_stage(stage_name="input_validation_stage", stage=InputValidationStage())
4346
self.add_stage(
4447
stage_name="prompt_encoding_stage",
@@ -86,6 +89,9 @@ def forward(self, batch: ForwardBatch, fastvideo_args: FastVideoArgs) -> Forward
8689
if not self.post_init_called:
8790
self.post_init()
8891

92+
n_steps = int(batch.num_inference_steps)
93+
batch.sigmas = torch.linspace(1.0, 0.0, n_steps + 1)[:-1].tolist()
94+
8995
num_clips = max(1, int(batch.svi_num_clips or 1))
9096
num_motion = max(1, int(batch.svi_num_motion_frames or 1))
9197

0 commit comments

Comments
 (0)