Pass explicit latent layout to the GenCeption VAE decoder - #13
Open
sylvesterkaczmarek wants to merge 1 commit into
Open
sylvesterkaczmarek wants to merge 1 commit into
sylvesterkaczmarek wants to merge 1 commit into
Conversation
sylvesterkaczmarek
marked this pull request as ready for review
September 19, 2026 18:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pass channels-last latents explicitly from
GenCeptionPipeline.decode_video()to the VAE, whose preferred input layout is[B, T, H, W, C].The pipeline's input contract is channels-first. The VAE currently guesses the layout from whether the last dimension equals
z_dim. When latent width equals the 16 channels, it treats width as channels and decodes the wrong temporal/spatial axes. With a real reduced-size VAE, input(1, 16, 2, 1, 16)produces(1, 61, 16, 8, 3)instead of(1, 5, 8, 128, 3).The fix adds an explicit transpose after latent denormalization. No change to the VAE's public layout heuristic, normalization, or checkpoint loading.
Validation
CPU, macOS arm64, Python 3.12, JAX 0.7.2, Flax 0.11.2:
9912d29; width 3 is an unchanged control.git diff --checkpassed.Tests use small random VAE weights, not pretrained weights or a transformer forward pass. GPU inference was not run. The unpinned JAX 0.11.2/Flax 0.12.9 environment fails in Flax NNX import (
HiPrimitive) even before the patch; dependency compatibility is unchanged and was not bundled into this fix.