File tree 2 files changed +14
-0
lines changed
src/diffusers/pipelines/wan
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -458,6 +458,13 @@ def __call__(
458
458
callback_on_step_end_tensor_inputs ,
459
459
)
460
460
461
+ if num_frames % self .vae_scale_factor_temporal != 1 :
462
+ logger .warning (
463
+ f"`num_frames - 1` has to be divisible by { self .vae_scale_factor_temporal } . Rounding to the nearest number."
464
+ )
465
+ num_frames = num_frames // self .vae_scale_factor_temporal * self .vae_scale_factor_temporal + 1
466
+ num_frames = max (num_frames , 1 )
467
+
461
468
self ._guidance_scale = guidance_scale
462
469
self ._attention_kwargs = attention_kwargs
463
470
self ._current_timestep = None
Original file line number Diff line number Diff line change @@ -559,6 +559,13 @@ def __call__(
559
559
callback_on_step_end_tensor_inputs ,
560
560
)
561
561
562
+ if num_frames % self .vae_scale_factor_temporal != 1 :
563
+ logger .warning (
564
+ f"`num_frames - 1` has to be divisible by { self .vae_scale_factor_temporal } . Rounding to the nearest number."
565
+ )
566
+ num_frames = num_frames // self .vae_scale_factor_temporal * self .vae_scale_factor_temporal + 1
567
+ num_frames = max (num_frames , 1 )
568
+
562
569
self ._guidance_scale = guidance_scale
563
570
self ._attention_kwargs = attention_kwargs
564
571
self ._current_timestep = None
You can’t perform that action at this time.
0 commit comments