Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Lerp_Latent is a shallow copy and overwrites latent A #98

Open
Hsad opened this issue Sep 21, 2023 · 0 comments
Open

[bug] Lerp_Latent is a shallow copy and overwrites latent A #98

Hsad opened this issue Sep 21, 2023 · 0 comments
Assignees
Labels
status: 🧹 needs triage This issue needs to triage, applied to new issues type: 🐛 bug Something isn't working

Comments

@Hsad
Copy link

Hsad commented Sep 21, 2023

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))},)
@Hsad Hsad added status: 🧹 needs triage This issue needs to triage, applied to new issues type: 🐛 bug Something isn't working labels Sep 21, 2023
@melMass melMass added this to the Release of v0.2.0 milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: 🧹 needs triage This issue needs to triage, applied to new issues type: 🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants