hunterFormsBS 0.3.1__tar.gz → 0.3.2__tar.gz
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.
- {hunterformsbs-0.3.1 → hunterformsbs-0.3.2}/PKG-INFO +33 -27
- {hunterformsbs-0.3.1 → hunterformsbs-0.3.2}/README.md +11 -4
- hunterformsbs-0.3.2/hunterFormsBS.egg-info/PKG-INFO +388 -0
- hunterformsbs-0.3.2/hunterFormsBS.egg-info/SOURCES.txt +25 -0
- hunterformsbs-0.3.2/hunterFormsBS.egg-info/dependency_links.txt +1 -0
- hunterformsbs-0.3.2/hunterFormsBS.egg-info/requires.txt +10 -0
- hunterformsbs-0.3.2/hunterFormsBS.egg-info/top_level.txt +1 -0
- hunterformsbs-0.3.2/pyproject.toml +291 -0
- hunterformsbs-0.3.2/setup.cfg +4 -0
- hunterformsbs-0.3.2/tests/test_BandSplit.py +63 -0
- hunterformsbs-0.3.2/tests/test_import.py +27 -0
- hunterformsbs-0.3.2/tests/test_loss.py +67 -0
- hunterformsbs-0.3.2/tests/test_mask.py +138 -0
- hunterformsbs-0.3.2/tests/test_transform.py +60 -0
- hunterformsbs-0.3.1/pyproject.toml +0 -84
- {hunterformsbs-0.3.1 → hunterformsbs-0.3.2}/LICENSE +0 -0
- {hunterformsbs-0.3.1 → hunterformsbs-0.3.2}/LICENSE-Solovyev +0 -0
- {hunterformsbs-0.3.1 → hunterformsbs-0.3.2}/LICENSE-Wang +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/__init__.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/attend.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/bandSplitRotator.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/bands.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/hyperACE.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/loss.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/mask.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/py.typed +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/theTypes.py +0 -0
- {hunterformsbs-0.3.1/src → hunterformsbs-0.3.2}/hunterFormsBS/transform.py +0 -0
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hunterFormsBS
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Universal frequency-band splitter for music source separation. The BandSplitRoformer module supports BSRoformer, MelBandRoformer, and custom overlapping or non-overlapping band configurations. Fully typed, modular, and documented, including migration help, usage, and paper references. PyTorch; CUDA-accelerated.
|
|
5
|
-
Keywords: artificial intelligence,audio source separation,machine learning,music source separation
|
|
6
|
-
Author: Hunter Hogan
|
|
7
5
|
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
|
+
Maintainer-email: Hunter Hogan <HunterHogan@pm.me>
|
|
8
7
|
License-Expression: CC-BY-NC-4.0
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
Project-URL: Context7, https://context7.com/hunterhogan/hunterformsbs
|
|
9
|
+
Project-URL: Donate, https://www.patreon.com/integrated
|
|
10
|
+
Project-URL: Download, https://pypi.org/project/hunterFormsBS
|
|
11
|
+
Project-URL: Homepage, https://github.com/hunterhogan/hunterFormsBS
|
|
12
|
+
Project-URL: Issues, https://github.com/hunterhogan/hunterFormsBS/issues
|
|
13
|
+
Project-URL: Repository, https://github.com/hunterhogan/hunterFormsBS.git
|
|
14
|
+
Keywords: artificial intelligence,audio source separation,machine learning,music source separation
|
|
12
15
|
Classifier: Development Status :: 4 - Beta
|
|
13
16
|
Classifier: Environment :: Console
|
|
14
17
|
Classifier: Environment :: GPU :: NVIDIA CUDA
|
|
@@ -16,31 +19,28 @@ Classifier: Intended Audience :: Developers
|
|
|
16
19
|
Classifier: Intended Audience :: Science/Research
|
|
17
20
|
Classifier: Natural Language :: English
|
|
18
21
|
Classifier: Operating System :: OS Independent
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
23
|
Classifier: Programming Language :: Python :: 3.14
|
|
21
24
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
25
|
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
License-File: LICENSE-Solovyev
|
|
30
|
+
License-File: LICENSE-Wang
|
|
23
31
|
Requires-Dist: einops>=0.8.2
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist: more-itertools
|
|
32
|
+
Requires-Dist: hunterMakesPy>=0.7.1
|
|
33
|
+
Requires-Dist: more-itertools>=10.6.0
|
|
26
34
|
Requires-Dist: opt-einsum>=3.4.0
|
|
27
|
-
Requires-Dist: packaging
|
|
28
|
-
Requires-Dist: pope-pytorch
|
|
29
|
-
Requires-Dist: rotary-embedding-torch
|
|
35
|
+
Requires-Dist: packaging>=24.0
|
|
36
|
+
Requires-Dist: pope-pytorch>=0.1
|
|
37
|
+
Requires-Dist: rotary-embedding-torch>=0.8.6
|
|
30
38
|
Requires-Dist: torch>=2.0.0
|
|
31
|
-
Requires-Dist: torch-einops-kit
|
|
39
|
+
Requires-Dist: torch-einops-kit>=0.1.8
|
|
32
40
|
Requires-Dist: torchaudio>=2.0.0
|
|
33
|
-
|
|
34
|
-
Maintainer-email: Hunter Hogan <HunterHogan@pm.me>
|
|
35
|
-
Requires-Python: >=3.10
|
|
36
|
-
Project-URL: Context7, https://context7.com/hunterhogan/hunterformsbs
|
|
37
|
-
Project-URL: Donate, https://www.patreon.com/integrated
|
|
38
|
-
Project-URL: Download, https://pypi.org/project/hunterFormsBS
|
|
39
|
-
Project-URL: Homepage, https://github.com/hunterhogan/hunterFormsBS
|
|
40
|
-
Project-URL: Issues, https://github.com/hunterhogan/hunterFormsBS/issues
|
|
41
|
-
Project-URL: Repository, https://github.com/hunterhogan/hunterFormsBS.git
|
|
42
|
-
Description-Content-Type: text/markdown
|
|
41
|
+
Dynamic: license-file
|
|
43
42
|
|
|
43
|
+
<!-- path-sync copy -n hunterhogan -->
|
|
44
44
|
# hunterFormsBS
|
|
45
45
|
|
|
46
46
|
A flexible frequency-band splitter for music source separation, organized around a single separator family that can express BS-style, mel-style, and custom layouts.
|
|
@@ -48,7 +48,7 @@ A flexible frequency-band splitter for music source separation, organized around
|
|
|
48
48
|
Instead of treating BS-style and mel-band layouts as separate Python entry points, this package treats them as different band-layout configurations of one core design centered on `BandSplitRotator`.
|
|
49
49
|
|
|
50
50
|
[](https://pypi.org/project/hunterFormsBS/)
|
|
51
|
-
[](https://pypi.org/project/hunterFormsBS/)
|
|
52
52
|
|
|
53
53
|
The codebase is implemented in PyTorch, fully typed (`py.typed`), and designed for modular reuse so options such as PoPE, custom filter banks, and optional SageAttention acceleration can live on one aligned constructor surface.
|
|
54
54
|
|
|
@@ -374,9 +374,15 @@ comparisons with upstream repos stay easy to read.
|
|
|
374
374
|
- [context7](https://context7.com/hunterhogan/torch_einops_kit)
|
|
375
375
|
- [BibTeX citation](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/Hogan_torch-einops-kit_2026.bib)
|
|
376
376
|
|
|
377
|
+
<!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
|
|
377
378
|
## My recovery
|
|
378
379
|
|
|
379
|
-
[](https://HunterThinks.com/support)
|
|
381
|
+

|
|
382
|
+
|
|
383
|
+
By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
|
|
384
|
+
|
|
385
|
+
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
381
386
|
|
|
382
|
-
|
|
387
|
+
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
388
|
+
<!-- === OK_EDIT: path-sync hunterhogan === -->
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- path-sync copy -n hunterhogan -->
|
|
1
2
|
# hunterFormsBS
|
|
2
3
|
|
|
3
4
|
A flexible frequency-band splitter for music source separation, organized around a single separator family that can express BS-style, mel-style, and custom layouts.
|
|
@@ -5,7 +6,7 @@ A flexible frequency-band splitter for music source separation, organized around
|
|
|
5
6
|
Instead of treating BS-style and mel-band layouts as separate Python entry points, this package treats them as different band-layout configurations of one core design centered on `BandSplitRotator`.
|
|
6
7
|
|
|
7
8
|
[](https://pypi.org/project/hunterFormsBS/)
|
|
8
|
-
[](https://pypi.org/project/hunterFormsBS/)
|
|
9
10
|
|
|
10
11
|
The codebase is implemented in PyTorch, fully typed (`py.typed`), and designed for modular reuse so options such as PoPE, custom filter banks, and optional SageAttention acceleration can live on one aligned constructor surface.
|
|
11
12
|
|
|
@@ -331,9 +332,15 @@ comparisons with upstream repos stay easy to read.
|
|
|
331
332
|
- [context7](https://context7.com/hunterhogan/torch_einops_kit)
|
|
332
333
|
- [BibTeX citation](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/Hogan_torch-einops-kit_2026.bib)
|
|
333
334
|
|
|
335
|
+
<!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
|
|
334
336
|
## My recovery
|
|
335
337
|
|
|
336
|
-
[](https://HunterThinks.com/support)
|
|
339
|
+

|
|
340
|
+
|
|
341
|
+
By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
|
|
342
|
+
|
|
343
|
+
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
338
344
|
|
|
339
|
-
|
|
345
|
+
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
346
|
+
<!-- === OK_EDIT: path-sync hunterhogan === -->
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hunterFormsBS
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: Universal frequency-band splitter for music source separation. The BandSplitRoformer module supports BSRoformer, MelBandRoformer, and custom overlapping or non-overlapping band configurations. Fully typed, modular, and documented, including migration help, usage, and paper references. PyTorch; CUDA-accelerated.
|
|
5
|
+
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
|
+
Maintainer-email: Hunter Hogan <HunterHogan@pm.me>
|
|
7
|
+
License-Expression: CC-BY-NC-4.0
|
|
8
|
+
Project-URL: Context7, https://context7.com/hunterhogan/hunterformsbs
|
|
9
|
+
Project-URL: Donate, https://www.patreon.com/integrated
|
|
10
|
+
Project-URL: Download, https://pypi.org/project/hunterFormsBS
|
|
11
|
+
Project-URL: Homepage, https://github.com/hunterhogan/hunterFormsBS
|
|
12
|
+
Project-URL: Issues, https://github.com/hunterhogan/hunterFormsBS/issues
|
|
13
|
+
Project-URL: Repository, https://github.com/hunterhogan/hunterFormsBS.git
|
|
14
|
+
Keywords: artificial intelligence,audio source separation,machine learning,music source separation
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Environment :: Console
|
|
17
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: Intended Audience :: Science/Research
|
|
20
|
+
Classifier: Natural Language :: English
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
License-File: LICENSE-Solovyev
|
|
30
|
+
License-File: LICENSE-Wang
|
|
31
|
+
Requires-Dist: einops>=0.8.2
|
|
32
|
+
Requires-Dist: hunterMakesPy>=0.7.1
|
|
33
|
+
Requires-Dist: more-itertools>=10.6.0
|
|
34
|
+
Requires-Dist: opt-einsum>=3.4.0
|
|
35
|
+
Requires-Dist: packaging>=24.0
|
|
36
|
+
Requires-Dist: pope-pytorch>=0.1
|
|
37
|
+
Requires-Dist: rotary-embedding-torch>=0.8.6
|
|
38
|
+
Requires-Dist: torch>=2.0.0
|
|
39
|
+
Requires-Dist: torch-einops-kit>=0.1.8
|
|
40
|
+
Requires-Dist: torchaudio>=2.0.0
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
<!-- path-sync copy -n hunterhogan -->
|
|
44
|
+
# hunterFormsBS
|
|
45
|
+
|
|
46
|
+
A flexible frequency-band splitter for music source separation, organized around a single separator family that can express BS-style, mel-style, and custom layouts.
|
|
47
|
+
|
|
48
|
+
Instead of treating BS-style and mel-band layouts as separate Python entry points, this package treats them as different band-layout configurations of one core design centered on `BandSplitRotator`.
|
|
49
|
+
|
|
50
|
+
[](https://pypi.org/project/hunterFormsBS/)
|
|
51
|
+
[](https://pypi.org/project/hunterFormsBS/)
|
|
52
|
+
|
|
53
|
+
The codebase is implemented in PyTorch, fully typed (`py.typed`), and designed for modular reuse so options such as PoPE, custom filter banks, and optional SageAttention acceleration can live on one aligned constructor surface.
|
|
54
|
+
|
|
55
|
+
## Quick fix: size mismatch when loading a checkpoint
|
|
56
|
+
|
|
57
|
+
If loading an older BS-style checkpoint or configuration raises a size-mismatch error, check `mask_estimator_depth` in the configuration.
|
|
58
|
+
|
|
59
|
+
Some earlier configuration files effectively used `mask_estimator_depth=1` even when stored as `2` because a later subtraction was applied. This package removes that subtraction, so the direct equivalent is:
|
|
60
|
+
|
|
61
|
+
- set `mask_estimator_depth=1`
|
|
62
|
+
|
|
63
|
+
Updating that value resolves the most common mismatch quickly.
|
|
64
|
+
|
|
65
|
+
## Why this architecture helps in practice
|
|
66
|
+
|
|
67
|
+
- **Forward-looking architecture:** A single model family makes it easier to adopt new ideas, such as PoPE, HyperACE, or custom band-split definitions, while keeping interfaces aligned with established ecosystems.
|
|
68
|
+
- **Universal configuration surface:** `BandSplitRotator` exposes downstream attention, transformer, mask-estimator, optional HyperACE segmentation-branch, STFT, and loss settings on one constructor.
|
|
69
|
+
- **Rich tooling and ecosystem:** The package provides strong typing (`py.typed`), modular APIs, and rich docstrings focusing on usage, literature citations, and migration paths.
|
|
70
|
+
|
|
71
|
+
## Easy to migrate
|
|
72
|
+
|
|
73
|
+
Transitioning from older codebases is straightforward because **most downstream identifiers stay the same** and the data flow is highly similar.
|
|
74
|
+
|
|
75
|
+
If you're changing from an existing codebase, replace the older import path with `BandSplitRotator`, then choose the desired band layout with `freqs_per_bands`, `sample_rate` together with `num_bands`, or `mask_filter_bank`.
|
|
76
|
+
|
|
77
|
+
## What is unified here
|
|
78
|
+
|
|
79
|
+
The key design idea is that the difference between the BS-style front end and the mel-band front end
|
|
80
|
+
is treated as a band-layout problem, not as a reason to maintain two unrelated model families.
|
|
81
|
+
|
|
82
|
+
- `hunterFormsBS.bandSplitRotator.BandSplitRotator` is the primary unified entry point and the only public separator class exported by this package.
|
|
83
|
+
- `hunterFormsBS.bands.BandSplit`, `hunterFormsBS.mask.MaskEstimator`, `hunterFormsBS.mask.MLP`, `hunterFormsBS.loss.lossComputation`, `hunterFormsBS.attend.Attention`, and `hunterFormsBS.transform.Transformer` hold the reusable typed building blocks shared across all band-layout modes.
|
|
84
|
+
- `hunterFormsBS.hyperACE.SegmModel` supplies the optional segmentation-style mask-estimation branch used when `use_hyperACE=True`.
|
|
85
|
+
- Attention and transformer options such as `attn_dropout`, `ff_dropout`, `flash_attn`, `sage_attention`, and `scale` keep the same identifiers as they move from model constructors into downstream blocks.
|
|
86
|
+
- All user-configurable separator settings live on `BandSplitRotator`, including optional HyperACE branch settings under the `segm_*` prefix.
|
|
87
|
+
|
|
88
|
+
At the band level, the model only needs a band-membership map, called `mask_filter_bank` in the
|
|
89
|
+
codebase. You can think of that map as a Boolean matrix
|
|
90
|
+
|
|
91
|
+
$$
|
|
92
|
+
F \in \{0, 1\}^{B \times N_f}
|
|
93
|
+
$$
|
|
94
|
+
|
|
95
|
+
where $B$ is the number of bands and $N_f$ is the number of STFT frequency bins.
|
|
96
|
+
|
|
97
|
+
- In a non-overlapping BS-style layout, each frequency bin belongs to exactly one band, so
|
|
98
|
+
|
|
99
|
+
$$
|
|
100
|
+
\forall f,\; \sum_b F_{b,f} = 1.
|
|
101
|
+
$$
|
|
102
|
+
|
|
103
|
+
- In an overlapping mel-style layout, some frequency bins belong to more than one band, so
|
|
104
|
+
|
|
105
|
+
$$
|
|
106
|
+
\exists f \text{ such that } \sum_b F_{b,f} > 1.
|
|
107
|
+
$$
|
|
108
|
+
|
|
109
|
+
When bands overlap, the reconstructed mask for a frequency bin is averaged across the contributing
|
|
110
|
+
bands:
|
|
111
|
+
|
|
112
|
+
$$
|
|
113
|
+
\hat{M}_{f,t} = \frac{1}{S_f} \sum_{b : F_{b,f} = 1} \hat{M}^{(b)}_{f,t},
|
|
114
|
+
\qquad
|
|
115
|
+
S_f = \sum_b F_{b,f}.
|
|
116
|
+
$$
|
|
117
|
+
|
|
118
|
+
That is why this package makes it easy to move between overlapping and non-overlapping bands, and to
|
|
119
|
+
change how bands are distributed across the frequency axis. The architectural difference lives in the
|
|
120
|
+
filter bank, not in two separate theories of the model.
|
|
121
|
+
|
|
122
|
+
## Which band-layout mode you should use
|
|
123
|
+
|
|
124
|
+
| Use this configuration | When | Key parameters |
|
|
125
|
+
| --- | --- | --- |
|
|
126
|
+
| `BandSplitRotator` with the default non-overlapping layout | You want a BS-style frequency partition or a close comparison with non-overlapping upstream layouts. | `freqs_per_bands`, optional `num_bands` |
|
|
127
|
+
| `BandSplitRotator` with automatic mel-band construction | You want a mel-band layout computed at runtime. | `sample_rate`, `num_bands`, `melscale_fbanks_mel_scale`, `melscale_fbanks_norm` |
|
|
128
|
+
| `BandSplitRotator` with explicit custom bands | You want a checkpoint-specific or research-specific layout. | `mask_filter_bank` |
|
|
129
|
+
|
|
130
|
+
## Attention and optional acceleration
|
|
131
|
+
|
|
132
|
+
`flash_attn=True` requests PyTorch scaled-dot-product-attention backends when the active device
|
|
133
|
+
supports that path. `sage_attention=True` asks downstream `Attend` blocks to call
|
|
134
|
+
`sageattention.sageattn`; install [SageAttention](https://github.com/thu-ml/SageAttention) manually
|
|
135
|
+
before enabling it because `hunterFormsBS` does not install that package.
|
|
136
|
+
|
|
137
|
+
`BandSplitRotator` can choose RoPE or PoPE with `use_pope`, so the same model family can switch
|
|
138
|
+
positional encoders without changing entry points.
|
|
139
|
+
|
|
140
|
+
## Automatic and custom `mask_filter_bank` construction
|
|
141
|
+
|
|
142
|
+
Most users never need this section. When `mask_filter_bank` is `None` and both `sample_rate` and
|
|
143
|
+
`num_bands` are provided, `BandSplitRotator` builds mel-band layouts at runtime with
|
|
144
|
+
`torchaudio.functional.melscale_fbanks`. The constructor parameters
|
|
145
|
+
`melscale_fbanks_mel_scale` and `melscale_fbanks_norm` are forwarded to `torchaudio`, so you can
|
|
146
|
+
choose the mel-scale formula and normalization rule used for automatic mel-band construction.
|
|
147
|
+
|
|
148
|
+
For the package default mel-band layout, keep `sample_rate=44100`, `stft_n_fft=2048`,
|
|
149
|
+
`num_bands=60`, `melscale_fbanks_mel_scale='slaney'`, and `melscale_fbanks_norm='slaney'`.
|
|
150
|
+
|
|
151
|
+
When `sample_rate` and `num_bands` are not both provided, `BandSplitRotator` derives the
|
|
152
|
+
non-overlapping BS-style Boolean band-membership map from `freqs_per_bands`.
|
|
153
|
+
|
|
154
|
+
If a checkpoint uses a different band layout, pass `mask_filter_bank` explicitly as a Boolean
|
|
155
|
+
`torch.Tensor` with shape `(band, freq)`.
|
|
156
|
+
|
|
157
|
+
All optional segmentation-branch settings also live on `BandSplitRotator` under the `segm_*`
|
|
158
|
+
prefix.
|
|
159
|
+
|
|
160
|
+
## Package map
|
|
161
|
+
|
|
162
|
+
- `hunterFormsBS.__init__`
|
|
163
|
+
- Direct export: `BandSplitRotator`
|
|
164
|
+
- Purpose: small top-level namespace for the primary separator model.
|
|
165
|
+
- `hunterFormsBS.bandSplitRotator`
|
|
166
|
+
- Main symbols: `BandSplitRotator`
|
|
167
|
+
- Purpose: unified separator that can build BS-style, mel-style, or custom band layouts from one
|
|
168
|
+
model family, with downstream attention, transformer, STFT, mask-estimator, optional
|
|
169
|
+
segmentation-branch, and loss options on the constructor.
|
|
170
|
+
- `hunterFormsBS.bands`
|
|
171
|
+
- Main symbols: `BandSplit`, `DEFAULT_FREQS_PER_BANDS`
|
|
172
|
+
- Purpose: band projection layer and the BS-style default frequency-bin partition.
|
|
173
|
+
- `hunterFormsBS.loss`
|
|
174
|
+
- Main symbols: `lossComputation`
|
|
175
|
+
- Purpose: multi-resolution STFT training-loss helper.
|
|
176
|
+
- `hunterFormsBS.mask`
|
|
177
|
+
- Main symbols: `MaskEstimator`, `MLP`
|
|
178
|
+
- Purpose: mask-estimation heads and band-local affine blocks.
|
|
179
|
+
- `hunterFormsBS.attend`
|
|
180
|
+
- Main symbols: `Attend`, `Attention`
|
|
181
|
+
- Purpose: shared attention core with RoPE / PoPE, PyTorch SDPA, and optional SageAttention support.
|
|
182
|
+
- `hunterFormsBS.transform`
|
|
183
|
+
- Main symbols: `FeedForward`, `Transformer`
|
|
184
|
+
- Purpose: position-wise feedforward block and stacked attention-and-feedforward transformer.
|
|
185
|
+
- `hunterFormsBS.hyperACE`
|
|
186
|
+
- Main symbols: `SegmModel`, `HyperACE`, `Backbone`, `Decoder`, `ProgressiveUpsampleHead`
|
|
187
|
+
- Purpose: optional segmentation-style mask-estimation branch and its reusable building blocks.
|
|
188
|
+
- `hunterFormsBS.theTypes`
|
|
189
|
+
- Main symbols: `ParametersComputeLoss`, `FlashAttentionConfig`, `ParametersAttention`, `ParametersMaskEstimator`, `ParametersSTFT`, `ParametersTransformer`
|
|
190
|
+
- Purpose: typed configuration records used across the package.
|
|
191
|
+
|
|
192
|
+
## Architecture in one sentence
|
|
193
|
+
|
|
194
|
+
The stable separator path is
|
|
195
|
+
|
|
196
|
+
`raw audio → STFT → band gathering → BandSplit → hierarchical attention → MaskEstimator → mask`
|
|
197
|
+
|
|
198
|
+
followed by overlap-aware mask averaging when needed, complex masking in the STFT domain, and inverse
|
|
199
|
+
STFT reconstruction back to waveform audio.
|
|
200
|
+
|
|
201
|
+
When `use_hyperACE=True`, each `MaskEstimator` head also adds the optional segmentation-style branch
|
|
202
|
+
before the final mask accumulation step.
|
|
203
|
+
|
|
204
|
+
## Top-level exports
|
|
205
|
+
|
|
206
|
+
The top-level package namespace currently re-exports the primary model that new users most often
|
|
207
|
+
need:
|
|
208
|
+
|
|
209
|
+
- `BandSplitRotator`
|
|
210
|
+
|
|
211
|
+
Supporting modules stay under explicit submodule imports so the main namespace remains small and
|
|
212
|
+
comparisons with upstream repos stay easy to read.
|
|
213
|
+
|
|
214
|
+
## Reference materials
|
|
215
|
+
|
|
216
|
+
### Gaussian Error Linear Units (GELUs)
|
|
217
|
+
|
|
218
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/hendrycks2016gaussian.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/1606.08415)
|
|
219
|
+
- eprint: [arXiv.1606.08415](https://arXiv.org/abs/1606.08415)
|
|
220
|
+
- Implementations:
|
|
221
|
+
- [hendrycks/GELUs](https://github.com/hendrycks/GELUs)
|
|
222
|
+
- [torch.nn.GELU](https://docs.pytorch.org/docs/stable/generated/torch.nn.GELU.html)
|
|
223
|
+
|
|
224
|
+
### Language Modeling with Gated Convolutional Networks
|
|
225
|
+
|
|
226
|
+
- Common name: GLU (Gated Linear Units)
|
|
227
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/pmlr-v70-dauphin17a.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/1612.08083)
|
|
228
|
+
- Proceedings: [proceedings.mlr.press](http://proceedings.mlr.press/v70/dauphin17a/dauphin17a.pdf)
|
|
229
|
+
|
|
230
|
+
### Attention Is All You Need
|
|
231
|
+
|
|
232
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/NIPS2017_3f5ee243.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/1706.03762)
|
|
233
|
+
- Proceedings: [proceedings.neurips.cc](https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf)
|
|
234
|
+
|
|
235
|
+
### Root Mean Square Layer Normalization
|
|
236
|
+
|
|
237
|
+
- Common name: RMSNorm
|
|
238
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/NEURIPS2019_1e8a1942.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/1910.07467)
|
|
239
|
+
- Proceedings: [proceedings.neurips.cc](https://proceedings.neurips.cc/paper_files/paper/2019/hash/1e8a19426224ca89e83cef47f1e7f53b-Paper.pdf)
|
|
240
|
+
- Implementations:
|
|
241
|
+
- [bzhangGo/rmsnorm](https://github.com/bzhangGo/rmsnorm)
|
|
242
|
+
- [context7](https://context7.com/bzhangGo/rmsnorm)
|
|
243
|
+
- [hunterhogan/torch_einops_kit](https://github.com/hunterhogan/torch_einops_kit).scaleValues.RMSNorm
|
|
244
|
+
- [context7](https://context7.com/hunterhogan/torch_einops_kit)
|
|
245
|
+
|
|
246
|
+
### RoFormer: Enhanced Transformer with Rotary Position Embedding
|
|
247
|
+
|
|
248
|
+
- Common name: RoPE
|
|
249
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/SU2024127063.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2104.09864)
|
|
250
|
+
- DOI: [10.1016/j.neucom.2023.127063](https://doi.org/10.1016/j.neucom.2023.127063)
|
|
251
|
+
- Free pre-print: [arXiv:2104.09864](https://arxiv.org/abs/2104.09864)
|
|
252
|
+
- Original blog about the idea: [https://kexue.fm/archives/8265](https://kexue.fm/archives/8265)
|
|
253
|
+
- An intuitive explanation: [https://blog.eleuther.ai/rotary-embeddings/](https://blog.eleuther.ai/rotary-embeddings/)
|
|
254
|
+
- Implementations:
|
|
255
|
+
- [ZhuiyiTechnology/roformer](https://github.com/ZhuiyiTechnology/roformer)
|
|
256
|
+
- [ZhuiyiTechnology/roformer-v2](https://github.com/ZhuiyiTechnology/roformer-v2)
|
|
257
|
+
- [lucidrains/rotary-embedding-torch](https://github.com/lucidrains/rotary-embedding-torch)
|
|
258
|
+
- [context7](https://context7.com/lucidrains/rotary-embedding-torch)
|
|
259
|
+
- [hunterhogan/rotary-embedding-torch](https://github.com/hunterhogan/rotary-embedding-torch)
|
|
260
|
+
|
|
261
|
+
### XCiT: Cross-Covariance Image Transformers
|
|
262
|
+
|
|
263
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/NEURIPS2021_a655fbe4.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2106.09681)
|
|
264
|
+
- Proceedings: [proceedings.neurips.cc](https://proceedings.neurips.cc/paper_files/paper/2021/file/a655fbe4b8d7439994aa37ddad80de56-Paper.pdf)
|
|
265
|
+
|
|
266
|
+
### FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
|
|
267
|
+
|
|
268
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/NEURIPS2022_67d57c32.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2205.14135)
|
|
269
|
+
- Proceedings: [proceedings.neurips.cc](https://proceedings.neurips.cc/paper_files/paper/2022/file/67d57c32e20fd0a7a302cb81d36e40d5-Paper-Conference.pdf)
|
|
270
|
+
- Implementations:
|
|
271
|
+
- [Dao-AILab/flash-attention](https://github.com/Dao-AILab/flash-attention)
|
|
272
|
+
- [context7](https://context7.com/dao-ailab/flash-attention)
|
|
273
|
+
|
|
274
|
+
### SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Acceleration
|
|
275
|
+
|
|
276
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/ICLR2025_b286c344.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2410.02367)
|
|
277
|
+
- Proceedings: [proceedings.iclr.cc](https://proceedings.iclr.cc/paper_files/paper/2025/file/b286c344d38e10d2466c0514b78e2f36-Paper-Conference.pdf)
|
|
278
|
+
- Implementation:
|
|
279
|
+
- [thu-ml/SageAttention](https://github.com/thu-ml/SageAttention)
|
|
280
|
+
|
|
281
|
+
### SageAttention2: Efficient Attention with Thorough Outlier Smoothing and Per-thread INT4 Quantization
|
|
282
|
+
|
|
283
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/pmlr-v267-zhang25ae.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2411.10958)
|
|
284
|
+
- Proceedings: [proceedings.mlr.press](https://proceedings.mlr.press/v267/zhang25ae.html)
|
|
285
|
+
- Implementation:
|
|
286
|
+
- [thu-ml/SageAttention](https://github.com/thu-ml/SageAttention)
|
|
287
|
+
|
|
288
|
+
### SageAttention2++: A More Efficient Implementation of SageAttention2
|
|
289
|
+
|
|
290
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/zhang2025sageattention.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2505.21136)
|
|
291
|
+
- Workshop proceedings: [OpenReview](https://openreview.net/forum?id=Eev5rXcgng)
|
|
292
|
+
- Implementation:
|
|
293
|
+
- [thu-ml/SageAttention](https://github.com/thu-ml/SageAttention)
|
|
294
|
+
|
|
295
|
+
### Einops: Clear and Reliable Tensor Manipulations with Einstein-like Notation
|
|
296
|
+
|
|
297
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/rogozhnikov2022einops.bib)
|
|
298
|
+
- Proceedings: [ICLR 2022 Conference](https://openreview.net/pdf?id=oapKSVM2bcj)
|
|
299
|
+
- Implementations:
|
|
300
|
+
- [arogozhnikov/einops](https://github.com/arogozhnikov/einops)
|
|
301
|
+
- [Official documentation](https://einops.rocks/)
|
|
302
|
+
- [context7](https://context7.com/arogozhnikov/einops)
|
|
303
|
+
|
|
304
|
+
### Music Source Separation with Band-Split RoPE Transformer
|
|
305
|
+
|
|
306
|
+
- Common name: BS-RoFormer
|
|
307
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/10446843.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2309.02612)
|
|
308
|
+
- DOI: [10.1109/ICASSP48485.2024.10446843](https://doi.org/10.1109/ICASSP48485.2024.10446843)
|
|
309
|
+
- Free pre-print: [arXiv:2309.02612](https://arxiv.org/pdf/2309.02612)
|
|
310
|
+
- Implementations:
|
|
311
|
+
- [lucidrains/BS-RoFormer](https://github.com/lucidrains/BS-RoFormer)
|
|
312
|
+
- [context7](https://context7.com/lucidrains/bs-roformer)
|
|
313
|
+
|
|
314
|
+
### Mel-RoFormer for Vocal Separation and Vocal Melody Transcription
|
|
315
|
+
|
|
316
|
+
- Common name: MelBand-RoFormer
|
|
317
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/ju_chiang_wang_2024_14877371.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2409.04702)
|
|
318
|
+
- Proceedings: [10.5281/zenodo.14877371](https://doi.org/10.5281/zenodo.14877371)
|
|
319
|
+
- Implementations:
|
|
320
|
+
- [lucidrains/BS-RoFormer](https://github.com/lucidrains/BS-RoFormer)
|
|
321
|
+
- [context7](https://context7.com/lucidrains/bs-roformer)
|
|
322
|
+
|
|
323
|
+
### Sound Demixing Challenge 2023 Music Demixing Track Technical Report: TFC-TDF-UNet v3
|
|
324
|
+
|
|
325
|
+
- Common name: TFC-TDF-UNet v3
|
|
326
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/kim2023sounddemixingchallenge2023.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2306.09382)
|
|
327
|
+
- eprint: [arXiv.2306.09382](https://arxiv.org/abs/2306.09382)
|
|
328
|
+
- Implementation:
|
|
329
|
+
- [kuielab/sdx23](https://github.com/kuielab/sdx23)
|
|
330
|
+
|
|
331
|
+
### Music Source Separation Based on a Lightweight Deep Learning Framework (DTTNET: DUAL-PATH TFC-TDF UNET)
|
|
332
|
+
|
|
333
|
+
- Common name: DTTNet
|
|
334
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/chen_dttnet_2024.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2309.08684)
|
|
335
|
+
- DOI: [10.1109/ICASSP48485.2024.10448020](https://doi.org/10.1109/ICASSP48485.2024.10448020)
|
|
336
|
+
- Free pre-print: [arXiv:2309.08684](https://arxiv.org/abs/2309.08684)
|
|
337
|
+
- Implementation:
|
|
338
|
+
- [junyuchen-cjy/DTTNet-Pytorch](https://github.com/junyuchen-cjy/DTTNet-Pytorch)
|
|
339
|
+
|
|
340
|
+
### YOLOv13: Real-Time Object Detection with Hypergraph-Enhanced Adaptive Visual Perception
|
|
341
|
+
|
|
342
|
+
- Common names: YOLOv13, HyperACE, FullPAD
|
|
343
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/lei2025yolov13realtimeobjectdetection.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2506.17733)
|
|
344
|
+
- eprint: [arXiv.2506.17733](https://arxiv.org/abs/2506.17733)
|
|
345
|
+
- Implementation:
|
|
346
|
+
- [iMoonLab/yolov13](https://github.com/iMoonLab/yolov13)
|
|
347
|
+
|
|
348
|
+
### Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings
|
|
349
|
+
|
|
350
|
+
- Common name: PoPE
|
|
351
|
+
- [BibTeX citation.](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/gopalakrishnan2025decoupling.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/2509.10534)
|
|
352
|
+
- OpenReview.net: [ICLR 2026 Conference](https://openreview.net/forum?id=kf2mzS6xfk)
|
|
353
|
+
- eprint: [arXiv.2509.10534](https://arxiv.org/pdf/2509.10534)
|
|
354
|
+
- Implementations:
|
|
355
|
+
- [lucidrains/PoPE-pytorch](https://github.com/lucidrains/PoPE-pytorch)
|
|
356
|
+
- [context7](https://context7.com/lucidrains/pope-pytorch)
|
|
357
|
+
- [hunterhogan/PoPE-pytorch](https://github.com/hunterhogan/PoPE-pytorch)
|
|
358
|
+
- [context7](https://context7.com/hunterhogan/pope-pytorch/admin)
|
|
359
|
+
|
|
360
|
+
### Packages and documentation
|
|
361
|
+
|
|
362
|
+
- [pytorch/pytorch](https://github.com/pytorch/pytorch)
|
|
363
|
+
- [official documentation](https://docs.pytorch.org/docs/)
|
|
364
|
+
- [context7](https://context7.com/pytorch/pytorch)
|
|
365
|
+
- [BibTeX citation](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/Ansel_PyTorch_2_Faster_2024.bib)
|
|
366
|
+
- [ZFTurbo/Music-Source-Separation-Training](https://github.com/ZFTurbo/Music-Source-Separation-Training)
|
|
367
|
+
- [context7](https://context7.com/zfturbo/music-source-separation-training)
|
|
368
|
+
- [pcunwa/BS-Roformer-HyperACE](https://huggingface.co/pcunwa/BS-Roformer-HyperACE)
|
|
369
|
+
- [v2_voc source implementation](https://huggingface.co/pcunwa/BS-Roformer-HyperACE/resolve/main/v2_voc/bs_roformer.py)
|
|
370
|
+
- [BibTeX citation](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/unwa_BS-Roformer-HyperACE_2025.bib)
|
|
371
|
+
- [lucidrains/torch-einops-utils](https://github.com/lucidrains/torch-einops-utils)
|
|
372
|
+
- [context7](https://context7.com/lucidrains/torch-einops-utils)
|
|
373
|
+
- [hunterhogan/torch_einops_kit](https://github.com/hunterhogan/torch_einops_kit)
|
|
374
|
+
- [context7](https://context7.com/hunterhogan/torch_einops_kit)
|
|
375
|
+
- [BibTeX citation](https://github.com/hunterhogan/hunterFormsBS/blob/main/citations/Hogan_torch-einops-kit_2026.bib)
|
|
376
|
+
|
|
377
|
+
<!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
|
|
378
|
+
## My recovery
|
|
379
|
+
|
|
380
|
+
[](https://HunterThinks.com/support)
|
|
381
|
+

|
|
382
|
+
|
|
383
|
+
By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
|
|
384
|
+
|
|
385
|
+
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
386
|
+
|
|
387
|
+
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
388
|
+
<!-- === OK_EDIT: path-sync hunterhogan === -->
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
LICENSE-Solovyev
|
|
3
|
+
LICENSE-Wang
|
|
4
|
+
README.md
|
|
5
|
+
pyproject.toml
|
|
6
|
+
hunterFormsBS/__init__.py
|
|
7
|
+
hunterFormsBS/attend.py
|
|
8
|
+
hunterFormsBS/bandSplitRotator.py
|
|
9
|
+
hunterFormsBS/bands.py
|
|
10
|
+
hunterFormsBS/hyperACE.py
|
|
11
|
+
hunterFormsBS/loss.py
|
|
12
|
+
hunterFormsBS/mask.py
|
|
13
|
+
hunterFormsBS/py.typed
|
|
14
|
+
hunterFormsBS/theTypes.py
|
|
15
|
+
hunterFormsBS/transform.py
|
|
16
|
+
hunterFormsBS.egg-info/PKG-INFO
|
|
17
|
+
hunterFormsBS.egg-info/SOURCES.txt
|
|
18
|
+
hunterFormsBS.egg-info/dependency_links.txt
|
|
19
|
+
hunterFormsBS.egg-info/requires.txt
|
|
20
|
+
hunterFormsBS.egg-info/top_level.txt
|
|
21
|
+
tests/test_BandSplit.py
|
|
22
|
+
tests/test_import.py
|
|
23
|
+
tests/test_loss.py
|
|
24
|
+
tests/test_mask.py
|
|
25
|
+
tests/test_transform.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hunterFormsBS
|