MocHa: remove possibly alpha channel from inputs

This commit is contained in:
kijai
2025-10-21 23:26:17 +03:00
parent 2ea824b9ab
commit 6b286552b7
+3 -3
View File
@@ -119,10 +119,10 @@ class MochaEmbeds:
gc.collect() gc.collect()
vae.to(device) vae.to(device)
input_video = input_video.to(device, vae.dtype).unsqueeze(0).permute(0, 4, 1, 2, 3) input_video = input_video.clone()[..., :3].to(device, vae.dtype).unsqueeze(0).permute(0, 4, 1, 2, 3)
ref1 = ref1.clone().to(device, vae.dtype).unsqueeze(0).permute(0, 4, 1, 2, 3) ref1 = ref1.clone()[..., :3].to(device, vae.dtype).unsqueeze(0).permute(0, 4, 1, 2, 3)
if ref2 is not None: if ref2 is not None:
ref2 = ref2.clone().to(device, vae.dtype).unsqueeze(0).permute(0, 4, 1, 2, 3) ref2 = ref2.clone()[..., :3].to(device, vae.dtype).unsqueeze(0).permute(0, 4, 1, 2, 3)
latents = vae.encode(input_video * 2.0 - 1.0, device, tiled=tiled_vae) latents = vae.encode(input_video * 2.0 - 1.0, device, tiled=tiled_vae)