MCPcopy Create free account

hub / github.com/Stability-AI/stable-audio-tools / functions

Functions1,182 in github.com/Stability-AI/stable-audio-tools

↓ 1 callersMethod_get_audio_cond_classes
Lazy-import conditioner classes to avoid circular imports.
stable_audio_tools/training/metrics/conditioner_distance.py:43
↓ 1 callersMethod_get_closed_form_lr
(self)
stable_audio_tools/training/utils.py:55
↓ 1 callersMethod_get_silence_for_file
Return the silence latent for the dataset that contains this file, or None.
stable_audio_tools/data/dataset.py:372
↓ 1 callersFunction_get_sliding_window_block_mask
(seq_q, seq_k, w_left, w_right, device)
stable_audio_tools/models/transformer.py:106
↓ 1 callersMethod_gl_k_steps_time
Run `steps` iterations of fixed-magnitude Griffin–Lim in RAW STFT. Keeps the STFT frame grid identical to X0 on all intermediate proj
stable_audio_tools/models/pretransforms.py:310
↓ 1 callersMethod_indices_to_codes
(self, indices)
stable_audio_tools/models/fsq.py:86
↓ 1 callersMethod_indices_to_level_indices
(self, indices)
stable_audio_tools/models/fsq.py:97
↓ 1 callersFunction_iter_lora_params
(model)
stable_audio_tools/models/lora/model.py:463
↓ 1 callersMethod_mask_audio_emb
(self,audio_emb)
stable_audio_tools/models/discriminators.py:135
↓ 1 callersMethod_mask_latent_emb
(self, latent_emb)
stable_audio_tools/models/discriminators.py:142
↓ 1 callersMethod_muon_step
(self, group)
stable_audio_tools/training/optims.py:337
↓ 1 callersFunction_onesided_tight_weights
Return [1,1,F,1] weights: interior bins √2, DC/Nyquist 1 (for one-sided energy).
stable_audio_tools/models/pretransforms.py:146
↓ 1 callersFunction_pack_complex_to_channels
Pack complex U[B,C,F,M] → real z[B,2·C·F,M] as [Re, Im] along channels.
stable_audio_tools/models/pretransforms.py:123
↓ 1 callersMethod_pad
(self, x)
stable_audio_tools/models/pretransforms.py:499
↓ 1 callersMethod_sample_next_token
Sample the next token for a batch of codes, and translates from conditioning inputs to model inputs Handles CFG inference
stable_audio_tools/models/lm.py:263
↓ 1 callersFunction_select_lora
(lora_layer, index)
stable_audio_tools/models/lora/utils.py:330
↓ 1 callersFunction_sine_window
(N: int, device, dtype)
stable_audio_tools/models/pretransforms.py:141
↓ 1 callersFunction_sliding_window_additive_mask
Build a (seq_q, seq_k) additive mask for masked SDPA fallback. 0 inside the band [i - w_left, i + w_right], -inf outside.
stable_audio_tools/models/transformer.py:118
↓ 1 callersFunction_sliding_window_chunked_halo_sdpa
(q, k, v, w_left, w_right, chunk_size=_SLIDING_WINDOW_CHUNK_SIZE)
stable_audio_tools/models/transformer.py:143
↓ 1 callersMethod_t_to_logsnr_cond
Convert t to normalized logsnr in [0, 1] for timestep conditioning. Maps t through logsnr = log((1-t)/t), clamps to fixed range, then
stable_audio_tools/models/dit.py:143
↓ 1 callersFunction_to_mid_side
x[B,2,T] → [B,2,T] with orthonormal mid/side.
stable_audio_tools/models/pretransforms.py:169
↓ 1 callersFunction_unpack_channels_to_complex
Inverse of _pack_complex_to_channels. Z[B,2·C·F,M] → U[B,C,F,M] (complex).
stable_audio_tools/models/pretransforms.py:132
↓ 1 callersMethod_update_stats
(self, x)
stable_audio_tools/models/transformer.py:348
↓ 1 callersMethod_validate_layout
Runs checks on the layout to ensure a valid pattern is defined. A pattern is considered invalid if: - Multiple timesteps for a sam
stable_audio_tools/models/codebook_patterns.py:54
↓ 1 callersFunctionadd_mask
(sim: Tensor, mask: Tensor)
stable_audio_tools/models/adp.py:400
↓ 1 callersMethodadd_skip
(self, x: Tensor, skip: Tensor)
stable_audio_tools/models/adp.py:881
↓ 1 callersFunctionappend_zero
(x)
stable_audio_tools/inference/k_diffusion/sampling.py:16
↓ 1 callersMethodapply_qk_layernorm
(self, q, k)
stable_audio_tools/models/transformer.py:588
↓ 1 callersFunctionbuild_congruent_sampler
Build a congruent power-of-2 discrete timestep sampler. Samples from a nested grid of discrete t values where coarser step counts (1, 2, 4, .
stable_audio_tools/training/arc.py:25
↓ 1 callersFunctionbuild_dist_shift
Build dist_shift from type + 4 params (meaning depends on type).
stable_audio_tools/interface/interfaces/diffusion_cond.py:523
↓ 1 callersMethodcalculate_clap_loss
(self, reals, fakes, t, metadata, padding_mask=None)
stable_audio_tools/training/arc.py:589
↓ 1 callersMethodcalculate_feature_matching_loss
Compute feature matching loss between real and fake hidden states. Matches features at the discriminator layers for GAN stability.
stable_audio_tools/training/arc.py:879
↓ 1 callersFunctioncausal_mask
(q: Tensor, k: Tensor)
stable_audio_tools/models/adp.py:410
↓ 1 callersFunctioncheckpoint
(function, *args, **kwargs)
stable_audio_tools/models/transformer.py:162
↓ 1 callersFunctionclosest_power_2
(x: float)
stable_audio_tools/models/adp.py:45
↓ 1 callersFunctioncompile
(function, *args, **kwargs)
stable_audio_tools/models/utils.py:53
↓ 1 callersFunctioncompute_latent_fad
Compute Frechet Latent Distance (FLD) - FAD in the VAE latent space. Args: eval_embeddings: numpy array of latent embeddings (N, lat
stable_audio_tools/training/metrics/fad_metrics.py:731
↓ 1 callersFunctioncompute_mmd
(latents)
stable_audio_tools/models/bottleneck.py:166
↓ 1 callersFunctioncreate_audio_lm_from_config
(config)
stable_audio_tools/models/lm.py:472
↓ 1 callersFunctioncreate_autoencoder_ui
(model_config, in_model)
stable_audio_tools/interface/interfaces/autoencoder.py:248
↓ 1 callersFunctioncreate_blocked_mask
(x, block_size, num_blocks)
stable_audio_tools/models/discriminators.py:48
↓ 1 callersFunctioncreate_clap_audio_branch_from_config
(model_config: dict)
stable_audio_tools/models/clap.py:232
↓ 1 callersFunctioncreate_clap_text_branch_from_config
(model_config: dict)
stable_audio_tools/models/clap.py:251
↓ 1 callersFunctioncreate_diffAE_from_config
(config: Dict[str, Any])
stable_audio_tools/models/autoencoders.py:1262
↓ 1 callersFunctioncreate_diffusion_cond_from_config
(config: tp.Dict[str, tp.Any])
stable_audio_tools/models/diffusion.py:687
↓ 1 callersFunctioncreate_diffusion_cond_ui
(model_config, in_model, in_model_half=True, gradio_title="", default_prompt=None)
stable_audio_tools/interface/interfaces/diffusion_cond.py:696
↓ 1 callersFunctioncreate_diffusion_uncond_from_config
(config: tp.Dict[str, tp.Any])
stable_audio_tools/models/diffusion.py:637
↓ 1 callersFunctioncreate_diffusion_uncond_ui
(model_config)
stable_audio_tools/interface/gradio.py:354
↓ 1 callersFunctioncreate_fsdp_strategy_and_callback
( pl_module: pytorch_lightning.LightningModule, precision: str = None, **config, )
stable_audio_tools/training/fsdp.py:278
↓ 1 callersFunctioncreate_lm_ui
(model_config)
stable_audio_tools/interface/gradio.py:434
↓ 1 callersFunctioncreate_metrics_callback_from_config
(model_config, **kwargs)
stable_audio_tools/training/factory.py:376
↓ 1 callersFunctioncreate_padding_mask_from_lengths
Create a boolean padding mask from per-batch valid sequence lengths. Args: valid_lengths: Tensor of shape (batch_size,) with valid l
stable_audio_tools/data/utils.py:195
↓ 1 callersFunctioncreate_sampling_ui
(model_config, default_prompt=None)
stable_audio_tools/interface/interfaces/diffusion_cond.py:367
↓ 1 callersFunctioncreate_training_wrapper_from_config
(model_config, model)
stable_audio_tools/training/factory.py:7
↓ 1 callersFunctioncreate_ui
(model_config_path=None, ckpt_path=None, pretrained_name=None, pretransform_ckpt_path=None, model_half=False,
stable_audio_tools/interface/gradio.py:459
↓ 1 callersFunctioncreate_uncond_sampling_ui
(model_config)
stable_audio_tools/interface/gradio.py:306
↓ 1 callersFunctiondct_fft_impl
(v)
stable_audio_tools/models/transforms.py:207
↓ 1 callersMethoddeclip
Declip the signal by scaling down if any samples are clipped
stable_audio_tools/data/utils.py:184
↓ 1 callersMethoddecode
(self, x)
stable_audio_tools/models/bottleneck.py:261
↓ 1 callersMethoddecode
(self, x)
stable_audio_tools/models/bottleneck.py:294
↓ 1 callersMethoddecode
(self, x)
stable_audio_tools/models/bottleneck.py:341
↓ 1 callersMethoddecode
(self, x)
stable_audio_tools/models/bottleneck.py:401
↓ 1 callersMethoddecode
(self, x)
stable_audio_tools/models/bottleneck.py:445
↓ 1 callersMethoddecode
(self, x)
stable_audio_tools/models/bottleneck.py:511
↓ 1 callersMethoddecode1d
(self, stft_pair: Tensor)
stable_audio_tools/models/adp.py:1563
↓ 1 callersMethoddecode_tokens
(self, tokens)
stable_audio_tools/models/pretransforms.py:51
↓ 1 callersMethoddecode_tokens
(self, codes, **kwargs)
stable_audio_tools/models/bottleneck.py:264
↓ 1 callersFunctiondelete_files_async
(filenames, delay)
stable_audio_tools/interface/interfaces/diffusion_cond.py:359
↓ 1 callersFunctiondesign_prototype_filter
Design the optimal prototype filter for a multiband system given the desired specs. Parameters ---------- attenuation : float
stable_audio_tools/models/pqmf.py:208
↓ 1 callersFunctiondesign_prototype_filter
Design prototype filter for PQMF. This method is based on `A Kaiser window approach for the design of prototype filters of cosine modulated fi
stable_audio_tools/models/transforms.py:142
↓ 1 callersFunctiondetect_dora_variant
Detect DoRA variant from a state dict. Returns "dora-cols" (dim=0, per-input-feature) or "dora-rows" (dim=1, per-output-neuron) based on the
stable_audio_tools/models/lora/utils.py:154
↓ 1 callersMethoddiscriminator_loss
(self, fake, real)
stable_audio_tools/models/discriminators.py:869
↓ 1 callersMethoddiscriminator_loss
(self, fake, real)
stable_audio_tools/models/discriminators.py:966
↓ 1 callersMethoddpm_solver_adaptive
(self, x, t_start, t_end, order=3, rtol=0.05, atol=0.0078, h_init=0.05, pcoeff=0., icoeff=1., dcoeff=0., accep
stable_audio_tools/inference/k_diffusion/sampling.py:314
↓ 1 callersMethoddpm_solver_fast
(self, x, t_start, t_end, nfe, eta=0., s_noise=1., noise_sampler=None)
stable_audio_tools/inference/k_diffusion/sampling.py:275
↓ 1 callersFunctionevaluate_filter_objective
Evaluate the filter's objective value based on the criteria from https://ieeexplore.ieee.org/document/681427 Parameters ----------
stable_audio_tools/models/pqmf.py:181
↓ 1 callersMethodexport_lora_safetensors
Export generator LoRA weights as a safetensors file with embedded config.
stable_audio_tools/training/arc.py:570
↓ 1 callersMethodexport_model
(self, path, use_safetensors=False)
stable_audio_tools/training/clap.py:462
↓ 1 callersFunctionflat_pairwise_sq_distance
Compute pairwise squared Euclidean distances for flat tensors. Args: x: Tensor of shape (B, D) y: Tensor of shape (B, D)
stable_audio_tools/training/losses/utils.py:14
↓ 1 callersFunctionfloat32_to_int16_torch
Torch version of float32_to_int16 for GPU tensors.
stable_audio_tools/training/metrics/fad_metrics.py:110
↓ 1 callersMethodforward
(self, x)
stable_audio_tools/training/metrics/fad_metrics.py:259
↓ 1 callersMethodforward
(self, x)
stable_audio_tools/models/discriminators.py:87
↓ 1 callersMethodforward
(self, x)
stable_audio_tools/models/pretransforms.py:39
↓ 1 callersMethodforward
(self, t)
stable_audio_tools/models/transformer.py:277
↓ 1 callersMethodgenerate
( self, max_gen_len: int = 256, batch_size: tp.Optional[int] = None, init_data
stable_audio_tools/models/lm.py:344
↓ 1 callersFunctiongenerate_diffusion_cond_inpaint
Generate audio from a prompt using a diffusion inpainting model. Args: model: The diffusion model to use for generation. ste
stable_audio_tools/inference/generation.py:311
↓ 1 callersFunctiongenerate_diffusion_uncond
( model, steps: int = 250, batch_size: int = 1, sample_size: int = 2097152,
stable_audio_tools/inference/generation.py:14
↓ 1 callersFunctiongenerate_modulated_filter_bank
Generate a QMF bank of cosine modulated filters based on a given prototype filter. Parameters ---------- prototype_filter : tor
stable_audio_tools/models/pqmf.py:111
↓ 1 callersMethodgenerator_loss
(self, fake, real)
stable_audio_tools/models/discriminators.py:879
↓ 1 callersMethodgenerator_loss
(self, fake, real)
stable_audio_tools/models/discriminators.py:981
↓ 1 callersFunctionget_all_s3_urls
get urls of shards (tar files) for multiple datasets in one s3 bucket
stable_audio_tools/data/dataset.py:533
↓ 1 callersMethodget_alpha
Compute alpha via log-linear interpolation in seq_len.
stable_audio_tools/inference/sampling.py:76
↓ 1 callersFunctionget_audio_filenames
recursively get a list of audio filenames
stable_audio_tools/data/dataset.py:95
↓ 1 callersMethodget_conditioning_inputs
(self, conditioning_tensors: tp.Dict[str, tp.Any], negative=False)
stable_audio_tools/models/diffusion.py:170
↓ 1 callersFunctionget_dbmax
finds the loudest value in the entire clip and puts that into dB (full scale)
stable_audio_tools/data/dataset.py:590
↓ 1 callersMethodget_first_step_with_timesteps
(self, t: int, q: tp.Optional[int] = None)
stable_audio_tools/models/codebook_patterns.py:113
↓ 1 callersFunctionget_fsdp_wrapped_params
Get parameters that are inside FSDP-wrapped submodules. Args: module: The root module to search Returns: Set of paramet
stable_audio_tools/training/fsdp.py:21
↓ 1 callersFunctionget_latent_filenames
recursively get a list of pre-encoded filenames
stable_audio_tools/data/dataset.py:125
↓ 1 callersMethodget_logsnr_start
Compute adaptive logsnr_start: drops by `rate` per doubling of seq_len.
stable_audio_tools/inference/sampling.py:186
↓ 1 callersMethodget_mapping
Combines context time features and features into mapping
stable_audio_tools/models/adp.py:1173
← previousnext →301–400 of 1,182, ranked by callers