mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-01 21:07:20 +08:00
Small flux optimization. (#8611)
This commit is contained in:
parent
7e9267fa77
commit
f7fb193712
@ -118,7 +118,7 @@ class Modulation(nn.Module):
|
||||
def apply_mod(tensor, m_mult, m_add=None, modulation_dims=None):
|
||||
if modulation_dims is None:
|
||||
if m_add is not None:
|
||||
return tensor * m_mult + m_add
|
||||
return torch.addcmul(m_add, tensor, m_mult)
|
||||
else:
|
||||
return tensor * m_mult
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user