FASTENHANCER_PRESET_SOURCE = 'aask1357/fastenhancer@e74cab157662dd0d28f381959f9b4870654d5d1f'fastenhancer_params
Validated FastEnhancer architecture config, official presets and weight mappings; no backend imports.
FASTENHANCER_PRESET_SOURCEconstantFASTENHANCER_PRESETSconstantFASTENHANCER_T_ONNXconstantMapping of every weight of build(FastEnhancerParams()) from the pinned FastEnhancer-T ONNX release; every other initializer of the file is a graph constant, li…MAPPINGSconstantWeight mappings for this family, by name.FastEnhancerRNNFormerParamsclassRNNFormer stage: per-band GRU over time, then attention across bands.FastEnhancerParamsclassFolded-inference FastEnhancer config for one spectral frame per call.FastEnhancerResolvedConfigclassSerializable record of a preset, its overrides and the concrete config.resolve_fastenhancerfunctionResolve an official preset with validated overrides into a full record.fastenhancer_weight_shapesfunctionFolded tensors in ONNX/PyTorch layout, keyed by module path.fastenhancer_mappingfunctionMapping of every weight of build(params) from folded tensors in ONNX export layout.
FASTENHANCER_PRESETS
PythonFASTENHANCER_PRESETS: Mapping[str, FastEnhancerParams] = {'fastenhancer_t': FastEnhancerParams()}FASTENHANCER_T_ONNX
PythonMapping of every weight of build(FastEnhancerParams()) from the pinned FastEnhancer-T ONNX release; every other initializer of the file is a graph constant, li…
FASTENHANCER_T_ONNX = fastenhancer_mapping(FASTENHANCER_PRESETS['fastenhancer_t'], 'fastenhancer_t_onnx', SourcePin(uri='https://github.com/aask1357/fastenhancer/releases/download/onnx-vd-v1.0.0/fastenhancer_t.spec.onnx', sha256='915a451f3b1ea8e98c20517c63b50943aa1d540624189f3106cc2e03d09634eb', format='onnx', note='onnx-vd-v1.0.0 FP32 spectral graph (VoiceBank-DEMAND, 16 kHz); code MIT.'), tensor_names={'rf_pre.0.kernel': 'onnx::MatMul_638', 'rf_block.0.rnn.W': 'onnx::GRU_662', 'rf_block.0.rnn.R': 'onnx::GRU_663', 'rf_block.0.rnn.B': 'onnx::GRU_664', 'rf_block.0.rnn_fc.kernel': 'onnx::MatMul_675', 'rf_block.0.attn.qkv.kernel': 'onnx::MatMul_680', 'rf_block.0.attn_fc.kernel': 'onnx::MatMul_702', 'rf_block.1.rnn.W': 'onnx::GRU_724', 'rf_block.1.rnn.R': 'onnx::GRU_725', 'rf_block.1.rnn.B': 'onnx::GRU_726', 'rf_block.1.rnn_fc.kernel': 'onnx::MatMul_737', 'rf_block.1.attn.qkv.kernel': 'onnx::MatMul_742', 'rf_block.1.attn_fc.kernel': 'onnx::MatMul_764', 'rf_post.0.kernel': 'onnx::MatMul_766'}, unused=('/Constant_output_0', '/Constant_1_output_0', '/Constant_2_output_0', '/Constant_3_output_0', '/Constant_4_output_0', '/Constant_6_output_0', '/Constant_7_output_0', '/Constant_8_output_0', '/rf_block.0/Constant_output_0', '/rf_block.0/Constant_1_output_0', '/rf_block.0/attn/Constant_output_0', '/rf_block.0/attn/Constant_1_output_0', '/rf_block.0/attn/Constant_3_output_0', '/rf_block.0/attn/Constant_7_output_0', '/rf_block.0/attn/Constant_11_output_0', '/Constant_14_output_0', '/Constant_17_output_0', '/enc_pre/enc_pre.0/Reshape_1_output_0', '/Concat_output_0', '/rf_block.0/attn/Sqrt_1_output_0', '/Concat_1_output_0', '/Reshape_5_output_0', '/enc_pre/enc_pre.0/Concat_1_output_0', '/enc_pre/enc_pre.0/Concat_2_output_0'))Mapping of every weight of build(FastEnhancerParams()) from the pinned FastEnhancer-T ONNX release; every
other initializer of the file is a graph constant, listed as unused.
MAPPINGS
PythonWeight mappings for this family, by name.
MAPPINGS: dict[str, WeightMapping] = {FASTENHANCER_T_ONNX.name: FASTENHANCER_T_ONNX}Weight mappings for this family, by name.
RNNFormer stage: per-band GRU over time, then attention across bands.
FastEnhancerRNNFormerParams()RNNFormer stage: per-band GRU over time, then attention across bands.
model_config
Pythonmodel_config = ConfigDict(frozen=True, extra='forbid')num_blocks
Pythonnum_blocks: int = Field(default=2, ge=1)channels
Pythonchannels: int = Field(default=20, gt=0)freq
Pythonfreq: int = Field(default=16, ge=2)num_heads
Pythonnum_heads: int = Field(default=4, ge=1)positional_embedding
Pythonpositional_embedding: bool = Trueattn_bias
Pythonattn_bias: bool = Falsepost_act
Pythonpost_act: bool = FalseFastEnhancerParams
PythonFolded-inference FastEnhancer config for one spectral frame per call.
FastEnhancerParams()Folded-inference FastEnhancer config for one spectral frame per call.
BatchNorm and weight normalization are folded into biased layers, matching the released inference graphs; this form is not the trainable architecture. STFT/iSTFT framing belongs to the caller. Changing any field defines a new, untrained architecture unless matching weights exist.
model_config
Pythonmodel_config = ConfigDict(frozen=True, extra='forbid')family
Pythonfamily: Literal['fastenhancer'] = 'fastenhancer'form
Pythonform: Literal['folded_inference'] = 'folded_inference'n_fft
Pythonn_fft: int = Field(default=512, ge=4)channels
Pythonchannels: int = Field(default=24, gt=0)kernel_size
Pythonkernel_size: tuple[int, ...] = (8, 3, 3)stride
Pythonstride: int = Field(default=4, ge=1)rnnformer
Pythonrnnformer: FastEnhancerRNNFormerParams = FastEnhancerRNNFormerParams()activation
Pythonactivation: Literal['silu', 'relu'] = 'silu'mask
Pythonmask: Literal['none', 'sigmoid', 'tanh'] = 'none'input_compression
Pythoninput_compression: float = Field(default=0.3, gt=0, le=1, allow_inf_nan=False)resnet
Pythonresnet: bool = Falsespectral_bins
PythonSpectral input/output bins, including the zero-filled Nyquist bin.
spectral_bins: intSpectral input/output bins, including the zero-filled Nyquist bin.
input_shape
PythonThe fixed specin shape (spectralbins, 1, 2), without the batch axis.
input_shape: tuple[int, ...]The fixed spec_in shape (spectral_bins, 1, 2), without the batch axis.
encoder_bins
PythonFrequency positions after the strided input convolution.
encoder_bins: intFrequency positions after the strided input convolution.
Serializable record of a preset, its overrides and the concrete config.
FastEnhancerResolvedConfig()Serializable record of a preset, its overrides and the concrete config.
Reload from params; re-resolving a preset later may differ if the
preset table changes. official is true only when the resolved config
equals the preset exactly.
model_config
Pythonmodel_config = ConfigDict(extra='forbid', strict=True, frozen=True)schema_version
Pythonschema_version: Literal[1] = 1preset
Pythonpreset: strsource
Pythonsource: stroverrides
Pythonoverrides: dict[str, Any]official
Pythonofficial: boolparams
Pythonparams: FastEnhancerParamsresolve_fastenhancer
PythonResolve an official preset with validated overrides into a full record.
resolve_fastenhancer(preset: str, overrides: Mapping[str, Any] | None = None) -> FastEnhancerResolvedConfigResolve an official preset with validated overrides into a full record.
Folded tensors in ONNX/PyTorch layout, keyed by module path.
fastenhancer_weight_shapes(params: FastEnhancerParams) -> dict[str, tuple[int, ...]]Folded tensors in ONNX/PyTorch layout, keyed by module path.
Conv weights are [out, in, kernel]; *.kernel MatMul weights are
[in, out]; rnn.W/rnn.R are [1, 3H, in] and rnn.B is [1, 6H]
with ONNX gate order z, r, h; the upsampler is [in, out, kernel].
fastenhancer_mapping
PythonMapping of every weight of build(params) from folded tensors in ONNX export layout.
fastenhancer_mapping( params: FastEnhancerParams, name: str, source: SourcePin, *, tensor_names: Mapping[str, str] | None = None, unused: tuple[str, ...] = (),) -> WeightMappingMapping of every weight of build(params) from folded tensors in ONNX export layout.
Source tensors are keyed by module path, with the shapes fastenhancer_weight_shapes(params) lists;
each row checks its source’s shape. GRU tensors must use ONNX gate order z, r, h; PyTorch nn.GRU
stores r, z, n, which shapes alone cannot detect.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
params | FastEnhancerParams | Required | The params the tensors were trained with. |
name | str | Required | Mapping name. |
source | SourcePin | Required | The pinned source file. |
tensor_names | Mapping[str, str] | None | None | Source tensor names for module paths stored under another name. |
unused | tuple[str, ...] | () | Source tensors deliberately not imported. |
Returns
| Value | Type | Description |
|---|---|---|
WeightMapping | WeightMapping | The mapping, for ``helia_edge.importers.import_weights``. |
Raises
| Type | Description |
|---|---|
ValueError | If ``tensor_names`` renames a tensor these params do not have. |