MCPcopy Create free account

hub / github.com/HeartMuLa/heartlib / functions

Functions102 in github.com/HeartMuLa/heartlib

↓ 10 callersMethod__init__
(self, dim: int, eps: float = 1e-6)
src/heartlib/heartcodec/models/transformer.py:9
↓ 10 callersMethod__init__
( self, in_channels: int, out_channels: int, kernel_size: int, stride:
src/heartlib/heartcodec/models/sq_codec.py:34
↓ 6 callersMethodfrom_pretrained
( cls, pretrained_path: str, device: Union[torch.device, Dict[str, torch.device]],
src/heartlib/pipelines/music_generation.py:353
↓ 5 callersMethod_shape
(self, x: torch.Tensor, b: int, t: int)
src/heartlib/heartcodec/models/transformer.py:83
↓ 4 callersFunctionsample_topk
(logits: torch.Tensor, topk: int, temperature: float)
src/heartlib/heartmula/modeling_heartmula.py:106
↓ 2 callersFunction_create_causal_mask
(seq_len: int, device: torch.device)
src/heartlib/heartmula/modeling_heartmula.py:90
↓ 2 callersMethod_embed_audio
(self, codebook: int, tokens: torch.Tensor)
src/heartlib/heartmula/modeling_heartmula.py:287
↓ 2 callersFunction_index_causal_mask
(mask: torch.Tensor, input_pos: torch.Tensor)
src/heartlib/heartmula/modeling_heartmula.py:94
↓ 2 callersFunction_prepare_transformer
(model)
src/heartlib/heartmula/modeling_heartmula.py:83
↓ 2 callersMethod_unload
(self)
src/heartlib/pipelines/music_generation.py:154
↓ 2 callersMethodencode
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:521
↓ 2 callersMethodfrom_file
(cls, path: str)
src/heartlib/pipelines/music_generation.py:78
↓ 2 callersMethodgenerate_frame
( self, tokens: torch.Tensor, tokens_mask: torch.Tensor, input_pos: torch.Tens
src/heartlib/heartmula/modeling_heartmula.py:181
↓ 2 callersMethodinference_codes
( self, codes, true_latents, latent_length, incontext_length,
src/heartlib/heartcodec/models/flow_matching.py:57
↓ 2 callersMethodreset_caches
(self)
src/heartlib/heartmula/modeling_heartmula.py:272
↓ 1 callersMethod_embed_tokens
( self, tokens: torch.Tensor, uncond_mask: torch.Tensor | None )
src/heartlib/heartmula/modeling_heartmula.py:290
↓ 1 callersMethod_forward
( self, model_inputs: Dict[str, Any], max_audio_length_ms: int, temperature: f
src/heartlib/pipelines/music_generation.py:267
↓ 1 callersFunction_multinomial_sample_one_no_sync
( probs, )
src/heartlib/heartmula/modeling_heartmula.py:99
↓ 1 callersFunction_resolve_devices
( device: Union[torch.device, Dict[str, torch.device]], lazy_load: bool )
src/heartlib/pipelines/music_generation.py:42
↓ 1 callersFunction_resolve_paths
(pretrained_path: str, version: str)
src/heartlib/pipelines/music_generation.py:15
↓ 1 callersMethod_sanitize_parameters
(self, **kwargs)
src/heartlib/pipelines/music_generation.py:183
↓ 1 callersMethoddecode
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:533
↓ 1 callersMethoddetokenize
( self, codes, duration=29.76, num_steps=10, disable_progress=False,
src/heartlib/heartcodec/modeling_heartcodec.py:58
↓ 1 callersMethodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:71
↓ 1 callersFunctionget_padding
(kernel_size, dilation=1)
src/heartlib/heartcodec/models/sq_codec.py:10
↓ 1 callersMethodget_sin_cos
(self, seq_len: int, device, dtype)
src/heartlib/heartcodec/models/transformer.py:27
↓ 1 callersFunctionparse_args
()
examples/run_lyrics_transcription.py:6
↓ 1 callersFunctionparse_args
()
examples/run_music_generation.py:34
↓ 1 callersMethodpostprocess
(self, model_outputs: Dict[str, Any], save_path: str)
src/heartlib/pipelines/music_generation.py:338
↓ 1 callersMethodpreprocess
(self, inputs: Dict[str, Any], cfg_scale: float)
src/heartlib/pipelines/music_generation.py:196
↓ 1 callersMethodsetup_caches
(self, max_batch_size: int)
src/heartlib/heartmula/modeling_heartmula.py:155
↓ 1 callersFunctionsnake
(x, alpha)
src/heartlib/heartcodec/models/sq_codec.py:16
↓ 1 callersMethodsolve_euler
Fixed euler solver for ODEs. Args: x (torch.Tensor): random noise t_span (torch.Tensor): n_timesteps interpol
src/heartlib/heartcodec/models/flow_matching.py:128
↓ 1 callersMethodtimestep_embedding
(self, timesteps, max_period=10000, scale=1000)
src/heartlib/heartcodec/models/transformer.py:420
Method__call__
(self, inputs: Dict[str, Any], **kwargs)
src/heartlib/pipelines/music_generation.py:344
Method__init__
( self, # config for rvq dim: int = 512, codebook_size: int = 8192, de
src/heartlib/heartcodec/configuration_heartcodec.py:8
Method__init__
( self, config: HeartCodecConfig, )
src/heartlib/heartcodec/modeling_heartcodec.py:13
Method__init__
(self, dim: int, base: int = 10000)
src/heartlib/heartcodec/models/transformer.py:21
Method__init__
( self, dim: int, n_heads: int, head_dim: int, bias: bool = False,
src/heartlib/heartcodec/models/transformer.py:55
Method__init__
( self, dim: int, hidden_dim: Optional[int] = None, multiple_of: int = 256,
src/heartlib/heartcodec/models/transformer.py:167
Method__init__
( self, dim: int, n_heads: int, head_dim: int, mlp_multiple_of: int =
src/heartlib/heartcodec/models/transformer.py:191
Method__init__
(self, hidden_size, filter_size, kernel_size=1, dropout=0.0)
src/heartlib/heartcodec/models/transformer.py:268
Method__init__
( self, num_attention_heads: int, attention_head_dim: int, in_channels: int,
src/heartlib/heartcodec/models/transformer.py:285
Method__init__
(self, embedding_dim: int, size_emb_dim: int)
src/heartlib/heartcodec/models/transformer.py:412
Method__init__
(self, embedding_dim: int)
src/heartlib/heartcodec/models/transformer.py:443
Method__init__
(self, in_channels: int, time_embed_dim: int)
src/heartlib/heartcodec/models/transformer.py:462
Method__init__
( self, num_channels: int, flip_sin_to_cos: bool = True, downscale_freq_shift:
src/heartlib/heartcodec/models/transformer.py:476
Method__init__
(self, channels)
src/heartlib/heartcodec/models/sq_codec.py:25
Method__init__
( self, in_channels: int, out_channels: int, kernel_size: int, stride:
src/heartlib/heartcodec/models/sq_codec.py:79
Method__init__
(self, n_in, n_out, num_samples, kernel_size=7, causal=False)
src/heartlib/heartcodec/models/sq_codec.py:123
Method__init__
(self, n_in, n_out, num_samples, kernel_size=7, causal=False)
src/heartlib/heartcodec/models/sq_codec.py:136
Method__init__
(self, n_in, n_out, dilation, res_kernel_size=7, causal=False)
src/heartlib/heartcodec/models/sq_codec.py:152
Method__init__
( self, n_in, n_out, stride, down_kernel_size, res_kernel_size=7, causal=False )
src/heartlib/heartcodec/models/sq_codec.py:174
Method__init__
( self, n_in, n_out, stride, up_kernel_size, res_kernel_size=7, causal=False )
src/heartlib/heartcodec/models/sq_codec.py:230
Method__init__
( self, in_channels: int, out_channels: int, kernel_size: int, stride:
src/heartlib/heartcodec/models/sq_codec.py:291
Method__init__
( self, in_channels: int, out_channels: int, kernel_size: int, stride:
src/heartlib/heartcodec/models/sq_codec.py:330
Method__init__
( self, num_bands, sample_rate, causal, num_samples, downsampl
src/heartlib/heartcodec/models/sq_codec.py:383
Method__init__
( self, # rvq stuff dim: int = 512, codebook_size: int = 8192, decay:
src/heartlib/heartcodec/models/flow_matching.py:10
Method__init__
(self, *args, **kwargs)
src/heartlib/pipelines/lyrics_transcription.py:11
Method__init__
( self, heartmula_path: str, heartcodec_path: str, heartmula_device: torch.dev
src/heartlib/pipelines/music_generation.py:85
Method__init__
( self, backbone_flavor: str = "llama-3B", decoder_flavor: str = "llama-300M",
src/heartlib/heartmula/configuration_heartmula.py:7
Method__init__
( self, config: HeartMuLaConfig, )
src/heartlib/heartmula/modeling_heartmula.py:122
Method_cfg_cat
(tensor: torch.Tensor, cfg_scale: float)
src/heartlib/pipelines/music_generation.py:253
Method_embed_local_audio
the token from 0-30
src/heartlib/heartmula/modeling_heartmula.py:276
Method_pad_audio_token
(token: torch.Tensor)
src/heartlib/pipelines/music_generation.py:297
Methodapply_rope_vec
(tensor)
src/heartlib/heartcodec/models/transformer.py:109
Methodapply_rotary
( self, x: torch.Tensor, sin: torch.Tensor, cos: torch.Tensor )
src/heartlib/heartcodec/models/transformer.py:43
Methodbackward
(ctx, grad_output)
src/heartlib/heartcodec/models/sq_codec.py:377
Methodcodec
(self)
src/heartlib/pipelines/music_generation.py:144
Methodforward
(self, x: torch.Tensor)
src/heartlib/heartcodec/models/transformer.py:14
Methodforward
( self, x: torch.Tensor, encoder_hidden_states: Optional[torch.Tensor] = None,
src/heartlib/heartcodec/models/transformer.py:86
Methodforward
(self, x: torch.Tensor)
src/heartlib/heartcodec/models/transformer.py:184
Methodforward
( self, x: torch.Tensor, encoder_hidden_states: Optional[torch.Tensor] = None,
src/heartlib/heartcodec/models/transformer.py:231
Methodforward
(self, x)
src/heartlib/heartcodec/models/transformer.py:277
Methodforward
( self, hidden_states: torch.Tensor, timestep: Optional[torch.LongTensor] = None,
src/heartlib/heartcodec/models/transformer.py:354
Methodforward
(self, timestep, hidden_dtype)
src/heartlib/heartcodec/models/transformer.py:435
Methodforward
( self, timestep: torch.Tensor, hidden_dtype: Optional[torch.dtype] = None, )
src/heartlib/heartcodec/models/transformer.py:451
Methodforward
(self, x: torch.Tensor)
src/heartlib/heartcodec/models/transformer.py:468
Methodforward
(self, timesteps: torch.Tensor)
src/heartlib/heartcodec/models/transformer.py:487
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:29
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:115
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:129
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:142
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:167
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:222
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:283
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:317
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:355
Methodforward
(ctx, input)
src/heartlib/heartcodec/models/sq_codec.py:372
Methodforward
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:494
Methodfrom_pretrained
( cls, pretrained_path: str, device: torch.device, dtype: torch.dtype )
src/heartlib/pipelines/lyrics_transcription.py:15
Methodinference
(self, x)
src/heartlib/heartcodec/models/sq_codec.py:506
Functionllama3_2_300M
()
src/heartlib/heartmula/modeling_heartmula.py:27
Functionllama3_2_3B
()
src/heartlib/heartmula/modeling_heartmula.py:11
Functionllama3_2_400M
()
src/heartlib/heartmula/modeling_heartmula.py:59
Functionllama3_2_7B
()
src/heartlib/heartmula/modeling_heartmula.py:43
Methodmula
(self)
src/heartlib/pipelines/music_generation.py:133
Methodremove_weight_norm
(self)
src/heartlib/heartcodec/models/sq_codec.py:324
Methodremove_weight_norm
(self)
src/heartlib/heartcodec/models/sq_codec.py:365
Functionstr2bool
(value)
examples/run_music_generation.py:6
next →1–100 of 102, ranked by callers