Performance & Inference Improvements 性能与推理改进

Over the last few releases we reworked the SXSEditor inference stack to run faster on NVIDIA GPUs and to be more robust across hardware. This article summarizes what changed, with a focus on the WindowsML TensorRT-RTX execution provider and the ~4× FP16 inference speedup it delivers on an NVIDIA GeForce RTX 5060 Laptop.

在最近几个版本中,我们重构了 SXSEditor 的推理栈,使其在 NVIDIA GPU 上运行更快、并在不同硬件上更加稳健。本文总结了这些改动,重点介绍 WindowsML TensorRT-RTX 执行提供器,以及它在 NVIDIA GeForce RTX 5060 Laptop 上带来的约 4 倍 FP16 推理加速

ℹ️

Related reading: Application Updates (v2.0.2) · Model Updates · Inference Pipeline.

相关阅读:应用更新(v2.0.2)· 模型更新 · 推理管线

WindowsML TensorRT-RTX: ~4× FP16 speedup WindowsML TensorRT-RTX:约 4 倍 FP16 加速

SXSEditor now ships FP16 ONNX models that can run on NVIDIA GPUs through the Windows ML (WinML) NvTensorRTRTXExecutionProvider (TensorRT via the MSIX WinML runtime, ORT 1.27 + TensorRT-RTX). When the TensorRT-RTX path is available and model files are present, preflow, diff_step and vocoder are loaded on the [winml:NvTensor] backend with DML (and CPU) as automatic fallbacks.

SXSEditor 现在提供 FP16 ONNX 模型,可通过 Windows ML (WinML)NvTensorRTRTXExecutionProvider(基于 MSIX WinML 运行时封装 TensorRT,ORT 1.27 + TensorRT-RTX)在 NVIDIA GPU 上运行。当 TensorRT-RTX 路径可用且模型文件存在时,preflowdiff_stepvocoder 会在 [winml:NvTensor] 后端加载,并自动以 DML(以及 CPU)作为回退。

We measured both model-level p50 latency and end-to-end synthesis on an NVIDIA GeForce RTX 5060 Laptop (8 GB), Windows 11 24H2. The TensorRT-RTX FP16 path is roughly 4–5× faster than the DML FP32 baseline on individual models, and approx. 4× faster end-to-end for a single 16-step segment.

我们在 NVIDIA GeForce RTX 5060 Laptop(8 GB)、Windows 11 24H2 上测得了模型级 p50 延迟与端到端合成时间。TensorRT-RTX 的 FP16 路径在单个模型上比 DML FP32 基线快约 4–5 倍,对于单个 16 步乐段,端到端约快 4 倍

Model (p50)模型(p50) DML FP32DML FP32 TensorRT-RTX FP16TensorRT-RTX FP16 Speedup加速比
diff_step (seq=512)diff_step(seq=512) 49 ms49 ms 10 ms10 ms ≈ 4.9×≈ 4.9×
vocoder (200 frames)vocoder(200 帧) 31 ms31 ms 7 ms7 ms ≈ 4.4×≈ 4.4×
End-to-end (971 frames, 16 steps)端到端(971 帧,16 步) ≈ 4×≈ 4×

TensorRT-RTX is opt-in: the app exposes a one-click TensorRT-RTX diagnostic and keeps the TRT dynamic profile generation optional. Model files are drop-in compatible with the existing fp16/ folder, so switching between DML and TensorRT-RTX requires no extra downloads.

TensorRT-RTX 为可选开启:应用提供一键 TensorRT-RTX 诊断,并保持 TRT 动态 profile 生成可选。模型文件与现有 fp16/ 目录直接兼容,因此在 DML 与 TensorRT-RTX 之间切换无需额外下载。

Native backend selection 原生后端选择

The old WAML-enabled checkbox has been replaced by a native inference backend selector in Settings. A single execution provider now serves multiple hardware paths — you pick a preferred backend (e.g. TensorRT-RTX, DML, WebNN NPU/GPU or CPU) and SXSEditor falls back automatically when a path is unavailable. This removes a whole class of "model loaded on CPU" surprises and makes hardware switching explicit.

设置中旧的 WinML 开关已被原生推理后端选择器取代。单一执行提供器现可服务多条硬件路径——你选择一个首选后端(如 TensorRT-RTXDMLWebNN NPU/GPUCPU),当某条路径不可用时 SXSEditor 会自动回退。这消除了一整类"模型意外跑到 CPU 上"的问题,也让硬件切换变得清晰。

Robustness: zero-output protection & D2H fallback 稳健性:全零输出保护与 D2H 回退

Latency & streaming improvements 延迟与流式改进

How to enable it 如何启用

  1. Install the latest v2.0.2 build.
  2. 安装最新的 v2.0.2 版本。
  3. Open Settings → Backend and select TensorRT-RTX (NVIDIA) after running the built-in diagnostic.
  4. 打开 设置 → 后端,运行内置诊断后选择 TensorRT-RTX (NVIDIA)
  5. Confirm the log shows [winml:NvTensor] for preflow / diff_step / vocoder.
  6. 确认日志中 preflow / diff_step / vocoder 显示 [winml:NvTensor]