Skip to content

Recover: compact per-token timestep for conditioned denoising#18

Merged
TroyHernandez merged 1 commit into
mainfrom
fix/recover-compact-temb
Jul 7, 2026
Merged

Recover: compact per-token timestep for conditioned denoising#18
TroyHernandez merged 1 commit into
mainfrom
fix/recover-compact-temb

Conversation

@TroyHernandez

Copy link
Copy Markdown
Contributor

Recovers a commit that was in the working tree but unpushed when #16 was squash-merged (session restarts interrupted between commit and push). It is the memory fix that makes chained continuation renders fit on 16GB: the conditioned per-token timestep takes exactly two values, so the transformer takes a 2-entry timestep + per-token index and the JIT stack selects modulation slices on demand instead of materializing ~2GB. Parity-tested; the chain render validated end to end on this code.

With prefix conditioning the per-token video timestep takes exactly
two values (t for free tokens, 0 for conditioned), but materializing
it per token cost ~1GB of temb plus ~1GB of per-block modulation
transients at 13500 tokens -- enough to OOM the chained 960x960x113f
render that the 12600-token i2v render squeaked past. The transformer
now takes cond_token_index alongside a 2-entry timestep: the compiled
stack's new modtok() selects each modulation vector per token on
demand (one ~110MB slice at a time), the eager fallback expands temb
up front as before, and the output layer expands embedded_timestep on
either path. Parity test ties the compact representation to the eager
per-token expansion at 1e-4.
@TroyHernandez TroyHernandez merged commit f44b20b into main Jul 7, 2026
0 of 2 checks passed
@TroyHernandez TroyHernandez deleted the fix/recover-compact-temb branch July 7, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant