File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/diffusers/pipelines/wan Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -419,12 +419,7 @@ def prepare_latents(
419
419
)
420
420
421
421
if latents is None :
422
- if isinstance (generator , list ):
423
- init_latents = [
424
- retrieve_latents (self .vae .encode (video [i ].unsqueeze (0 )), generator [i ]) for i in range (batch_size )
425
- ]
426
- else :
427
- init_latents = [retrieve_latents (self .vae .encode (vid .unsqueeze (0 )), generator ) for vid in video ]
422
+ init_latents = [retrieve_latents (self .vae .encode (vid .unsqueeze (0 )), sample_mode = "argmax" ) for vid in video ]
428
423
429
424
init_latents = torch .cat (init_latents , dim = 0 ).to (dtype )
430
425
@@ -441,7 +436,7 @@ def prepare_latents(
441
436
if hasattr (self .scheduler , "add_noise" ):
442
437
latents = self .scheduler .add_noise (init_latents , noise , timestep )
443
438
else :
444
- latents = self .scheduelr .scale_noise (init_latents , timestep , noise )
439
+ latents = self .scheduler .scale_noise (init_latents , timestep , noise )
445
440
else :
446
441
latents = latents .to (device )
447
442
You can’t perform that action at this time.
0 commit comments