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 dtype issue with hidream o1 (#13849)

comfyanonymous0155ddcbe32b
diff --git a/comfy/text_encoders/qwen35.py b/comfy/text_encoders/qwen35.py
index d0bbec3e6..b022009b1 100644
--- a/comfy/text_encoders/qwen35.py
+++ b/comfy/text_encoders/qwen35.py
@@ -451,9 +451,8 @@ class Qwen35VisionPatchEmbed(nn.Module):
self.proj = ops.Conv3d(self.in_channels, self.embed_dim, kernel_size=kernel_size, stride=kernel_size, bias=True, device=device, dtype=dtype)
def forward(self, x):
- target_dtype = self.proj.weight.dtype
x = x.view(-1, self.in_channels, self.temporal_patch_size, self.patch_size, self.patch_size)
- return self.proj(x.to(target_dtype)).view(-1, self.embed_dim)
+ return self.proj(x).view(-1, self.embed_dim)
class Qwen35VisionMLP(nn.Module):