lt-tensor 0.0.1.dev1__py3-none-any.whl → 0.0.1.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lt_tensor/__init__.py +1 -1
- lt_tensor/misc_utils.py +1 -1
- lt_tensor/transform.py +5 -8
- {lt_tensor-0.0.1.dev1.dist-info → lt_tensor-0.0.1.dev3.dist-info}/METADATA +1 -1
- {lt_tensor-0.0.1.dev1.dist-info → lt_tensor-0.0.1.dev3.dist-info}/RECORD +8 -8
- {lt_tensor-0.0.1.dev1.dist-info → lt_tensor-0.0.1.dev3.dist-info}/WHEEL +0 -0
- {lt_tensor-0.0.1.dev1.dist-info → lt_tensor-0.0.1.dev3.dist-info}/licenses/LICENSE +0 -0
- {lt_tensor-0.0.1.dev1.dist-info → lt_tensor-0.0.1.dev3.dist-info}/top_level.txt +0 -0
lt_tensor/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.0.
|
1
|
+
__version__ = "0.0.1dev3"
|
lt_tensor/misc_utils.py
CHANGED
lt_tensor/transform.py
CHANGED
@@ -175,7 +175,7 @@ def get_sinusoidal_embedding(timesteps: torch.Tensor, dim: int) -> torch.Tensor:
|
|
175
175
|
return emb
|
176
176
|
|
177
177
|
|
178
|
-
def
|
178
|
+
def _generate_window(
|
179
179
|
M: int, alpha: float = 0.5, device: Optional[DeviceType] = None
|
180
180
|
) -> Tensor:
|
181
181
|
if M < 1:
|
@@ -260,7 +260,7 @@ def window_sumsquare(
|
|
260
260
|
x = torch.zeros(total_length, dtype=dtype, device=device)
|
261
261
|
|
262
262
|
# Get the window (from scipy for now)
|
263
|
-
win =
|
263
|
+
win = _generate_window(window_spec, win_length, fftbins=True)
|
264
264
|
win = torch.tensor(win, dtype=dtype, device=device)
|
265
265
|
|
266
266
|
# Normalize and square
|
@@ -277,9 +277,6 @@ def window_sumsquare(
|
|
277
277
|
return x
|
278
278
|
|
279
279
|
|
280
|
-
def get_window(win_length: int = 1200):
|
281
|
-
return generate_window(win_length)
|
282
|
-
|
283
280
|
|
284
281
|
def inverse_transform(
|
285
282
|
spec: Tensor,
|
@@ -288,10 +285,10 @@ def inverse_transform(
|
|
288
285
|
n_fft: int = 2048,
|
289
286
|
hop_length: int = 300,
|
290
287
|
win_length: int = 1200,
|
291
|
-
length: Optional[
|
288
|
+
length: Optional[Any] = None,
|
292
289
|
):
|
293
290
|
if window is None:
|
294
|
-
window =
|
291
|
+
window = _generate_window(win_length)
|
295
292
|
return torch.istft(
|
296
293
|
spec * torch.exp(phase * 1j),
|
297
294
|
n_fft,
|
@@ -313,7 +310,7 @@ def stft_istft_rebuild(
|
|
313
310
|
Perform STFT followed by ISTFT reconstruction using magnitude and phase.
|
314
311
|
"""
|
315
312
|
if window is None:
|
316
|
-
window =
|
313
|
+
window = _generate_window(win_length)
|
317
314
|
st = torch.stft(
|
318
315
|
input_data,
|
319
316
|
n_fft,
|
@@ -1,11 +1,11 @@
|
|
1
|
-
lt_tensor/__init__.py,sha256=
|
1
|
+
lt_tensor/__init__.py,sha256=pUB05ZkgkpP10ivzwoWdbq_HCxw-iOsbf6m8eFtx-YM,26
|
2
2
|
lt_tensor/_basics.py,sha256=XS2OrvyzboUTKURGMU1fmbn2gFq2779HW8xz05fm4x8,8181
|
3
3
|
lt_tensor/_torch_commons.py,sha256=_2Eck-MsQ46PxW5ku7NJvNSL5vg54_4GkLCqdzFevwA,402
|
4
4
|
lt_tensor/lr_schedulers.py,sha256=oLYw2X78KSdlOD0pwPO0lsBj1xqLOAzT8rnRBnCO19o,3560
|
5
5
|
lt_tensor/math_ops.py,sha256=4jUTtS1ZwJnh1AaFGhMuKTcakjwLQ846AKcBoDEwudI,1862
|
6
|
-
lt_tensor/misc_utils.py,sha256=
|
6
|
+
lt_tensor/misc_utils.py,sha256=Zo9p-iwRLNwVBk5kRP5sPCw7IiOBST9hW7LBK9JKCVs,19189
|
7
7
|
lt_tensor/monotonic_align.py,sha256=LhBd8p1xdBzg6jQrQX1j7b4PNeYGwIqM24zcU-pHOLE,2239
|
8
|
-
lt_tensor/transform.py,sha256=
|
8
|
+
lt_tensor/transform.py,sha256=CbTzqRUzl-U-2KMHtYUgiliU_61H3cag8a-N526nzdg,9124
|
9
9
|
lt_tensor/model_zoo/__init__.py,sha256=sIidI3gSoxTq2OTenqADiFlmd9EH8rS_mzjLePdNHqc,77
|
10
10
|
lt_tensor/model_zoo/basic.py,sha256=Ccjg26-gnqbkOUg0aNnLhZmsfvMwqTxXVXimfC5qnl0,1862
|
11
11
|
lt_tensor/model_zoo/residual.py,sha256=iViJ5MrIY1vUbPB0ZiOjh62wfQagbPulMvbZPTXp-OU,7370
|
@@ -14,8 +14,8 @@ lt_tensor/model_zoo/diffusion/models.py,sha256=LRf5B2MPic4Dwfvg2PxG61KFtqvATV3wO
|
|
14
14
|
lt_tensor/model_zoo/transformer_models/__init__.py,sha256=NOvCP-EySkNHLbGOxFMURp0AztvJQSNo9J_0hsEzLto,130
|
15
15
|
lt_tensor/model_zoo/transformer_models/models.py,sha256=Xh2nq83w0qMX-Co7EmaQb_auq7Fi7kyULklc0_yq3oo,4088
|
16
16
|
lt_tensor/model_zoo/transformer_models/positional_encoders.py,sha256=ilJDKAonnU0973BT_7gT5ke_8PbWHMxsr8EvNQHAcUY,3529
|
17
|
-
lt_tensor-0.0.1.
|
18
|
-
lt_tensor-0.0.1.
|
19
|
-
lt_tensor-0.0.1.
|
20
|
-
lt_tensor-0.0.1.
|
21
|
-
lt_tensor-0.0.1.
|
17
|
+
lt_tensor-0.0.1.dev3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
18
|
+
lt_tensor-0.0.1.dev3.dist-info/METADATA,sha256=cIBisih0DD2ZXdcHxjEUofVmPG8L0BxhIiym7AIkVSo,1055
|
19
|
+
lt_tensor-0.0.1.dev3.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
20
|
+
lt_tensor-0.0.1.dev3.dist-info/top_level.txt,sha256=35FuhFeXnUyvHWdbVHGPh0hS8euofafnJ_GJAVSF4Kk,10
|
21
|
+
lt_tensor-0.0.1.dev3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|