Repository navigation
Expose YuE2 performance controls and cuda_perf preset - #1056
Merged
Merged
Conversation
Reuse backend KV storage and session-owned attention-window graphs. Keep lazy batched import scratch opt-in, lower CUDA SnakeBeta through existing fusion, and preserve native VAE storage in the performance preset.
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
yue2.perf_mode=off|cuda_perfusing a preset table. Explicit settings override the preset, includingfalseand alignment1.cuda_perfyue2.packed_projectionsfalsetrueyue2.kv_cache_alignment1256yue2.mem_savertruefalseyue2.vae_tile_frames512Implementation
lazy_import_scratchoption only on the new direct-prefill/windowed path; existing batched callers retain eager allocation. New external-cache arguments default to null and attention-window alignment defaults to zero.beta + 1e-9. Other backends/shapes keep their previous lowering.Performance
Frozen main
80e66d2cversus PR733f1b2c. Complete official tonight-awake example, full CoT, seed12300, 8 NAR steps, original sampling settings and natural stopping. Debug/C++17, CUDA RTX 5090, 12 CPU threads, Q8 backbone with the same native F16 VAE package.Each row used one full warmup and two measured requests in one session, run sequentially. RTF is total measured
session.wall_msdivided by generated duration. Peak VRAM includes loading and warmup, sampled every 20 ms.cuda_perfcuda_perf0.13890versus main0.14136(1.7% faster), so no consistent slowdown was observed.cuda_perfreduces warm RTF by 15.4% / 47.1% at CFG 1 / 2, at the cost of 2,798 / 4,158 MiB more peak VRAM than main default.Regression Validation
Shared SnakeBeta Check
AuK-Flash Q8 (3-second generation) and SAM Audio Small Q8 (6-second separation) were checked separately against main. One warmup plus three measured requests per build, fixed input/seed; outputs were repeat-stable.
SAM's CUDA encoder workspace increases from
641.60to773.44 MiB, accounting for the 132 MiB memory tradeoff. The cosine differences alone do not demonstrate an output-quality regression; both models ran faster in this recheck.Metal was not run locally. All inference runs were logged; benchmark scripts, local assets, and validation logs are excluded from the PR.