MCPcopy Create free account

hub / github.com/Vchitect/Latte / functions

Functions555 in github.com/Vchitect/Latte

↓ 96 callersMethodsub
(self, tag=None, num_items=None, flush_interval=1000, rel_lo=0, rel_hi=1)
tools/metrics/metric_utils.py:175
↓ 64 callersMethodappend
(self, x)
tools/metrics/metric_utils.py:87
↓ 24 callersMethodload
(pkl_file)
tools/metrics/metric_utils.py:135
↓ 23 callersFunction_extract_into_tensor
Extract values from a 1-D numpy array for a batch of indices. :param arr: the 1-D numpy array. :param timesteps: a tensor of indices i
diffusion/gaussian_diffusion.py:869
↓ 19 callersMethodmean
r"""Returns the mean of the scalars that were accumulated for the given statistic between the last two calls to `update()`, or NaN if
tools/torch_utils/training_stats.py:188
↓ 12 callersMethodupdate
(self, cur_items: int)
tools/metrics/metric_utils.py:160
↓ 10 callersMethodsave
(self, pkl_file)
tools/metrics/metric_utils.py:130
↓ 8 callersFunctionclip_grad_norm_
r""" Copy from torch.nn.utils.clip_grad_norm_ Clips gradient norm of an iterable of parameters. The norm is computed over all gradients
utils.py:72
↓ 8 callersMethodupdate
r"""Copies current values of the internal counters to the user-visible state and resets them for the next round. If `keep_previous=Tr
tools/torch_utils/training_stats.py:147
↓ 8 callersFunctionupdate_ema
Step the EMA model towards the current model.
utils.py:191
↓ 7 callersMethod__init__
(self, cfg: DictConfig, channel_dim: int, motion_v_dim: int=None)
tools/utils/layers.py:203
↓ 7 callersFunction_is_tensor_video_clip
(clip)
datasets/video_transforms.py:6
↓ 7 callersFunctionget_models
(args)
models/__init__.py:31
↓ 6 callersFunction_conv2d_wrapper
Wrapper for the underlying `conv2d()` and `conv_transpose2d()` implementations.
tools/torch_utils/ops/conv2d_resample.py:29
↓ 6 callersMethod_file_ext
(fname)
tools/utils/dataset.py:65
↓ 6 callersFunction_parse_padding
(padding)
tools/torch_utils/ops/upfirdn2d.py:46
↓ 6 callersFunction_parse_scaling
(scaling)
tools/torch_utils/ops/upfirdn2d.py:37
↓ 6 callersFunctioncreate_diffusion
( timestep_respacing, noise_schedule="linear", use_kl=False, sigma_small=False, pred
diffusion/__init__.py:10
↓ 6 callersMethodencode
(self, *args, **kwargs)
models/clip.py:28
↓ 6 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
diffusion/gaussian_diffusion.py:16
↓ 6 callersMethodsample
Importance-sample timesteps for a batch. :param batch_size: the number of timesteps. :param device: the torch device to sa
diffusion/timestep_sampler.py:44
↓ 5 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1
models/latte.py:208
↓ 5 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1152,
models/latte_img.py:211
↓ 5 callersFunction_get_filter_size
(f)
tools/torch_utils/ops/upfirdn2d.py:57
↓ 5 callersMethodconvert
(self, value, param, ctx)
tools/calc_metrics_for_dataset.py:84
↓ 5 callersFunctioncrop
Args: clip (torch.tensor): Video clip to be cropped. Size is (T, C, H, W)
datasets/video_transforms.py:37
↓ 5 callersMethodget_all
(self)
tools/metrics/metric_utils.py:116
↓ 5 callersMethodstd
r"""Returns the standard deviation of the scalars that were accumulated for the given statistic between the last two calls to `update(
tools/torch_utils/training_stats.py:198
↓ 4 callersMethod__init__
( self, num_attention_heads: int = 16, attention_head_dim: int = 88, in_channe
models/latte_t2v.py:475
↓ 4 callersFunction_conv2d_gradfix
(transpose, weight_shape, stride, padding, output_padding, dilation, groups)
tools/torch_utils/ops/conv2d_gradfix.py:68
↓ 4 callersMethod_get_raw_labels
(self)
tools/utils/dataset.py:68
↓ 4 callersFunction_tuple_of_ints
(xs, ndim)
tools/torch_utils/ops/conv2d_gradfix.py:58
↓ 4 callersMethod_wrap_model
(self, model)
diffusion/respace.py:106
↓ 4 callersFunctioncleanup
End DDP training.
utils.py:209
↓ 4 callersFunctioncreate_logger
Create a logger that writes to a log file and stdout.
utils.py:148
↓ 4 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
models/latte.py:439
↓ 4 callersFunctionget_dataset
(args)
datasets/__init__.py:13
↓ 4 callersFunctionget_experiment_dir
(root_dir, args)
utils.py:127
↓ 4 callersMethodget_mean_cov
(self)
tools/metrics/metric_utils.py:123
↓ 4 callersMethodp_mean_variance
Apply the model to get p(x_{t-1} | x_t), as well as a prediction of the initial x, x_0. :param model: the model, which tak
diffusion/gaussian_diffusion.py:254
↓ 4 callersMethodq_posterior_mean_variance
Compute the mean and variance of the diffusion posterior: q(x_{t-1} | x_t, x_0)
diffusion/gaussian_diffusion.py:232
↓ 4 callersFunctionrequires_grad
Set requires_grad flag for all parameters in a model.
utils.py:202
↓ 4 callersMethodtraining_losses
( self, model, *args, **kwargs )
diffusion/respace.py:95
↓ 4 callersFunctionwrite_tensorboard
write the loss information to a tensorboard file. Only for pytorch DDP mode.
utils.py:178
↓ 3 callersMethod_get_delta
r"""Returns the raw moments that were accumulated for the given statistic between the last two calls to `update()`, or zero if no scal
tools/torch_utils/training_stats.py:170
↓ 3 callersMethod_predict_eps_from_xstart
(self, x_t, t, pred_xstart)
diffusion/gaussian_diffusion.py:345
↓ 3 callersFunction_unbroadcast
(x, shape)
tools/torch_utils/ops/fma.py:49
↓ 3 callersMethod_vb_terms_bpd
Get a term for the variational lower-bound. The resulting units are bits (rather than nats, as one might expect). This all
diffusion/gaussian_diffusion.py:686
↓ 3 callersMethodclose
(self)
tools/utils/dataset.py:80
↓ 3 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
models/latte_img.py:462
↓ 3 callersMethodget_dim
(self)
tools/utils/layers.py:239
↓ 3 callersMethodget_label
(self, idx)
tools/utils/dataset.py:115
↓ 3 callersFunctionget_obj_from_module
Traverses the object name and returns the last (rightmost) python object.
tools/dnnlib/util.py:266
↓ 3 callersFunctionlistdir_full_paths
(d)
tools/convert_videos_to_frames.py:86
↓ 3 callersFunctionmodulate
(x, shift, scale)
models/latte.py:28
↓ 3 callersFunctionmodulate
(x, shift, scale)
models/latte_img.py:32
↓ 3 callersFunctionnamed_params_and_buffers
(module)
tools/torch_utils/misc.py:150
↓ 3 callersFunctionresize
(clip, target_size, interpolation_mode)
datasets/video_transforms.py:47
↓ 3 callersFunctionupfirdn2d
r"""Pad, upsample, filter, and downsample a batch of 2D images. Performs the following sequence of operations for each channel: 1. Upsample
tools/torch_utils/ops/upfirdn2d.py:120
↓ 2 callersMethod__getstate__
(self)
tools/utils/dataset.py:89
↓ 2 callersMethod__init__
(self, name, # Name of the dataset. raw_shape, # Shape of the r
tools/utils/dataset.py:38
↓ 2 callersMethod__init__
(self, path, dropout_prob=0.1)
models/clip.py:66
↓ 2 callersMethod_clean_caption
(self, caption)
sample/pipeline_latte.py:384
↓ 2 callersFunction_get_weight_shape
(w)
tools/torch_utils/ops/conv2d_resample.py:21
↓ 2 callersMethod_get_zipfile
(self)
tools/utils/dataset.py:203
↓ 2 callersMethod_get_zipfile
(self)
tools/utils/dataset.py:336
↓ 2 callersMethod_load_raw_frames
(self, raw_idx: int, frames_idx: List[int]=None)
tools/utils/dataset.py:432
↓ 2 callersMethod_open_file
(self, fname)
tools/utils/dataset.py:209
↓ 2 callersMethod_open_file
(self, fname)
tools/utils/dataset.py:342
↓ 2 callersMethod_predict_xstart_from_eps
(self, x_t, t, eps)
diffusion/gaussian_diffusion.py:338
↓ 2 callersFunction_should_use_custom_op
(input)
tools/torch_utils/ops/conv2d_gradfix.py:47
↓ 2 callersMethod_text_preprocessing
(self, text, clean_caption=False)
sample/pipeline_latte.py:359
↓ 2 callersFunction_upfirdn2d_cuda
Fast CUDA implementation of `upfirdn2d()` using custom ops.
tools/torch_utils/ops/upfirdn2d.py:214
↓ 2 callersFunction_warmup_beta
(beta_start, beta_end, num_diffusion_timesteps, warmup_frac)
diffusion/gaussian_diffusion.py:58
↓ 2 callersMethodappend_torch
(self, x, num_gpus=1, rank=0)
tools/metrics/metric_utils.py:104
↓ 2 callersFunctionapprox_standard_normal_cdf
A fast approximation of the cumulative distribution function of the standard normal.
diffusion/diffusion_utils.py:39
↓ 2 callersMethodbackward
(ctx, *output_grads)
models/utils.py:54
↓ 2 callersFunctioncalc_output_padding
(input_shape, output_shape)
tools/torch_utils/ops/conv2d_gradfix.py:95
↓ 2 callersFunctioncenter_crop
(clip, crop_size)
datasets/video_transforms.py:80
↓ 2 callersFunctionclean_caption
(caption)
utils.py:339
↓ 2 callersMethodcondition_score
Compute what the p_mean_variance output would have been, should the model's score function be conditioned by cond_fn. See
diffusion/gaussian_diffusion.py:362
↓ 2 callersFunctioncreate_tensorboard
Create a tensorboard that saves losses.
utils.py:168
↓ 2 callersMethodddim_sample_loop
Generate samples from the model using DDIM. Same usage as p_sample_loop().
diffusion/gaussian_diffusion.py:604
↓ 2 callersFunctionfind_model
Finds a pre-trained Latte model, downloading it if necessary. Alternatively, loads a model from a local path.
utils.py:274
↓ 2 callersMethodflush
Flush written text to both stdout and a file, if open.
tools/dnnlib/util.py:96
↓ 2 callersFunctionget_feature_detector
(url, device=torch.device('cpu'), num_gpus=1, rank=0, verbose=False)
tools/metrics/metric_utils.py:46
↓ 2 callersFunctionget_module_from_obj_name
Searches for the underlying module behind the name to some python object. Returns the module and the object name (original name with module part r
tools/dnnlib/util.py:225
↓ 2 callersFunctionis_persistent
r"""Test whether the given object or class is persistent, i.e., whether it will save its source code when pickled.
tools/torch_utils/persistence.py:134
↓ 2 callersFunctionis_valid_metric
(metric)
tools/metrics/metric_main.py:32
↓ 2 callersFunctionload_image_from_buffer
(f, use_pyspng: bool=False)
tools/utils/dataset.py:457
↓ 2 callersMethodnames
r"""Returns the names of all statistics broadcasted so far that match the regular expression specified at construction time.
tools/torch_utils/training_stats.py:141
↓ 2 callersFunctionnan_to_num
(input, nan=0.0, posinf=None, neginf=None, *, out=None)
tools/torch_utils/misc.py:49
↓ 2 callersFunctionnormal_kl
Compute the KL divergence between two gaussians. Shapes are automatically broadcasted, so batches can be compared to scalars, among ot
diffusion/diffusion_utils.py:10
↓ 2 callersFunctionnormalize_2nd_moment
(x, dim=1, eps=1e-8)
tools/utils/layers.py:17
↓ 2 callersMethodp_sample_loop
Generate samples from the model. :param model: the model module. :param shape: the shape of the samples, (N, C, H, W).
diffusion/gaussian_diffusion.py:423
↓ 2 callersFunctionprocess
(text: str)
utils.py:328
↓ 2 callersMethodq_sample
Diffuse the data for a given number of diffusion steps. In other words, sample from q(x_t | x_0). :param x_start: the init
diffusion/gaussian_diffusion.py:215
↓ 2 callersFunctionsetup_distributed
Initialize distributed training environment. support both slurm and torch.distributed.launch see torch.distributed.init_process_group() for mo
utils.py:216
↓ 2 callersMethodwrite
Write text to stdout (and a file) and optionally flush.
tools/dnnlib/util.py:81
↓ 1 callersFunctionLatte_XL_2
(**kwargs)
models/latte.py:464
next →1–100 of 555, ranked by callers