[TTS][Perf] Optimize Fish Speech S2 Pro high-concurrency serving (#3773)
Signed-off-by: Sy03 <1370724210@qq.com> Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
This commit is contained in:
1 parent
37eebff674
commit
d37912b071
23 files changed
+3453
-92
No files matched your search
@@ -33,6 +33,20 @@ def test_tensor_serialization():
|
||||
assert torch.equal(tensor, deserialized)
|
||||
|
||||
|
||||
def test_noncontiguous_tensor_serialization():
|
||||
"""Test torch.Tensor serialization for strided views."""
|
||||
import torch
|
||||
|
||||
tensor = torch.arange(40, dtype=torch.long).reshape(4, 10).transpose(0, 1)
|
||||
assert not tensor.is_contiguous()
|
||||
assert tensor.stride(-1) != 1
|
||||
|
||||
serialized = OmniSerializer.serialize({"codes": tensor})
|
||||
deserialized = OmniSerializer.deserialize(serialized)
|
||||
|
||||
assert torch.equal(tensor, deserialized["codes"])
|
||||
|
||||
|
||||
def test_ndarray_serialization():
|
||||
"""Test numpy.ndarray serialization."""
|
||||
import numpy as np
|
||||
|
||||
Reference in new issue
Block a user