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.

Make flux controlnet work with sd3 text enc. (#8599)

comfyanonymous7e9267fa77c9
diff --git a/comfy/ldm/flux/controlnet.py b/comfy/ldm/flux/controlnet.py
index dbd2a47c0..7dcf82bbf 100644
--- a/comfy/ldm/flux/controlnet.py
+++ b/comfy/ldm/flux/controlnet.py
@@ -123,6 +123,8 @@ class ControlNetFlux(Flux):
if y is None:
y = torch.zeros((img.shape[0], self.params.vec_in_dim), device=img.device, dtype=img.dtype)
+ else:
+ y = y[:, :self.params.vec_in_dim]
# running on sequences img
img = self.img_in(img)