MCPcopy Create free account

hub / github.com/FunAudioLLM/FunMusic / functions

Functions702 in github.com/FunAudioLLM/FunMusic

↓ 44 callersMethodload
(self, llm_model, flow_model, hift_model, wavtokenizer_model)
inspiremusic/cli/model.py:82
↓ 14 callersMethodclose
(self)
inspiremusic/utils/tokenizer_utils.py:163
↓ 13 callersMethodupdate
(self)
inspiremusic/dataset/dataset.py:59
↓ 12 callersFunctionWNConv2d
(*args, **kwargs)
inspiremusic/wavtokenizer/decoder/discriminator_dac.py:28
↓ 12 callersMethodapply
(self, f)
inspiremusic/dataset/dataset.py:46
↓ 12 callersFunctionget_padding
(kernel_size, dilation=1)
inspiremusic/utils/tokenizer_utils.py:193
↓ 11 callersMethodembed
(self, x)
inspiremusic/music_tokenizer/models.py:523
↓ 10 callersMethod__init__
( self, optimizer: torch.optim.Optimizer, warmup_steps: Union[int, float] = 25000,
inspiremusic/utils/scheduler.py:44
↓ 9 callersMethod__init__
(self, h)
inspiremusic/music_tokenizer/models.py:378
↓ 8 callersFunctionmake_pad_mask
Make mask tensor containing indices of padded part. See description of make_non_pad_mask. Args: lengths (torch.Tensor): Batch of len
inspiremusic/utils/mask.py:201
↓ 7 callersFunctionWNConv1d
(*args, **kwargs)
inspiremusic/wavtokenizer/decoder/discriminator_dac.py:20
↓ 7 callersMethod__init__
(self)
inspiremusic/transformer/subsampling.py:25
↓ 7 callersMethodencode
(self, text: torch.Tensor, text_lengths: torch.Tensor)
inspiremusic/llm/llm.py:140
↓ 7 callersMethodflush
Flushes the remaining partial uint8, call this at the end of the stream to encode.
inspiremusic/utils/binary.py:81
↓ 6 callersFunctionDataset
Construct dataset from arguments We have two shuffle stage in the Dataset. The first is global shuffle at shards tar/raw file level.
inspiremusic/dataset/dataset.py:127
↓ 6 callersMethodget_padding
(kernel_size: int, dilation: int = 1)
inspiremusic/wavtokenizer/decoder/modules.py:191
↓ 6 callersFunctioninstantiate_class
Instantiates a class with the given args and init. Args: args: Positional arguments required for instantiation. init: Dict of the
inspiremusic/wavtokenizer/decoder/pretrained_model.py:13
↓ 6 callersFunctioninstantiate_class
Instantiates a class with the given args and init. Args: args: Positional arguments required for instantiation. init: Dict of the
inspiremusic/wavtokenizer/decoder/pretrained.py:13
↓ 6 callersFunctionis_distributed
()
inspiremusic/wavtokenizer/encoder/distrib.py:28
↓ 6 callersFunctionsafe_log
Computes the element-wise logarithm of the input tensor with clipping to avoid near-zero values. Args: x (Tensor): Input tensor.
inspiremusic/wavtokenizer/decoder/modules.py:195
↓ 6 callersMethodtext_normalize
(self, text, split=True)
inspiremusic/cli/frontend.py:63
↓ 5 callersMethod__init__
(self, in_channels: int, out_channels: int, kernel_size: int, stride: int = 1, dilation: int
inspiremusic/wavtokenizer/encoder/modules/conv.py:179
↓ 5 callersMethod__init__
Construct an PositionalEncoding object.
inspiremusic/transformer/embedding.py:37
↓ 5 callersMethoddecode
(self, x: torch.Tensor, s: torch.Tensor = torch.zeros(1, 1, 0))
inspiremusic/hifigan/generator.py:349
↓ 5 callersMethoddecode
(self, embed_ind)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:202
↓ 5 callersMethodfrom_pretrained_feat
Class method to create a new Vocos model instance from a pre-trained model stored in the Hugging Face model hub.
inspiremusic/wavtokenizer/decoder/pretrained.py:96
↓ 5 callersMethodinference
(self, text, audio_token, audio_token_len, text_token, text_token_len, embeddings=None, prom
inspiremusic/cli/model.py:198
↓ 4 callersFunctionNormalize
(in_channels, num_groups=32)
inspiremusic/wavtokenizer/decoder/models.py:15
↓ 4 callersMethod__init__
(self, dim0: int, dim1: int)
inspiremusic/flow/decoder.py:21
↓ 4 callersMethodadd_image
Log a scalar variable.
inspiremusic/utils/tokenizer_utils.py:151
↓ 4 callersMethodadd_scalar
Log a scalar variable.
inspiremusic/utils/tokenizer_utils.py:139
↓ 4 callersFunctionapply_parametrization_norm
(module: nn.Module, norm: str = 'none')
inspiremusic/wavtokenizer/encoder/modules/conv.py:25
↓ 4 callersMethodfrom_pretrained
Class method to create a new Vocos model instance from a pre-trained model stored in the Hugging Face model hub.
inspiremusic/wavtokenizer/decoder/pretrained.py:62
↓ 4 callersFunctionget_2d_padding
(kernel_size: tp.Tuple[int, int], dilation: tp.Tuple[int, int] = (1, 1))
inspiremusic/wavtokenizer/encoder/msstftd.py:24
↓ 4 callersFunctionget_norm_module
Return the proper normalization module. If causal is True, this will ensure the returned module is causal, or return an error if the normalization
inspiremusic/wavtokenizer/encoder/modules/conv.py:37
↓ 4 callersMethodpad_unpad_sequence_batch
(self, sos_eos_emb, embeddings, text_token, text_token_len, task_id_emb, audio_token, audio_token_len, seg_len
inspiremusic/llm/llm.py:170
↓ 4 callersFunctionplot_spectrogram_to_numpy
Plot a spectrogram and convert it to a numpy array. Args: spectrogram (ndarray): Spectrogram data. Returns: ndarray: Nu
inspiremusic/wavtokenizer/decoder/helpers.py:25
↓ 4 callersFunctionrandom_sampling
(weighted_scores, decoded_tokens)
inspiremusic/utils/common.py:188
↓ 4 callersMethodtoken2wav
(self, token, token_len, uuid, sample_rate, finalize=False, flow_cfg=None)
inspiremusic/cli/model.py:155
↓ 3 callersMethod__init__
(self, samp_rate, harmonic_num=0, sine_amp=0.1, noise_std=0.003, voiced_thre
inspiremusic/hifigan/generator.py:122
↓ 3 callersMethod__init__
( self, dim: int, codebook_size: int, kmeans_init: int = False, kmeans
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:114
↓ 3 callersMethod__init__
( self, period: int, in_channels: int = 1, kernel_size: int = 5, strid
inspiremusic/wavtokenizer/decoder/discriminators.py:43
↓ 3 callersMethod__init__
(self, in_channels)
inspiremusic/wavtokenizer/decoder/models.py:81
↓ 3 callersMethod__init__
(self, period)
inspiremusic/wavtokenizer/decoder/discriminator_dac.py:37
↓ 3 callersMethod_get_linear_warmup_with_cosine_annealing_lr
(self, step)
inspiremusic/utils/scheduler.py:543
↓ 3 callersMethod_get_warmup_lr
(self, step)
inspiremusic/utils/scheduler.py:128
↓ 3 callersMethodencode
(self, x)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:192
↓ 3 callersMethodencode_infer
(self, audio_input: torch.Tensor, **kwargs: Any)
inspiremusic/wavtokenizer/decoder/pretrained.py:196
↓ 3 callersMethodforward_one_step
Forward one step. This is only used for decoding. Args: memory: encoded memory, float32 (batch, maxlen_in, feat)
inspiremusic/transformer/decoder.py:187
↓ 3 callersMethodfrontend_continuation
(self, text, audio, time_start, time_end, chorus, target_sr=24000)
inspiremusic/cli/frontend.py:88
↓ 3 callersMethodget_bandwidth_per_quantizer
Return bandwidth per quantizer for a given input frame rate. Each quantizer encodes a frame with lg(bins) bits.
inspiremusic/wavtokenizer/encoder/quantization/vq.py:153
↓ 3 callersMethodinference
(self, task, text, audio, time_start, time_end, chorus, stream=False, sr=24000)
inspiremusic/cli/inspiremusic.py:73
↓ 3 callersFunctionnonlinearity
(x)
inspiremusic/wavtokenizer/decoder/models.py:10
↓ 3 callersMethodpush
Push the given symbol on the stream, flushing out bits if possible. Args: symbol (int): symbol to encode with the AC.
inspiremusic/wavtokenizer/encoder/quantization/ac.py:130
↓ 3 callersMethodremove_weight_norm
(self)
inspiremusic/hifigan/generator.py:100
↓ 3 callersFunctionrich_captions
(text=None, tags=None, lyrics=None, chorus="verse", start_time=0.0, end_time=30.0)
inspiremusic/utils/data_utils.py:36
↓ 3 callersMethodsampling_ids
( self, weighted_scores: torch.Tensor, decoded_tokens: List, i
inspiremusic/llm/llm.py:266
↓ 3 callersMethodsemantictoken2wav
(self, token)
inspiremusic/cli/model.py:188
↓ 3 callersFunctionstatic_batch
Static batch the data by `batch_size` Args: data: Iterable[{key, feat, label}] batch_size: batch size Retur
inspiremusic/dataset/processor.py:375
↓ 3 callersFunctionworld_size
()
inspiremusic/wavtokenizer/encoder/distrib.py:21
↓ 2 callersMethod__init__
( self, window_length: int, num_embeddings: Optional[int] = None, channels: in
inspiremusic/hifigan/discriminator.py:73
↓ 2 callersMethod__init__
(self, channels: int = 1, dimension: int = 128, n_filters: int = 32, n_residual_layers: int = 1,
inspiremusic/wavtokenizer/encoder/modules/seanet.py:91
↓ 2 callersMethod__init__
(self, frame_len: int, padding: str = "same")
inspiremusic/wavtokenizer/decoder/spectral_ops.py:137
↓ 2 callersMethod__init__
( self, dim: int, kernel_size: int = 3, dilation: Tuple[int, ...] = (1, 3, 5),
inspiremusic/wavtokenizer/decoder/modules.py:106
↓ 2 callersMethod__init__
(self, dim: int, n_fft: int, hop_length: int, padding: str = "same")
inspiremusic/wavtokenizer/decoder/heads.py:37
↓ 2 callersMethod__init__
( self, input_size: int, dtype: str = "fp16", pretrain_path: s
inspiremusic/transformer/qwen_encoder.py:22
↓ 2 callersMethod__init__
Args: input_size (int): input dim output_size (int): dimension of attention attention_heads (int): the nu
inspiremusic/transformer/encoder.py:39
↓ 2 callersMethod_decode_frame
(self, encoded_frame: EncodedFrame)
inspiremusic/wavtokenizer/encoder/model.py:180
↓ 2 callersMethod_extract_text_token
(self, text)
inspiremusic/cli/frontend.py:50
↓ 2 callersFunction_get_checkpoint_url
(root_url: str, checkpoint: str)
inspiremusic/wavtokenizer/encoder/utils.py:59
↓ 2 callersMethod_get_dataloder
(self, cfg: DataConfig, train: bool)
inspiremusic/wavtokenizer/decoder/dataset.py:34
↓ 2 callersMethod_get_lr
Simple const lr policy
inspiremusic/utils/scheduler.py:132
↓ 2 callersMethod_get_model
(target_bandwidths: tp.List[float], sample_rate: int = 24_000, channels:
inspiremusic/wavtokenizer/encoder/model.py:221
↓ 2 callersMethod_get_pretrained
(checkpoint_name: str, repository: tp.Optional[Path] = None)
inspiremusic/wavtokenizer/encoder/model.py:251
↓ 2 callersFunction_read_exactly
(fo: tp.IO[bytes], size: int)
inspiremusic/utils/binary.py:31
↓ 2 callersMethod_sa_block
(self, x: torch.Tensor, x_past: torch.Tensor, past_context: int)
inspiremusic/wavtokenizer/encoder/modules/transformer.py:44
↓ 2 callersFunctionall_reduce
(tensor: torch.Tensor, op=torch.distributed.ReduceOp.SUM)
inspiremusic/wavtokenizer/encoder/distrib.py:32
↓ 2 callersFunctionbatch_forward
(model, batch, info_dict, scaler)
inspiremusic/utils/train_utils.py:206
↓ 2 callersFunctionbuild_stable_quantized_cdf
Turn the given PDF into a quantized CDF that splits [0, 2 ** self.total_range_bits - 1] into chunks of size roughly proportional to the PDF.
inspiremusic/wavtokenizer/encoder/quantization/ac.py:18
↓ 2 callersFunctioncalc_utt_length
(_text: str)
inspiremusic/utils/frontend_utils.py:65
↓ 2 callersFunctioncalculate_embd_statistics
(embd_lst)
inspiremusic/metrics/openl3_fd.py:25
↓ 2 callersMethodcodes_to_features
Transforms an input sequence of discrete tokens (codes) into feature embeddings using the feature extractor's codebook weights.
inspiremusic/wavtokenizer/decoder/pretrained.py:224
↓ 2 callersMethodcv
Cross validation on
inspiremusic/utils/executor.py:91
↓ 2 callersMethoddecode
Decode the given frames into a waveform. Note that the output might be a bit bigger than the input. In that case, any extra steps at t
inspiremusic/wavtokenizer/encoder/model.py:167
↓ 2 callersMethoddequantize
(self, embed_ind)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:188
↓ 2 callersFunctionema_inplace
(moving_avg, new, decay: float)
inspiremusic/wavtokenizer/encoder/quantization/core_vq.py:49
↓ 2 callersMethodencode
Given a tensor `x`, returns a list of frames containing the discrete encoded codes for `x`, along with rescaling factors for each segm
inspiremusic/wavtokenizer/encoder/model.py:122
↓ 2 callersMethodencode
(self, x)
inspiremusic/music_tokenizer/vqvae.py:50
↓ 2 callersFunctionenv_variables
()
inspiremusic/cli/inference.py:26
↓ 2 callersMethodextend_pe
Reset the positional encodings.
inspiremusic/transformer/embedding.py:224
↓ 2 callersFunctionextract_embeddings
Given a list of files, compute their embeddings in batches. If channels == 1: stereo audio is downmixed to mono. Mono embeddings are of dim=
inspiremusic/metrics/openl3_fd.py:88
↓ 2 callersFunctionextract_embeddings_nobatching
Given a list of files, compute their embeddings one by one. If channels == 1: stereo audio is downmixed to mono. Mono embeddings are of dim=
inspiremusic/metrics/openl3_fd.py:178
↓ 2 callersFunctionfade_out
Apply a linear fade-out effect to the given audio waveform. Parameters: audio (torch.Tensor): The audio waveform tensor. sample_rate
inspiremusic/utils/audio_utils.py:130
↓ 2 callersMethodforward
(self, fake, real)
inspiremusic/wavtokenizer/decoder/loss.py:130
↓ 2 callersMethodforward_attention
Compute attention context vector. Args: value (torch.Tensor): Transformed value, size (#batch, n_head, time2, d_k
inspiremusic/transformer/attention.py:81
↓ 2 callersMethodforward_estimator
(self, x, mask, mu, t, spks, cond)
inspiremusic/flow/flow_matching.py:98
↓ 2 callersMethodforward_qkv
Transform query, key and value. Args: query (torch.Tensor): Query tensor (#batch, time1, size). key (torch.Tensor): K
inspiremusic/transformer/attention.py:52
↓ 2 callersMethodfrom_hparams0802
Class method to create a new Vocos model instance from hyperparameters stored in a yaml configuration file.
inspiremusic/wavtokenizer/decoder/pretrained_model.py:89
↓ 2 callersMethodfrom_hparams_feat
Class method to create a new Vocos model instance from hyperparameters stored in a yaml configuration file.
inspiremusic/wavtokenizer/decoder/pretrained.py:82
↓ 2 callersMethodfrontend_text_to_music
(self, text, time_start, time_end, chorus)
inspiremusic/cli/frontend.py:81
next →1–100 of 702, ranked by callers