Repository navigation
🚨 Add shared DiT runtime and migrate denoiser models - #1254
Merged
Merged
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 configurable
DitModuleand session-ownedDitRuntime, and migrate CosyVoice3, MOSS SoundEffect, Stable Audio 3 Small/Medium, and Dots SOAR/MeanFlow to the shared implementation. Architecture configuration is separate from checkpoint tensor-name mappings.The shared sampling layer provides CFG/APG guidance and Euler/PingPong updates, while the existing host sampler gains midpoint/RK4 support for Dots. Graph-side sampling removes per-step prediction readback and host CFG from the migrated GGML paths. Conditioning, modulation banks, prefix caches and graph lifetimes are runtime-owned. Stable Audio APG uses the equivalent direct velocity equation.
Existing framework callers retain their defaults. FFN precision policies, packed projections and releasable graph buffers require explicit selection. There are no GGML/kernel, server, WebUI or model-spec changes. Stable Audio Foundation and CosyVoice3's native RKNN path remain unchanged.
Performance
CUDA on RTX 5090, eight CPU threads, matching packages and requests for main versus this branch. Lower RTF is faster; peak VRAM is process-level. Warmup requests are excluded where present.
MOSS uses the full 30-second denoising canvas and 100 sampling steps. Its PR timings fall within the measured main variation; no speedup is claimed for that path.
Stable Audio Small also runs on CPU: CFG-off request time is 3,100 → 2,919 ms, and CFG 4/APG is 5,026 → 4,805 ms. Peak RAM for the paired-case comparison is 1,696 → 1,695 MiB.
Parity
Arithmetic is normalized to shared framework expressions rather than preserving every original floating-point operation order. WER checks cover Mandarin/Cantonese CosyVoice3 requests, English/Mandarin SOAR requests and English MeanFlow requests. Unchanged WER establishes transcription agreement for those cases, not complete voice or perceptual equivalence.
Validation