Repository navigation
perf(vae): batch spatial padding in Hunyuan causal convolutions - #2374
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thank you for your contribution. |
…art 1) The last step towards upstream master comes in three parts. This first one takes the commits before the Diffusion Graph Language rewrite: - two unused ggml compat functions removed, so the library links against a shared libggml 1.0.0 (leejet#2363); - asym_w4a8_int8 defaults to group size 16, as in ComfyUI (leejet#2388); - batched spatial padding in the Hunyuan causal convolutions (leejet#2374) and fewer CUDA launches in the H3 VAE encoder (leejet#2369); - documentation: Windows ROCm 0xC0000135, Off Grid AI, the server's browser notification (leejet#2356, leejet#2372, leejet#2318). The merge is clean; no fork code changes. Verified with a CPU build: the library, sd-cli and sd-server build, and all nine unit-test programs pass. Claude-Session: https://claude.ai/code/session_01EhZzDBkuuMp1jBf4WtEySC
Summary
Fold frames and channels into one dimension (
[W, H, T * C]) viaggml_ext_contandggml_reshape_3dduring spatialreplicate_padin Hunyuan's sharedCausalConv3d, then restore the 4D shape before convolution. This avoids per-channel CUDACONCATkernel launches while keeping temporal padding and carry unchanged.Related Issue / Discussion
N/A
Additional Information
Tested on RTX 5070 Ti Laptop (sm_120, CUDA 13.4, Vulkan 1.4, Windows Release) against
532d2c1. StandaloneCausalConv3dchecks (10 edge cases including non-contiguous views and temporal carry, plus 4 larger spatial shapes) are byte-identical on CPU, CUDA, and Vulkan separately. FP16 HunyuanVideo 1.5 VAE runs (512x288, 5 frames; 1 warmup + mean of 2 runs) produce byte-identical latents and decoded pixels on both CUDA and Vulkan.512x288, 5 frames, FP16)Full video generation and Metal were not tested.
Checklist
Summary by CodeRabbit