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.

Fix potential issue with text projection matrix multiplication.

comfyanonymouse3d0a9a49019
diff --git a/comfy/sd1_clip.py b/comfy/sd1_clip.py
index 4a4e0fe30..4616ca4e9 100644
--- a/comfy/sd1_clip.py
+++ b/comfy/sd1_clip.py
@@ -156,7 +156,7 @@ class SD1ClipModel(torch.nn.Module, ClipTokenWeightEncoder):
pooled_output = outputs.pooler_output
if self.text_projection is not None:
- pooled_output = pooled_output.to(self.text_projection.device) @ self.text_projection
+ pooled_output = pooled_output.float().to(self.text_projection.device) @ self.text_projection.float()
return z.float(), pooled_output.float()
def encode(self, tokens):