Views
No views yet
meanflow_tse_fp32.onnx (1375.6 MB)t_predictor_fp32.onnx (63.4 MB)meanflow_tse_fp16.onnx (688.2 MB)t_predictor_fp16.onnx (31.8 MB)meanflow_tse_int8.onnx (345.8 MB)t_predictor_int8.onnx (16.4 MB)evaluation_wavs/ directory.onnxruntime-gpu enabled. Numbers are averaged across 8 standard evaluation audio sets (combinations of target voices ref-voice1 to ref-voice4 and noisy mixtures mixed_noise and mixed_raw).| Model Format | Load Status | Avg Latency (ms) | Avg WAV MAE | Size Saving | Notes & Recommendations |
|---|---|---|---|---|---|
| PyTorch (Baseline) | Success | 761.1 ms | Baseline | 0% (1.43 GB) | PyTorch lightning codebase dependency |
| ONNX FP32 | Success | 692.8 ms | 2.71e-05 | 0% (1.43 GB) | 10% faster than PyTorch, mathematically equivalent |
| ONNX FP16 | Success | 676.3 ms | 9.91e-03 | 50% saving | Best for GPU. Under 1% WAV difference, no audible noise |
| ONNX INT8 | Success | 6716.1 ms | 2.62e-02 | 75% saving | Best for CPU (AVX512/AMX). High latency on GPU due to CPU emulations |
TimestepEmbedder (udit_meanflow.py) hardcoded a .float() casting, leading to a type mismatch error when multiplied by float16 weights. We modified this behavior to dynamically cast the embeddings to match the MLP's weight precision:1# Fixed code inside udit_meanflow.py
2t_freq = self.timestep_embedding(t, self.frequency_embedding_size)
3t_freq = t_freq.to(self.mlp[0].weight.dtype) # Dynamic precision casting
4t_emb = self.mlp(t_freq)1import onnxruntime as ort
2import numpy as np
3
4# Select CUDA Execution Provider
5providers = [('CUDAExecutionProvider', {'device_id': 0}), 'CPUExecutionProvider']
6
7# Load FP16 sessions
8tp_session = ort.InferenceSession("t_predictor_fp16.onnx", providers=providers)
9udit_session = ort.InferenceSession("meanflow_tse_fp16.onnx", providers=providers)
10
11# Example: T-Predictor Inference
12# Inputs: mixture (Batch, Time_Steps), enrollment (Batch, Time_Steps)
13mixture_data = np.random.randn(1, 48000).astype(np.float16) # Use float16 for FP16 models
14enroll_data = np.random.randn(1, 48000).astype(np.float16)
15
16tp_inputs = {"mixture": mixture_data, "enrollment": enroll_data}
17tp_outputs = tp_session.run(None, tp_inputs)
18alpha = tp_outputs[0]
19print("Predicted Alpha:", alpha)backend/exp/best-clean-weights.ckptbackend/exp/t-predictor-clean-weights.ckptLICENSE file for details.