MCPcopy Create free account

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

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

↓ 1 callersMethodget_metrics
( self, audio_features, text_features, logit_scale_a )
stable_audio_tools/training/clap.py:368
↓ 1 callersFunctionget_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 callersMethodget_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 callersMethodget_steps_with_timestep
(self, t: int, q: tp.Optional[int] = None)
stable_audio_tools/models/codebook_patterns.py:110
↓ 1 callersFunctionget_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 callersFunctiongroup_dict_by_prefix
(prefix: str, d: Dict)
stable_audio_tools/models/adp.py:51
↓ 1 callersFunctionhuber_loss
(x,y)
stable_audio_tools/models/discriminators.py:58
↓ 1 callersFunctionidct_irfft_impl
(V)
stable_audio_tools/models/transforms.py:210
↓ 1 callersFunctionif_gd_loss
(Xp, Xr, eps=1e-3, w_floor=1e-3)
stable_audio_tools/training/losses/auraloss.py:18
↓ 1 callersFunctioninfer_global_rank
(lora_sd: dict)
stable_audio_tools/models/lora/utils.py:135
↓ 1 callersFunctionint16_to_float32_torch
Torch version of int16_to_float32 for GPU tensors.
stable_audio_tools/training/metrics/fad_metrics.py:106
↓ 1 callersMethodinverse
Reconstruct the original signal from the frequency bands.
stable_audio_tools/models/pqmf.py:46
↓ 1 callersFunctioninvert_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 callersFunctionis_filtered
(layer_name)
stable_audio_tools/models/lora/utils.py:56
↓ 1 callersFunctionkeyword_scandir
very fast `glob` alternative. from https://stackoverflow.com/a/59803793/4259243
stable_audio_tools/data/dataset.py:57
↓ 1 callersMethodlimiter
(self, x)
stable_audio_tools/inference/k_diffusion/sampling.py:202
↓ 1 callersFunctionlinear_geglu
(x, weight, bias=None)
stable_audio_tools/models/blocks.py:333
↓ 1 callersFunctionlinear_multistep_coeff
(order, t, i, j)
stable_audio_tools/inference/k_diffusion/sampling.py:158
↓ 1 callersFunctionload_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 callersMethodload_data_urls
(self)
stable_audio_tools/data/dataset.py:705
↓ 1 callersMethodload_file
(self, filename)
stable_audio_tools/data/dataset.py:239
↓ 1 callersFunctionload_model
(model_config=None, model_ckpt_path=None, pretrained_name=None, model_half=False)
pre_encode.py:17
↓ 1 callersFunctionload_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 callersFunctionload_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 callersFunctionload_panns_model
Load PANNs CNN14 model.
stable_audio_tools/training/metrics/fad_metrics.py:295
↓ 1 callersFunctionload_state_dict
(checkpoint_path: str, map_location="cpu", skip_params=True)
stable_audio_tools/training/metrics/fad_metrics.py:115
↓ 1 callersFunctionload_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 callersFunctionlog_point_cloud
(logger, key, tokens, caption=None)
stable_audio_tools/training/utils.py:136
↓ 1 callersFunctionlogger_project_name
(logger)
stable_audio_tools/training/utils.py:111
↓ 1 callersFunctionmain
()
train.py:30
↓ 1 callersFunctionmain
(args)
run_gradio.py:18
↓ 1 callersFunctionmain
(args)
pre_encode.py:178
↓ 1 callersFunctionmel_spectrogram
calculates data array for mel spectrogram (in however many channels)
stable_audio_tools/interface/aeiou.py:174
↓ 1 callersFunctionmmd_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 callersFunctionname_is_lora
(name)
stable_audio_tools/models/lora/utils.py:76
↓ 1 callersFunctionneighbour_exchange
(from_rank, to_rank, tensor, group=None)
stable_audio_tools/training/clap.py:77
↓ 1 callersFunctionneighbour_exchange_bidir
(left_rank, right_rank, tensor_to_left, tensor_to_right, group=None)
stable_audio_tools/training/clap.py:96
↓ 1 callersFunctionnormalized_complex_distance_loss
(x, y, eps=1e-5)
stable_audio_tools/training/losses/auraloss.py:13
↓ 1 callersMethodode_warmup_step
(self, diffusion_input, metadata, padding_masks, effective_seq_len=None)
stable_audio_tools/training/arc.py:622
↓ 1 callersFunctionpad_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 callersFunctionpad_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 callersMethodpad_to_period
(self, x)
stable_audio_tools/models/discriminators.py:532
↓ 1 callersFunctionpoint_cloud
returns a 3D point cloud of the tokens
stable_audio_tools/interface/aeiou.py:65
↓ 1 callersFunctionpolyphase_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 callersFunctionpolyphase_synthesis
Polyphase Inverse: Apply polyphase filter bank synthesis to reconstruct a signal. Parameters ---------- signal : torch.Tensor
stable_audio_tools/models/pqmf.py:350
↓ 1 callersFunctionpower_to_db
(spec, *, amin = 1e-10)
stable_audio_tools/interface/aeiou.py:164
↓ 1 callersFunctionprecompute_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 callersFunctionprepare_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 callersMethodpreprocess
(self, y)
stable_audio_tools/models/discriminators.py:936
↓ 1 callersMethodpreprocess_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 callersFunctionprocess_common_options
(pl_module, config)
stable_audio_tools/training/fsdp.py:180
↓ 1 callersMethodpropose_step
(self, error)
stable_audio_tools/inference/k_diffusion/sampling.py:205
↓ 1 callersMethodquantize
(self, z, skip_tanh: bool = False)
stable_audio_tools/models/fsq.py:64
↓ 1 callersFunctionrand_bool
(shape: Any, proba: float, device: Any = None)
stable_audio_tools/models/adp.py:1254
↓ 1 callersFunctionrandn_like
(t)
stable_audio_tools/training/autoencoders.py:147
↓ 1 callersFunctionremap_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 callersFunctionremove_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 callersMethodreset_generation_cache
( self, max_seq_len, batch_size, dtype=None )
stable_audio_tools/models/lm_backbone.py:28
↓ 1 callersMethodrevert_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 callersMethodrevert_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 callersFunctionrotate_half
(x)
stable_audio_tools/models/transformer.py:296
↓ 1 callersFunctionsample_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 callersFunctionsample_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 callersFunctionsample_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 callersFunctionsample_k
( model_fn, noise, init_data=None, steps=100, sampler_type="dpmpp-2m-s
stable_audio_tools/inference/sampling.py:650
↓ 1 callersFunctionsample_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 callersFunctionsample_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 callersFunctionsample_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 callersFunctionsample_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 callersFunctionsample_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 callersFunctionset_verbose
(v: bool)
stable_audio_tools/verbose.py:14
↓ 1 callersFunctionsnake_beta
(x, alpha, beta)
stable_audio_tools/models/blocks.py:375
↓ 1 callersFunctionspectrogram_image
Modified from PyTorch tutorial https://pytorch.org/tutorials/beginner/audio_feature_extractions_tutorial.html
stable_audio_tools/interface/aeiou.py:194
↓ 1 callersFunctionspherical_dist_loss
(x, y)
stable_audio_tools/training/arc.py:88
↓ 1 callersMethodstarts_with_special_token
(self)
stable_audio_tools/models/codebook_patterns.py:92
↓ 1 callersFunctionsync_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 callersMethodsynthesis
(self, x: Tensor)
stable_audio_tools/models/transforms.py:197
↓ 1 callersFunctiontest_and_visualize
Test and visualize the noise spectrum
stable_audio_tools/models/psychoacoustics.py:449
↓ 1 callersFunctiontight_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 callersMethodtokenize
(self, x)
stable_audio_tools/models/pretransforms.py:48
↓ 1 callersMethodunpack_tensor_to_dict
(self, features: torch.Tensor)
stable_audio_tools/models/discriminators.py:390
↓ 1 callersFunctionunwrap_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 callersMethodupdate_generation_cache
( self, seqlen_offset )
stable_audio_tools/models/lm_backbone.py:36
↓ 1 callersMethodupdate_moving_average
(self, ma_model, current_model)
stable_audio_tools/training/ema.py:154
↓ 1 callersMethodwrap_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 callersFunctionzero_init
(layer)
stable_audio_tools/models/blocks.py:282
↓ 1 callersFunctionzero_pad_to_longest
Zero pad the shorter of two tensors to the length of the longer one.
stable_audio_tools/training/autoencoders.py:43
FunctionWNConvTranspose1d
(*args, **kwargs)
stable_audio_tools/models/blocks.py:35
FunctionXUNet1d
(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
← previousnext →401–500 of 1,182, ranked by callers