Fix WanVAE_.encode() to return both mu and log_var - #574
Conversation
|
bump on this — the encode() method was only returning mu and dropping log_var, which breaks anyone trying to use the VAE's full latent distribution. would appreciate a review |
|
Hi! Quick status: this still applies cleanly to the latest main as of today, and the PR is still mergeable. Re-requesting a review. If this looks good now, I would be happy to see it merged; if the repo has moved on, I am just as happy to close it. |
|
Closing this one to tidy up my open pull requests. It's been open around five months with no review activity, and I'd rather withdraw it than leave it sitting in your queue. Nothing needed from you, and no hard feelings at all. If the fix is still wanted, this can be reopened, or I'm happy to redo it properly against current main. Apologies for the noise. |
Summary
WanVAE_.encode()to return bothmuandlog_varas expected byforward()scaleparameter optional (defaults toNone) in bothencode()anddecode()methodsProblem
The
forward()method callsself.encode(x)expecting two return values (mu, log_var):However,
encode()was only returningmu, causing aValueError: not enough values to unpack.Additionally,
encode(x, scale)required thescaleparameter, butforward()didn't pass it.Changes
encode()to return(mu, log_var)tuplescaleparameter optional withscale=Nonedefaultscaleparameter optional indecode()as well for consistencyWanVAE.encode()wrapper to extract onlymuwith[0]indexRelated Issue
Fixes #556
Test Plan
forward()now works without passing scale (uses no scaling when scale=None)