MCPcopy Create free account

hub / github.com/apple/ml-4m / functions

Functions1,193 in github.com/apple/ml-4m

↓ 2 callersFunctionget_transform_resolution
(mod_name, default_resolution, to_tuple=True)
fourm/data/modality_transforms.py:42
↓ 2 callersMethodget_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
fourm/vq/scheduling/scheduling_ddpm.py:416
↓ 2 callersFunctiongroup_by_identifier
Groups the input_list [a,b,c,a,d,d,c,..] using the identifier a, in the following format: [[b,c], [d,d,c], ...]
fourm/utils/plotting_utils.py:533
↓ 2 callersMethodguided_autoregressive_step_batched
(self, mod_dict, target_mod, temperature, top_k: Union[float, int], top_p: float,
fourm/models/generate.py:919
↓ 2 callersMethodguided_maskgit_step_batched
(self, mod_dict, target_mod, num_select, temperature, top_k, top_p, condi
fourm/models/generate.py:665
↓ 2 callersMethodguided_roar_step_batched
ROAR = Random Order Autoregression
fourm/models/generate.py:783
↓ 2 callersFunctiongumbel_sample
(t, temperature = 1., dim = -1)
fourm/vq/quantizers/quantize_lucid.py:50
↓ 2 callersFunctionhas_file_allowed_extension
Checks if a file is an allowed extension. Args: filename (string): path to a file extensions (tuple of strings): extensions to co
fourm/data/multimodal_dataset_folder.py:31
↓ 2 callersFunctionkmeans
(samples, num_clusters, num_iters = 10, use_cosine_sim = False, sample_fn = sample_vectors, all_re
fourm/vq/quantizers/quantize_lucid.py:137
↓ 2 callersFunctionlaunch_evals
(launch_evaluate, launch_eval_metrics, launch_eval_image_log, model: torch.nn.Module, device:
run_training_vqcontrolnet.py:943
↓ 2 callersFunctionlaunch_evals
Launcher for various evaluation functions: standard evaluation, evaluation of image metrics, and image logging. Args: launch_eval
run_training_divae.py:1062
↓ 2 callersFunctionlaunch_evals
Launcher for various evaluation functions: standard evaluation, evaluation of image metrics, and image logging. Args: launch_eval
run_training_vqvae.py:1221
↓ 2 callersFunctionlinear_schedule
(num_steps, total_tokens)
fourm/utils/generation.py:60
↓ 2 callersFunctionload_safetensors
(safetensors_path, return_metadata=True)
fourm/utils/checkpoint.py:176
↓ 2 callersFunctionlog
(t, eps = 1e-20)
fourm/vq/quantizers/quantize_lucid.py:38
↓ 2 callersFunctionmake_4x4_pose
:param R (*, 3, 3) :param t (*, 3) return (*, 4, 4)
fourm/utils/hmr2_utils/hmr2/utils/renderer.py:64
↓ 2 callersFunctionmake_grid
(images)
run_training_vqcontrolnet.py:1182
↓ 2 callersFunctionmake_grid
Aggregate a list of PIL images into a grid of images.
run_training_vqvae.py:1641
↓ 2 callersFunctionmake_master_params
Copy model parameters into a (differently-shaped) list of full-precision parameters.
fourm/vq/models/unet/fp16_util.py:55
↓ 2 callersMethodmaskgit_step_batched
(self, mod_dict, target_mod, num_select, temperature, top_k, top_p, seed=None)
fourm/models/generate.py:650
↓ 2 callersFunctionmd5_hash
(path)
fourm/vq/percept_losses/lpips.py:51
↓ 2 callersMethodmerge_sequences_batched
(self, mod_dict, pred_ids, target_mod, text_tokenizer, default_sentinel="[S_1]")
fourm/models/generate.py:581
↓ 2 callersFunctionmixup_target
(target, num_classes, lam=1., smoothing=0.0, device='cuda')
fourm/utils/timm/mixup.py:26
↓ 2 callersFunctionnorm_cdf
(x)
fourm/vq/models/vit_models.py:58
↓ 2 callersFunctionnormalization_layer
(norm: Optional[str], dim: int, norm_cond_dim: int = -1)
fourm/utils/hmr2_utils/hmr2/models/components/t_cond_mlp.py:53
↓ 2 callersFunctionnormalize_tensor
(x,eps=1e-10)
fourm/vq/percept_losses/lpips.py:171
↓ 2 callersFunctionone_hot
(x, num_classes, on_value=1., off_value=0., device='cuda')
fourm/utils/timm/mixup.py:21
↓ 2 callersFunctionpatch_device
(module)
fourm/utils/clip/clip.py:151
↓ 2 callersFunctionpatch_float
(module)
fourm/utils/clip/clip.py:175
↓ 2 callersFunctionplot_conds_and_targets
Plots the conditioning and target modalities for a batch of samples. Args: cond_domains (list of str): List of conditioning domains
fourm/utils/plotting_utils.py:1195
↓ 2 callersFunctionplot_modality
Plots a single modality. Function name has a typo because of legacy reasons. Args: dec_dict (dict): Dictionary of decoded modalities
fourm/utils/plotting_utils.py:1169
↓ 2 callersMethodprevious_timestep
(self, timestep)
fourm/vq/scheduling/scheduling_ddpm.py:433
↓ 2 callersFunctionremove_ticks_and_labels
Remove the axis ticks and labels Args: ax (matplotlib.axes.Axes): Axis to remove ticks and labels from
fourm/utils/plotting_utils.py:839
↓ 2 callersMethodroar_step_batched
ROAR = Random Order Autoregression
fourm/models/generate.py:766
↓ 2 callersFunctionsave_on_main
(*args, **kwargs)
fourm/utils/dist.py:70
↓ 2 callersFunctionsave_on_s3
(filename, s3_path, s3_endpoint)
fourm/utils/s3_utils.py:29
↓ 2 callersFunctionscaled_cosine_alphas
Shifts a cosine noise schedule by a specified amount in log-SNR space. noise_shift = 1.0 corresponds to the standard cosine noise schedule. 0
fourm/vq/scheduling/scheduling_utils.py:79
↓ 2 callersFunctionsplit_model_name
(model_name)
fourm/utils/timm/model_builder.py:8
↓ 2 callersFunctiontext_to_pil_image
Converts text to a PIL image. Args: text (str): Text to convert to image padding (float): Padding around the text fo
fourm/utils/plotting_utils.py:1121
↓ 2 callersFunctiontext_to_tensor
Converts plaintext to a tensor with optional padding.
fourm/utils/generation_datasets/parti_prompts_dataset.py:102
↓ 2 callersMethodto_rgb
When semantic segmentation is performed, this function converts the class embeddings to RGB. Args: x: Input tensor of sh
fourm/vq/vqvae.py:288
↓ 2 callersMethodtrain
Convert the model into training mode.
fourm/utils/hmr2_utils/hmr2/models/backbones/vit.py:350
↓ 2 callersFunctiontruncate_caption_for_clip
(caption, clip_tokenizer, max_tokens=60)
run_generation.py:303
↓ 2 callersFunctionunbatch
(tensor)
fourm/utils/generation.py:27
↓ 2 callersFunctionunflatten_master_params
(param_group, master_param)
fourm/vq/models/unet/fp16_util.py:98
↓ 2 callersMethodunfreeze_all
(self)
fourm/models/fm.py:774
↓ 2 callersMethodunfreeze_decoder
(self, unfreeze_embeddings=True)
fourm/models/fm.py:751
↓ 2 callersMethodunfreeze_encoder
(self, unfreeze_embeddings=True)
fourm/models/fm.py:717
↓ 2 callersMethodupdate
(self, value, n=1)
fourm/utils/logger.py:47
↓ 2 callersMethodvae_encode
Encodes the input image into vae latent representaiton. Args: x: Input images Returns: Encoded latent
fourm/vq/vqvae.py:927
↓ 2 callersMethodvertices_to_trimesh
(self, vertices, camera_translation, mesh_base_color=(1.0, 1.0, 0.9), rot_axis=[1
fourm/utils/hmr2_utils/hmr2/utils/renderer.py:239
↓ 2 callersFunctionzero_master_grads
(master_params)
fourm/vq/models/unet/fp16_util.py:148
↓ 1 callersMethod__init__
(self)
fourm/utils/timm/cross_entropy.py:37
↓ 1 callersMethod__init__
(self, model, decay=0.9999, device='', resume='')
fourm/utils/timm/model_ema.py:39
↓ 1 callersMethod__init__
( self, root: str, loader: Callable[[str], Any], extensions: O
fourm/data/multimodal_dataset_folder.py:128
↓ 1 callersMethod__init__
(self, config: dict)
fourm/models/fm.py:790
↓ 1 callersMethod__init__
(self, vocab_size: int, max_length: int, dim_tokens: Option
fourm/models/decoder_embeddings.py:35
↓ 1 callersMethod__init__
(self, config: dict, output_head: Optional[nn.Module] = None)
fourm/models/fm_vit.py:243
↓ 1 callersMethod__setup_conds_and_targets
(self, sample)
fourm/demo_4M_sampler.py:295
↓ 1 callersMethod__setup_sample_and_schedule
(self, sample, cond_domains, target_domains, cfg_grow_conditioning=True)
fourm/demo_4M_sampler.py:309
↓ 1 callersMethod__setup_sr_conds_and_targets
(self, sample)
fourm/demo_4M_sampler.py:304
↓ 1 callersMethod__setup_sr_sample_and_schedule
(self, out_dict, cond_domains_sr, target_domains_sr, cfg_grow_conditioning_sr=True)
fourm/demo_4M_sampler.py:360
↓ 1 callersMethod_apply_basic
(self, img, mixing_weights, m)
fourm/utils/timm/auto_augment.py:761
↓ 1 callersMethod_apply_blended
(self, img, mixing_weights, m)
fourm/utils/timm/auto_augment.py:745
↓ 1 callersMethod_calc_blended_weights
(self, ws, m)
fourm/utils/timm/auto_augment.py:735
↓ 1 callersMethod_create_hook
(self, hook_fn)
fourm/utils/timm/model.py:75
↓ 1 callersFunction_download
(url: str, root: str)
fourm/utils/clip/clip.py:47
↓ 1 callersMethod_find_classes
Finds the class folders in a dataset. Args: dir (string): Root directory path. Returns: tuple: (cla
fourm/utils/generation_datasets/image_caption_dataset.py:67
↓ 1 callersMethod_find_classes
Finds the class folders in a dataset. Args: dir (string): Root directory path. Returns: tuple: (cla
fourm/data/multimodal_dataset_folder.py:155
↓ 1 callersMethod_find_classes
Finds the class folders in a dataset. Args: dir (string): Root directory path. Returns: tuple: (cla
fourm/data/multimodal_dataset_folder.py:306
↓ 1 callersMethod_freeze_vae
Freezes VAE
fourm/vq/vqvae.py:1044
↓ 1 callersFunction_get_pixels
(per_pixel, rand_color, patch_size, dtype=torch.float32, device='cuda')
fourm/utils/timm/random_erasing.py:18
↓ 1 callersMethod_get_variance
(self, timestep, prev_timestep)
fourm/vq/scheduling/scheduling_ddim.py:173
↓ 1 callersFunction_interpolation
(kwargs)
fourm/utils/timm/auto_augment.py:47
↓ 1 callersMethod_load_adapter
(self, path)
fourm/vq/models/controlnet.py:56
↓ 1 callersMethod_load_checkpoint
(self, checkpoint_path)
fourm/utils/timm/model_ema.py:134
↓ 1 callersFunction_load_checkpoint_for_ema
Workaround for ModelEma._load_checkpoint to accept an already-loaded object
fourm/utils/checkpoint.py:32
↓ 1 callersMethod_mix_batch
(self, x)
fourm/utils/timm/mixup.py:201
↓ 1 callersMethod_mix_batch_collate
(self, output, batch)
fourm/utils/timm/mixup.py:285
↓ 1 callersMethod_mix_elem
(self, x)
fourm/utils/timm/mixup.py:164
↓ 1 callersMethod_mix_elem_collate
(self, output, batch, half=False)
fourm/utils/timm/mixup.py:232
↓ 1 callersMethod_mix_pair
(self, x)
fourm/utils/timm/mixup.py:181
↓ 1 callersMethod_mix_pair_collate
(self, output, batch)
fourm/utils/timm/mixup.py:257
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
fourm/vq/models/vit_models.py:55
↓ 1 callersMethod_optimize_fp16
(self, opt: th.optim.Optimizer)
fourm/vq/models/unet/fp16_util.py:209
↓ 1 callersMethod_optimize_normal
(self, opt: th.optim.Optimizer)
fourm/vq/models/unet/fp16_util.py:225
↓ 1 callersFunction_posterize_level_to_arg
(level, _hparams)
fourm/utils/timm/auto_augment.py:225
↓ 1 callersFunction_select_rand_weights
(weight_idx=0, transforms=None)
fourm/utils/timm/auto_augment.py:608
↓ 1 callersFunction_solarize_level_to_arg
(level, _hparams)
fourm/utils/timm/auto_augment.py:246
↓ 1 callersFunction_split_metadata_string
(input_string)
fourm/utils/plotting_utils.py:400
↓ 1 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
fourm/vq/scheduling/scheduling_ddpm.py:262
↓ 1 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
fourm/vq/scheduling/scheduling_ddim.py:184
↓ 1 callersFunctionaa_to_rotmat
Convert axis-angle representation to rotation matrix. Works by first converting it to a quaternion. Args: theta (torch.Tensor): T
fourm/utils/hmr2_utils/hmr2/utils/geometry.py:12
↓ 1 callersMethodadapt_decoder_attention_mask
Transforms the compressed decoder attention mask to a full attention mask based on the specified constraints. Args: deco
fourm/models/fm.py:440
↓ 1 callersFunctionall_gather_sizes
(x, dim)
fourm/vq/quantizers/quantize_lucid.py:91
↓ 1 callersFunctionall_gather_variably_sized
(x, sizes, dim = 0)
fourm/vq/quantizers/quantize_lucid.py:98
↓ 1 callersFunctionaugment_and_mix_transform
Create AugMix PyTorch transform :param config_str: String defining configuration of random augmentation. Consists of multiple sections separated
fourm/utils/timm/auto_augment.py:788
↓ 1 callersFunctionaugmix_ops
(magnitude=10, hparams=None, transforms=None)
fourm/utils/timm/auto_augment.py:714
↓ 1 callersFunctionauto_augment_policy
(name='v0', hparams=None)
fourm/utils/timm/auto_augment.py:492
↓ 1 callersFunctionauto_augment_policy_original
(hparams)
fourm/utils/timm/auto_augment.py:426
← previousnext →201–300 of 1,193, ranked by callers