Phase 0: safety net — vendored VAE, test suite, CI gating#10
Open
AshishKumar4 wants to merge 3 commits into
Open
Phase 0: safety net — vendored VAE, test suite, CI gating#10AshishKumar4 wants to merge 3 commits into
AshishKumar4 wants to merge 3 commits into
Conversation
diffusers removed all Flax/JAX support upstream (huggingface/diffusers#14169), which would break our latent diffusion path on any fresh install. The VAE modules are now vendored (Apache-2.0, attribution in vae.py) with a direct HF hub msgpack loader, verified against the real weights (26.6dB roundtrip PSNR on a real image). transformers/wandb/huggingface_hub were also load-bearing but undeclared. Also fixes the README install instructions which pointed at a requirements.txt that does not exist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…plers, config and trainer Every architecture gets a forward-shape test, schedulers get invariant tests (variance preservation, invertibility, EDM lognormal), predictors get exact round-trip tests, and samplers are tested end to end against an analytic gaussian oracle denoiser which they must converge to. Known bugs are encoded as strict xfails so the suite is green now and the fixes must flip them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pushes to main were auto-publishing untested code to PyPI with the pytest step commented out. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 23, 2026
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.
First PR of the revamp series (phases 0/1/2 are stacked; review in order).
Why
The July 2026 audit found the repo has zero tests, auto-publishes to PyPI on every push, and depends on diffusers' Flax support — which upstream deleted on 2026-07-21 (huggingface/diffusers#14169) while
diffuserswasn't even declared inpyproject.toml. This PR builds the safety net everything else lands on.What
flaxdiff/models/autoencoder/vae.py, Apache-2.0 attribution) with a direct HF hub msgpack loader replacingFlaxAutoencoderKL.from_pretrained. Verified against real weights: correct 8x downscale / 4 latent channels, 26.6dB roundtrip PSNR on a real image. Declared the other load-bearing-but-undeclared deps (transformers,wandb,huggingface_hub) and pinneddiffusers>=0.29,<0.35(only needed for thediffusers_unet_simplearch now).parse_config; trainer save/restore smoke tests.xfail(strict=True)— the suite is green today, and Phase 1's fixes must flip each one (strict means a fixed bug that still carries the marker fails the build). The xfail list is effectively the Phase 1 worklist: sampler step-domain bug, UViT double-hilbert, DDPM batch crash, DDIM eta, RK4, video shapes, opt_state lost on resume, training without wandb crashing, silent config drops, and more.-m "not network"); PyPI publish moved from push-to-main to releases only.Verification
pytest -m "not network": 39 passed, 17 xfailed. Network-marked VAE tests pass locally (weights download + reconstruction PSNR).🤖 Generated with Claude Code