Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Stability-AI/stable-audio-tools
/ functions
Functions
1,182 in github.com/Stability-AI/stable-audio-tools
⨍
Functions
1,182
◇
Types & classes
277
↓ 1 callers
Method
get_metrics
( self, audio_features, text_features, logit_scale_a )
stable_audio_tools/training/clap.py:368
↓ 1 callers
Function
get_s3_contents
Returns a list of full S3 paths to files in a given S3 bucket and directory path.
stable_audio_tools/data/dataset.py:486
↓ 1 callers
Method
get_sequence_coords_with_timestep
Get codebook coordinates in the layout that corresponds to the specified timestep t and optionally to the codebook q. Coordinates are returned
stable_audio_tools/models/codebook_patterns.py:95
↓ 1 callers
Method
get_steps_with_timestep
(self, t: int, q: tp.Optional[int] = None)
stable_audio_tools/models/codebook_patterns.py:110
↓ 1 callers
Function
get_window
Return a window function. Args: win_type (str): Window type. Can either be one of the window function provided in PyTorch ['h
stable_audio_tools/training/losses/auraloss.py:54
↓ 1 callers
Function
group_dict_by_prefix
(prefix: str, d: Dict)
stable_audio_tools/models/adp.py:51
↓ 1 callers
Function
huber_loss
(x,y)
stable_audio_tools/models/discriminators.py:58
↓ 1 callers
Function
idct_irfft_impl
(V)
stable_audio_tools/models/transforms.py:210
↓ 1 callers
Function
if_gd_loss
(Xp, Xr, eps=1e-3, w_floor=1e-3)
stable_audio_tools/training/losses/auraloss.py:18
↓ 1 callers
Function
infer_global_rank
(lora_sd: dict)
stable_audio_tools/models/lora/utils.py:135
↓ 1 callers
Function
int16_to_float32_torch
Torch version of int16_to_float32 for GPU tensors.
stable_audio_tools/training/metrics/fad_metrics.py:106
↓ 1 callers
Method
inverse
Reconstruct the original signal from the frequency bands.
stable_audio_tools/models/pqmf.py:46
↓ 1 callers
Function
invert_audio
Perform RF-Inversion on audio to obtain the latent noise. Technique based on SEMANTIC IMAGE INVERSION AND EDITING USING RECTIFIED STOCHASTIC
stable_audio_tools/inference/inversion.py:7
↓ 1 callers
Function
is_filtered
(layer_name)
stable_audio_tools/models/lora/utils.py:56
↓ 1 callers
Function
keyword_scandir
very fast `glob` alternative. from https://stackoverflow.com/a/59803793/4259243
stable_audio_tools/data/dataset.py:57
↓ 1 callers
Method
limiter
(self, x)
stable_audio_tools/inference/k_diffusion/sampling.py:202
↓ 1 callers
Function
linear_geglu
(x, weight, bias=None)
stable_audio_tools/models/blocks.py:333
↓ 1 callers
Function
linear_multistep_coeff
(order, t, i, j)
stable_audio_tools/inference/k_diffusion/sampling.py:158
↓ 1 callers
Function
load_and_apply_loras
Load LoRA checkpoints from disk and attach them to `model`. - Uses a two-pass approach: first resolves each LoRA's adapter type, then loads
stable_audio_tools/models/lora/loader.py:19
↓ 1 callers
Method
load_data_urls
(self)
stable_audio_tools/data/dataset.py:705
↓ 1 callers
Method
load_file
(self, filename)
stable_audio_tools/data/dataset.py:239
↓ 1 callers
Function
load_model
(model_config=None, model_ckpt_path=None, pretrained_name=None, model_half=False)
pre_encode.py:17
↓ 1 callers
Function
load_model
(model_config=None, model_ckpt_path=None, pretrained_name=None, pretransform_ckpt_path=None, device="cuda", mo
stable_audio_tools/interface/gradio.py:119
↓ 1 callers
Function
load_openl3_model
Load OpenL3 model for audio embeddings. Args: device: Device to load model on content_type: 'music' or 'env' (environment so
stable_audio_tools/training/metrics/fad_metrics.py:350
↓ 1 callers
Function
load_panns_model
Load PANNs CNN14 model.
stable_audio_tools/training/metrics/fad_metrics.py:295
↓ 1 callers
Function
load_state_dict
(checkpoint_path: str, map_location="cpu", skip_params=True)
stable_audio_tools/training/metrics/fad_metrics.py:115
↓ 1 callers
Function
load_vggish_model
Load VGGish model via torchaudio or torchvggish. Returns (model, input_processor, backend_type).
stable_audio_tools/training/metrics/fad_metrics.py:329
↓ 1 callers
Function
log_point_cloud
(logger, key, tokens, caption=None)
stable_audio_tools/training/utils.py:136
↓ 1 callers
Function
logger_project_name
(logger)
stable_audio_tools/training/utils.py:111
↓ 1 callers
Function
main
()
train.py:30
↓ 1 callers
Function
main
(args)
run_gradio.py:18
↓ 1 callers
Function
main
(args)
pre_encode.py:178
↓ 1 callers
Function
mel_spectrogram
calculates data array for mel spectrogram (in however many channels)
stable_audio_tools/interface/aeiou.py:174
↓ 1 callers
Function
mmd_loss_flat
Compute the MMD loss between two flat sets of vectors. Args: x: Tensor of shape (B, D) y: Tensor of shape (B, D) band
stable_audio_tools/training/losses/utils.py:44
↓ 1 callers
Function
name_is_lora
(name)
stable_audio_tools/models/lora/utils.py:76
↓ 1 callers
Function
neighbour_exchange
(from_rank, to_rank, tensor, group=None)
stable_audio_tools/training/clap.py:77
↓ 1 callers
Function
neighbour_exchange_bidir
(left_rank, right_rank, tensor_to_left, tensor_to_right, group=None)
stable_audio_tools/training/clap.py:96
↓ 1 callers
Function
normalized_complex_distance_loss
(x, y, eps=1e-5)
stable_audio_tools/training/losses/auraloss.py:13
↓ 1 callers
Method
ode_warmup_step
(self, diffusion_input, metadata, padding_masks, effective_seq_len=None)
stable_audio_tools/training/arc.py:622
↓ 1 callers
Function
pad_signal
Pads the signal to make its length divisible by the given number of bands. Parameters ---------- signal : torch.Tensor The i
stable_audio_tools/models/pqmf.py:87
↓ 1 callers
Function
pad_to_nearest_power_of_two
Pads the input tensor 'x' on both sides such that its last dimension becomes the nearest larger power of two. Parameters: -----
stable_audio_tools/models/pqmf.py:233
↓ 1 callers
Method
pad_to_period
(self, x)
stable_audio_tools/models/discriminators.py:532
↓ 1 callers
Function
point_cloud
returns a 3D point cloud of the tokens
stable_audio_tools/interface/aeiou.py:65
↓ 1 callers
Function
polyphase_analysis
Applies the polyphase method to efficiently analyze the signal using a filter bank. Parameters: ----------- signal : torch.Tensor
stable_audio_tools/models/pqmf.py:310
↓ 1 callers
Function
polyphase_synthesis
Polyphase Inverse: Apply polyphase filter bank synthesis to reconstruct a signal. Parameters ---------- signal : torch.Tensor
stable_audio_tools/models/pqmf.py:350
↓ 1 callers
Function
power_to_db
(spec, *, amin = 1e-10)
stable_audio_tools/interface/aeiou.py:164
↓ 1 callers
Function
precompute_varlen_metadata
Precompute varlen attention metadata once to avoid recomputation in every attention layer. Args: padding_mask: Boolean tensor of sha
stable_audio_tools/models/transformer.py:42
↓ 1 callers
Function
prepare_signal_dimensions
Rearrange signal into Batch x Channels x Length. Parameters ---------- signal : torch.Tensor or numpy.ndarray The input
stable_audio_tools/models/pqmf.py:52
↓ 1 callers
Method
preprocess
(self, y)
stable_audio_tools/models/discriminators.py:936
↓ 1 callers
Method
preprocess_audio_list_for_encoder
Preprocess a [list] of audio (Channels x Length) into a batch tensor to be compatable with the encoder. The audio in that list can b
stable_audio_tools/models/autoencoders.py:943
↓ 1 callers
Function
process_common_options
(pl_module, config)
stable_audio_tools/training/fsdp.py:180
↓ 1 callers
Method
propose_step
(self, error)
stable_audio_tools/inference/k_diffusion/sampling.py:205
↓ 1 callers
Method
quantize
(self, z, skip_tanh: bool = False)
stable_audio_tools/models/fsq.py:64
↓ 1 callers
Function
rand_bool
(shape: Any, proba: float, device: Any = None)
stable_audio_tools/models/adp.py:1254
↓ 1 callers
Function
randn_like
(t)
stable_audio_tools/training/autoencoders.py:147
↓ 1 callers
Function
remap_lora_state_dict
Remap LoRA state dict keys from parametrization index 0 to target_index. Checkpoints always save keys with index 0 (e.g. *.parametrizations.weigh
stable_audio_tools/models/lora/utils.py:273
↓ 1 callers
Function
remove_long_silence
Removes silence longer than max_silence_duration and replaces it with a short silence. :param audio: torch tensor of shape [1, T] :param
stable_audio_tools/data/dataset.py:614
↓ 1 callers
Method
reset_generation_cache
( self, max_seq_len, batch_size, dtype=None )
stable_audio_tools/models/lm_backbone.py:28
↓ 1 callers
Method
revert_pattern_logits
Revert model logits obtained on a sequence built from the pattern back to a tensor matching the original sequence. This method is sim
stable_audio_tools/models/codebook_patterns.py:247
↓ 1 callers
Method
revert_pattern_sequence
Revert a sequence built from the pattern back to the original multi-codebook sequence without interleaving. The sequence is reverted using up
stable_audio_tools/models/codebook_patterns.py:222
↓ 1 callers
Function
rotate_half
(x)
stable_audio_tools/models/transformer.py:296
↓ 1 callers
Function
sample_discrete_euler
Draws samples from a model given starting noise. Euler method Args: sigmas: Pre-computed schedule tensor. Shape (steps+1,) for global sch
stable_audio_tools/inference/sampling.py:367
↓ 1 callers
Function
sample_flow_dpmpp
Draws samples from a model given starting noise. DPM-Solver++ for RF models Args: sigmas: Pre-computed schedule tensor. Shape (steps+1,)
stable_audio_tools/inference/sampling.py:447
↓ 1 callers
Function
sample_flow_pingpong
Draws samples from a model given starting noise. Ping-pong sampling for distilled models Args: sigmas: Pre-computed schedule tensor. Shap
stable_audio_tools/inference/sampling.py:528
↓ 1 callers
Function
sample_k
( model_fn, noise, init_data=None, steps=100, sampler_type="dpmpp-2m-s
stable_audio_tools/inference/sampling.py:650
↓ 1 callers
Function
sample_rk4
Draws samples from a model given starting noise. 4th-order Runge-Kutta Args: sigmas: Pre-computed schedule tensor of shape (steps+1,).
stable_audio_tools/inference/sampling.py:409
↓ 1 callers
Function
sample_timesteps_logsnr
Sample timesteps for diffusion training by sampling logSNR values and converting to t. Args: batch_size (int): Number of timesteps t
stable_audio_tools/inference/sampling.py:287
↓ 1 callers
Function
sample_timesteps_logsnr_uniform
Sample timesteps for diffusion training by sampling logSNR values and converting to t. Args: batch_size (int): Number of timesteps t
stable_audio_tools/inference/sampling.py:312
↓ 1 callers
Function
sample_top_k
Sample next token from top K values along the last dimension of the input probs tensor. Args: probs (torch.Tensor): Input probabilities w
stable_audio_tools/models/utils.py:91
↓ 1 callers
Function
sample_top_p
Sample next token from top P probabilities along the last dimension of the input probs tensor. Args: probs (torch.Tensor): Input probabil
stable_audio_tools/models/utils.py:108
↓ 1 callers
Function
set_verbose
(v: bool)
stable_audio_tools/verbose.py:14
↓ 1 callers
Function
snake_beta
(x, alpha, beta)
stable_audio_tools/models/blocks.py:375
↓ 1 callers
Function
spectrogram_image
Modified from PyTorch tutorial https://pytorch.org/tutorials/beginner/audio_feature_extractions_tutorial.html
stable_audio_tools/interface/aeiou.py:194
↓ 1 callers
Function
spherical_dist_loss
(x, y)
stable_audio_tools/training/arc.py:88
↓ 1 callers
Method
starts_with_special_token
(self)
stable_audio_tools/models/codebook_patterns.py:92
↓ 1 callers
Function
sync_non_fsdp_params
Broadcast non-FSDP trainable parameters from rank 0 to all other ranks. Call this after optimizer.step() to ensure parameter synchronization
stable_audio_tools/training/fsdp.py:72
↓ 1 callers
Method
synthesis
(self, x: Tensor)
stable_audio_tools/models/transforms.py:197
↓ 1 callers
Function
test_and_visualize
Test and visualize the noise spectrum
stable_audio_tools/models/psychoacoustics.py:449
↓ 1 callers
Function
tight_one_sided_complex_stft
Tight, one-sided, *demodulated* complex STFT for real signals, suitable for MRSTFT losses. Args ---- x : [B, T] real tensor n_ff
stable_audio_tools/models/transforms.py:361
↓ 1 callers
Method
tokenize
(self, x)
stable_audio_tools/models/pretransforms.py:48
↓ 1 callers
Method
unpack_tensor_to_dict
(self, features: torch.Tensor)
stable_audio_tools/models/discriminators.py:390
↓ 1 callers
Function
unwrap_state_dict
Detect if state_dict is from a wrapped training checkpoint and unwrap it. Wrapped checkpoints have keys like 'diffusion.model.xxx' or 'd
stable_audio_tools/interface/gradio.py:39
↓ 1 callers
Method
update_generation_cache
( self, seqlen_offset )
stable_audio_tools/models/lm_backbone.py:36
↓ 1 callers
Method
update_moving_average
(self, ma_model, current_model)
stable_audio_tools/training/ema.py:154
↓ 1 callers
Method
wrap_fsdp
Wrap model components for FSDP distributed training. Uses selective wrapping: only transformer layers are wrapped with FSDP for
stable_audio_tools/training/arc.py:920
↓ 1 callers
Function
zero_init
(layer)
stable_audio_tools/models/blocks.py:282
↓ 1 callers
Function
zero_pad_to_longest
Zero pad the shorter of two tensors to the length of the longer one.
stable_audio_tools/training/autoencoders.py:43
Function
WNConvTranspose1d
(*args, **kwargs)
stable_audio_tools/models/blocks.py:35
Function
XUNet1d
(type: str = "base", **kwargs)
stable_audio_tools/models/adp.py:1444
Method
__call__
(self, signal)
stable_audio_tools/data/utils.py:16
Method
__call__
(self, source: torch.Tensor)
stable_audio_tools/data/utils.py:35
Method
__call__
(self, signal)
stable_audio_tools/data/utils.py:132
Method
__call__
(self, signal)
stable_audio_tools/data/utils.py:136
Method
__call__
(self, signal)
stable_audio_tools/data/utils.py:140
Method
__call__
signal: torch.Tensor [channels, time]
stable_audio_tools/data/utils.py:162
Method
__call__
(self, t0, t1)
stable_audio_tools/inference/k_diffusion/sampling.py:67
Method
__call__
(self, sigma, sigma_next)
stable_audio_tools/inference/k_diffusion/sampling.py:93
Method
__call__
(self, *args, **kwargs)
stable_audio_tools/training/ema.py:183
Method
__getitem__
(self, idx)
stable_audio_tools/data/dataset.py:253
Method
__getitem__
(self, idx)
stable_audio_tools/data/dataset.py:379
← previous
next →
401–500 of 1,182, ranked by callers