Skip to content

Commit f7fb193

Browse files
Small flux optimization. (comfyanonymous#8611)
1 parent 7e9267f commit f7fb193

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy/ldm/flux/layers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def forward(self, vec: Tensor) -> tuple:
118118
def apply_mod(tensor, m_mult, m_add=None, modulation_dims=None):
119119
if modulation_dims is None:
120120
if m_add is not None:
121-
return tensor * m_mult + m_add
121+
return torch.addcmul(m_add, tensor, m_mult)
122122
else:
123123
return tensor * m_mult
124124
else:

0 commit comments

Comments
 (0)