Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

LatentBatch fix for video latents

comfyanonymousa00e1489d224
diff --git a/comfy_extras/nodes_latent.py b/comfy_extras/nodes_latent.py
index af2736818..d266cd293 100644
--- a/comfy_extras/nodes_latent.py
+++ b/comfy_extras/nodes_latent.py
@@ -117,7 +117,7 @@ class LatentBatch:
s2 = samples2["samples"]
if s1.shape[1:] != s2.shape[1:]:
- s2 = comfy.utils.common_upscale(s2, s1.shape[3], s1.shape[2], "bilinear", "center")
+ s2 = comfy.utils.common_upscale(s2, s1.shape[-1], s1.shape[-2], "bilinear", "center")
s = torch.cat((s1, s2), dim=0)
samples_out["samples"] = s
samples_out["batch_index"] = samples1.get("batch_index", [x for x in range(0, s1.shape[0])]) + samples2.get("batch_index", [x for x in range(0, s2.shape[0])])