MCPcopy Create free account

hub / github.com/ml-explore/mlx-examples / functions

Functions1,187 in github.com/ml-explore/mlx-examples

↓ 1 callersFunctionload_adapter
(flux, adapter_file, fuse=False)
flux/txt2image.py:32
↓ 1 callersFunctionload_ae
(name: str, hf_download: bool = True)
flux/flux/utils.py:123
↓ 1 callersFunctionload_and_check
(name)
lora/lora.py:152
↓ 1 callersFunctionload_audio
Open an audio file and read as mono waveform, resampling as necessary Parameters ---------- file: str The audio file to open
whisper/mlx_whisper/audio.py:24
↓ 1 callersFunctionload_audio
Read audio into an mx.array, resampling if necessary. Args: file (str): The audio file to open. sampling_rate (int): The sam
encodec/utils.py:17
↓ 1 callersFunctionload_autoencoder
Load the stable diffusion autoencoder from Hugging Face Hub.
stable_diffusion/stable_diffusion/model_io.py:267
↓ 1 callersFunctionload_clip
Load CLIP vision encoder with weights from HF Hub.
video/wan2.1/wan/utils.py:151
↓ 1 callersFunctionload_clip_tokenizer
(name: str)
flux/flux/utils.py:194
↓ 1 callersFunctionload_data
Loads the Cora graph data into MLX array format.
gcn/datasets.py:77
↓ 1 callersFunctionload_dataset
(dataset: str)
flux/flux/datasets.py:56
↓ 1 callersFunctionload_diffusion_config
Load the stable diffusion config from Hugging Face Hub.
stable_diffusion/stable_diffusion/model_io.py:297
↓ 1 callersFunctionload_dit
Load DiT model with weights from HF Hub.
video/wan2.1/wan/utils.py:116
↓ 1 callersFunctionload_flow_model
(name: str, hf_download: bool = True)
flux/flux/utils.py:98
↓ 1 callersFunctionload_hf_models
(path)
clip/test.py:25
↓ 1 callersFunctionload_image
Helper function to load an image from either a URL or file.
llava/generate.py:55
↓ 1 callersFunctionload_mlx_models
(path)
clip/test.py:18
↓ 1 callersFunctionload_model
( bert_model: str, weights_path: str )
bert/model.py:120
↓ 1 callersFunctionload_model
(model_path, tokenizer_config={})
llava/generate.py:88
↓ 1 callersFunctionload_model
(folder: str)
llms/mixtral/mixtral.py:203
↓ 1 callersFunctionload_model
(model_path)
llms/llama/llama.py:318
↓ 1 callersFunctionload_model
(folder: str)
llms/mistral/mistral.py:173
↓ 1 callersFunctionload_model
( path_or_hf_repo: str, dtype: mx.Dtype = mx.float32, )
whisper/mlx_whisper/load_models.py:14
↓ 1 callersFunctionload_t5
Load T5 encoder with weights from HF Hub.
video/wan2.1/wan/utils.py:140
↓ 1 callersFunctionload_t5_tokenizer
(name: str, pad: bool = True)
flux/flux/utils.py:208
↓ 1 callersFunctionload_t5_tokenizer
Load T5 tokenizer from HF Hub.
video/wan2.1/wan/utils.py:166
↓ 1 callersFunctionload_torch_and_mlx
()
whisper/test.py:41
↓ 1 callersFunctionload_unet
Load the stable diffusion UNet from Hugging Face Hub.
stable_diffusion/stable_diffusion/model_io.py:185
↓ 1 callersFunctionload_vae
Load VAE decoder with weights from HF Hub.
video/wan2.1/wan/utils.py:129
↓ 1 callersFunctionlog_mel_spectrogram
Compute the log-Mel spectrogram of Parameters ---------- audio: Union[str, np.ndarray, mx.array], shape = (*) The path to au
whisper/mlx_whisper/audio.py:132
↓ 1 callersMethodlog_prob
(self, x: mx.array)
normalizing_flow/distributions.py:20
↓ 1 callersMethodlog_prob
Flow back to the primal Gaussian and compute log-density, adding the transformation log-determinant along the way.
normalizing_flow/flows.py:43
↓ 1 callersFunctionloss
(model, inputs, targets, lengths)
lora/lora.py:178
↓ 1 callersFunctionloss_fn
(model, inputs, reduction="mean")
transformer_lm/main.py:81
↓ 1 callersFunctionlstm_custom
(x, h_in, cell, time_step)
encodec/encodec.py:50
↓ 1 callersFunctionlstm_custom
(x, h_in, cell, time_step)
musicgen/encodec.py:50
↓ 1 callersFunctionmain
(args: argparse.Namespace)
segment_anything/main.py:181
↓ 1 callersFunctionmain
(args)
transformer_lm/main.py:62
↓ 1 callersFunctionmain
(args)
mnist/main.py:45
↓ 1 callersFunctionmain
(args)
normalizing_flow/main.py:23
↓ 1 callersFunctionmain
(args)
speechcommands/main.py:129
↓ 1 callersFunctionmain
()
llava/generate.py:119
↓ 1 callersFunctionmain
(args)
cifar/main.py:116
↓ 1 callersFunctionmain
(args)
llms/speculative_decoding/main.py:21
↓ 1 callersFunctionmain
()
whisper/mlx_whisper/cli.py:205
↓ 1 callersFunctionmain
(text: str, output_path: str, model_name: str, max_steps: int)
musicgen/generate.py:10
↓ 1 callersFunctionmain
(args)
cvae/main.py:82
↓ 1 callersFunctionmain
(args)
gcn/main.py:35
↓ 1 callersFunctionmake_shards
(weights: dict, max_file_size_gibibyte: int = 15)
lora/utils.py:72
↓ 1 callersFunctionmake_shards
(weights: dict, max_file_size_gb: int = 5)
clip/convert.py:14
↓ 1 callersFunctionmake_shards
(weights: dict, max_file_size_gibibyte: int = 15)
llms/llama/convert.py:150
↓ 1 callersFunctionmedian_filter
Apply a median filter of width `filter_width` along the last dimension of `x`
whisper/mlx_whisper/timing.py:19
↓ 1 callersFunctionmel_filters
load the mel filterbank matrix for projecting STFT into a Mel spectrogram. Allows decoupling librosa dependency; saved using: np.sav
whisper/mlx_whisper/audio.py:84
↓ 1 callersFunctionmerge_punctuations
(alignment: List[WordTiming], prepended: str, appended: str)
whisper/mlx_whisper/timing.py:186
↓ 1 callersFunctionmnist
(batch_size, img_size, root=None)
cvae/dataset.py:6
↓ 1 callersMethodmultistep_uni_c_bh_update
( self, this_model_output, last_sample, this_sample, order )
video/wan2.1/wan/sampler.py:202
↓ 1 callersMethodmultistep_uni_p_bh_update
Predictor step of the UniPC multistep solver. Key variables: rks: Ratios of lambda differences between past and current steps
video/wan2.1/wan/sampler.py:108
↓ 1 callersFunctionnormalize
(image: mx.array, mean: mx.array, std: mx.array)
clip/image_processor.py:92
↓ 1 callersFunctionnormalize_adjacency
Normalizes the adjacency matrix according to the paper by Kipf et al. https://arxiv.org/abs/1609.02907
gcn/datasets.py:60
↓ 1 callersMethodnum_params
(self)
speechcommands/kwt.py:139
↓ 1 callersMethodnum_params
(self)
cifar/resnet.py:92
↓ 1 callersMethodpad_id
(self)
llms/mixtral/mixtral.py:190
↓ 1 callersFunctionparse_arguments
()
llava/generate.py:15
↓ 1 callersFunctionparse_arguments
()
whisper/benchmark.py:12
↓ 1 callersFunctionpossible_end
(s)
llms/llama/llama.py:244
↓ 1 callersMethodpostprocess_small_regions
Removes small disconnected regions and holes in masks, then reruns box NMS to remove any new duplicates. Edits mask_data in
segment_anything/segment_anything/automatic_mask_generator.py:316
↓ 1 callersMethodpredict_masks
Predicts masks. See '__call__' for more details.
segment_anything/segment_anything/mask_decoder.py:116
↓ 1 callersFunctionprepare_inputs
(processor, image, prompt)
llava/generate.py:79
↓ 1 callersFunctionpreprocess_audio
r""" Prepare inputs for the EnCodec model. Args: raw_audio (mx.array or List[mx.array]): The sequence or batch of sequenc
encodec/encodec.py:704
↓ 1 callersFunctionpreprocess_clip_image
Load and preprocess an image for CLIP ViT-H/14. The reference CLIP visual() receives images in [-1, 1], then does mul_(0.5).add_(0.5) to get
video/wan2.1/wan/clip.py:227
↓ 1 callersMethodqkv_attention
( self, q: Tensor, k: Tensor, v: Tensor, mask: Optional[Tensor] = None )
whisper/mlx_whisper/torch_whisper.py:91
↓ 1 callersMethodqkv_attention
(self, q, k, v, mask=None)
whisper/mlx_whisper/whisper.py:73
↓ 1 callersFunctionquantize
(weights, config, args)
lora/convert.py:13
↓ 1 callersFunctionquantize
(weights, config, args)
llms/mixtral/convert.py:48
↓ 1 callersFunctionquantize
(weights, config, args)
llms/llama/convert.py:128
↓ 1 callersFunctionquantize
(weights, config, args)
llms/mistral/convert.py:17
↓ 1 callersMethodquantize
(self, hidden_states)
musicgen/encodec.py:377
↓ 1 callersMethodquery_to_text
(self, query, table, columns, types)
lora/data/wikisql.py:68
↓ 1 callersMethodrandom_timesteps
(self, B, L, dtype=mx.float32, key=None)
flux/flux/sampler.py:33
↓ 1 callersMethodreload_text_encoders
(self)
flux/flux/flux.py:44
↓ 1 callersFunctionreplace_key
(key: str)
llms/speculative_decoding/convert.py:34
↓ 1 callersFunctionrescale
(image: mx.array)
clip/image_processor.py:88
↓ 1 callersFunctionresize
Resize so small size to short_size
clip/image_processor.py:61
↓ 1 callersFunctionrun_torch
(bert_model: str, batch: List[str])
bert/test.py:9
↓ 1 callersFunctionsample
(logits: mx.array)
lora/utils.py:190
↓ 1 callersFunctionsample
(logits)
llms/gguf_llm/models.py:314
↓ 1 callersFunctionsample
(logits)
musicgen/t5.py:432
↓ 1 callersFunctionsample
(logits)
t5/t5.py:432
↓ 1 callersMethodsample
( self, sample_shape: Union[int, Tuple[int, ...]], key: Optional[mx.array] = None )
normalizing_flow/distributions.py:15
↓ 1 callersMethodsample
Sample from the primal Gaussian and flow towards the target distribution.
normalizing_flow/flows.py:56
↓ 1 callersMethodsample_prior
(self, shape, dtype=mx.float32, key=None)
flux/flux/sampler.py:44
↓ 1 callersMethodsanitize
(self, weights)
flux/flux/clip.py:96
↓ 1 callersMethodsanitize
(self, weights)
flux/flux/t5.py:232
↓ 1 callersMethodsanitize
(self, weights)
flux/flux/autoencoder.py:336
↓ 1 callersMethodsanitize
(self, weights)
flux/flux/model.py:86
↓ 1 callersMethodsanitize
(weights)
clip/model.py:405
↓ 1 callersMethodsanitize
(cls, weights)
musicgen/t5.py:354
↓ 1 callersMethodsanitize
(cls, weights)
musicgen/musicgen.py:307
↓ 1 callersMethodsanitize
(cls, weights)
t5/t5.py:354
↓ 1 callersFunctionsave_audio
Save audio to a wave (.wav) file.
encodec/utils.py:7
↓ 1 callersFunctionsave_audio
Save audio to a wave (.wav) file.
musicgen/utils.py:7
← previousnext →401–500 of 1,187, ranked by callers