comfy_mtb
comfy_mtb copied to clipboard
[bug] Lerp_Latent is a shallow copy and overwrites latent A
Describe the bug
The latents passed to lerp_latent are overwritten by the function
Reproduction
use multiple lerp_latent nodes, the result will drift from the expected mixture.
Expected behavior
The input latents should remain uneffected by the node
Operating System
Linux
Comfy Mode
In a custom virtual env (venv, virtualenv, conda...)
Console output
No response
Additional context
The solution appears to be replacing the lerp_latent function body with this line
def lerp_latent(self, A, B, t):
return ({"samples":(torch.lerp(A["samples"], B["samples"], t))},)
This is still an issue with this node.