Repository navigation
Conversation
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.
Summary
Add SeaCache as an opt-in, model-agnostic probe metric inside DBCache. It applies the official separable SEA/Wiener filter before the existing relative-L1 decision; it does not introduce a new
CacheTypeor calibrator.Related to #1363.
What changed
cache_contexts/seacache_uitls.pywith fp32 FFT/iFFT, mean-normalized gains, flow/VP/explicit AB schedules, and dense/packed image/video geometry validation.DBCacheConfig(enable_seacache=False)plusseacache_mode,seacache_feature_shape,seacache_power_exp, andseacache_ab_schedule; expose matching YAML and CLI options.CacheType.DBCache, artifact names, buffers, cache guards, and execution path unchanged when disabled.CachedContextManager.similarity()body. Onlycan_cache()dispatches to the newseacache_similarity()when explicitly enabled, retaining the SGLang patch point.apply_cache()never consumes a filtered tensor as a cache value.This is a DBCache Fn-probe adaptation, not a reproduction of the official whole-step execution path. Missing scheduler coefficients or incompatible geometry fail loudly instead of silently using raw L1.
Tests and compatibility
can_cache()diff and decisions against a single full-tensor reference on every rank.FLUX.1-dev E2E
Environment: RTX PRO 5000, physical GPU 2, torch 2.15.0+cu132, 1024x1024, 28 steps, seed 0. Cached arms use compile, F1B0, warmup 8, and max continuous cached steps 3. SeaCache uses flow mode, global geometry 64x64, and power exponent 2.
Same-config repeat for SeaCache rdt=0.24: 33.46dB / 0.9887 SSIM.
At the same rdt=0.12, SeaCache halves cache hits and is slower than reuse while improving precision. At rdt=0.24 it reaches a similar hit count, but does not show a stable precision advantage. FFT cost and compile/image noise prevent a universal speed or quality ranking. This is a single-prompt wiring probe, not a claim that SeaCache generally outperforms DBCache.
Ulysses CP2
PSNR/SSIM between the CP2 outputs: 31.37 / 0.9728. Single-card and CP2 SeaCache diff distributions match; both complete without hangs or rank-divergent decisions.
Visual comparison
All outputs preserve the cat, sign, and
Hello worldtext; no black images or structural corruption were observed.