Skip to content

Commit 8c48ec0

Browse files
SlimRGa-r-r-o-w
andauthored
Fix bf15/fp16 for pipeline_wan_vace.py (#12143)
* Fix bf15/fp16 for pipeline_wan_vace.py * Update pipeline_wan_vace.py * try removing xfail decorator --------- Co-authored-by: Aryan <[email protected]>
1 parent a6d2fc2 commit 8c48ec0

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/diffusers/pipelines/wan/pipeline_wan_vace.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,7 @@ def prepare_video_latents(
525525
latents = retrieve_latents(self.vae.encode(video), generator, sample_mode="argmax").unbind(0)
526526
latents = ((latents.float() - latents_mean) * latents_std).to(vae_dtype)
527527
else:
528-
mask = mask.to(dtype=vae_dtype)
529-
mask = torch.where(mask > 0.5, 1.0, 0.0)
528+
mask = torch.where(mask > 0.5, 1.0, 0.0).to(dtype=vae_dtype)
530529
inactive = video * (1 - mask)
531530
reactive = video * mask
532531
inactive = retrieve_latents(self.vae.encode(inactive), generator, sample_mode="argmax")

tests/lora/test_lora_layers_wanvace.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import unittest
1919

2020
import numpy as np
21-
import pytest
2221
import safetensors.torch
2322
import torch
2423
from PIL import Image
@@ -160,11 +159,6 @@ def test_simple_inference_with_text_lora_fused(self):
160159
def test_simple_inference_with_text_lora_save_load(self):
161160
pass
162161

163-
@pytest.mark.xfail(
164-
condition=True,
165-
reason="RuntimeError: Input type (float) and bias type (c10::BFloat16) should be the same",
166-
strict=True,
167-
)
168162
def test_layerwise_casting_inference_denoiser(self):
169163
super().test_layerwise_casting_inference_denoiser()
170164

0 commit comments

Comments
 (0)