MCPcopy Create free account

hub / github.com/CompVis/zigma / functions

Functions471 in github.com/CompVis/zigma

↓ 198 callersMethodto
(self, device)
utils/train_state_utils.py:61
↓ 37 callersMethodload
(self, path)
utils/train_state_utils.py:39
↓ 15 callersMethodfrom_pretrained
(cls, pretrained_model_name, device=None, dtype=None, **kwargs)
dis_mamba/mamba_ssm/models/mixer_seq_simple.py:229
↓ 13 callersFunctionhas_text
(args)
train_acc.py:65
↓ 12 callersMethodupdate
Update the state with extracted features. Args: imgs: tensor with images feed to the feature extractor real: bool ind
utils/torchmetric_prdc.py:133
↓ 11 callersFunctionis_video
(args)
train_acc.py:74
↓ 10 callersMethodtrain_dataloader
(self)
datasets/wds_dataloader.py:182
↓ 9 callersMethodcompute_sigma_t
Compute the noise coefficient along the path
transport/path.py:27
↓ 8 callersMethod__init__
Simple block wrapping a mixer class with LayerNorm/RMSNorm and residual connection" This Block has a slightly different structure co
model_zigma.py:341
↓ 8 callersFunctionexpand_t_like_x
Function to reshape time t to broadcastable dimension of x Args: t: [batch_dim,], time vector x: [batch_dim,...], data point
transport/path.py:5
↓ 7 callersFunction_is_tensor_video_clip
(clip)
datasets/video_utils.py:38
↓ 7 callersMethodbackward
(ctx, dy, *args)
dis_mamba/mamba_ssm/ops/triton/layernorm.py:425
↓ 7 callersFunctionshow_key_details
(batch, key)
datasets/wds_dataloader.py:260
↓ 6 callersFunctioncausal_conv1d_fn
x: (batch, dim, seqlen) weight: (dim, width) bias: (dim,) activation: either None or "silu" or "swish" out: (batch, dim, seqlen)
dis_causal_conv1d/causal_conv1d/causal_conv1d_interface.py:37
↓ 6 callersMethodupdate
Update the state with extracted features.
utils/torchmetric_fvd.py:372
↓ 5 callersMethodcompute_drift
We always output sde according to score parametrization;
transport/path.py:35
↓ 5 callersFunctioncrop
Args: clip (torch.tensor): Video clip to be cropped. Size is (T, C, H, W)
datasets/video_utils.py:48
↓ 5 callersMethodencode
(self, *args, **kwargs)
datasets/clip.py:9
↓ 5 callersFunctionout2img
(samples)
train_acc.py:44
↓ 5 callersFunctionselective_scan_fn
if return_last_state is True, returns (out, last_state) last_state has shape (batch, dim, dstate). Note that the gradient of the last state is
dis_mamba/mamba_ssm/ops/selective_scan_interface.py:77
↓ 4 callersMethodcheck_interval
( self, train_eps, sample_eps, *, diffusion_form="SBDM", sde=F
transport/transport.py:79
↓ 4 callersMethodcompute_alpha_t
Compute the data coefficient along the path
transport/path.py:23
↓ 4 callersFunctionmamba_inner_fn
( xz, conv1d_weight, conv1d_bias, x_proj_weight, delta_proj_weight, out_proj_weight, out_proj_bias,
dis_mamba/mamba_ssm/ops/selective_scan_interface.py:606
↓ 4 callersFunctionmodulate
(x, shift, scale)
model_zigma.py:53
↓ 4 callersMethodsave
(self, path)
utils/train_state_utils.py:32
↓ 4 callersFunctionsgn
(x)
utils/utils_gilbert.py:21
↓ 4 callersFunctionsgn
(x)
utils/utils_zigzag.py:28
↓ 4 callersMethodupdate_fake
(self, data, real=False)
my_metrics.py:42
↓ 4 callersMethodupdate_real
(self, data, real=True)
my_metrics.py:39
↓ 4 callersFunctionzigzag_path
(N)
utils/utils_zigzag.py:144
↓ 3 callersFunctionarray2grid_pixel
(x)
wandb_utils.py:108
↓ 3 callersFunctioncalculate_fvd
(videos1, videos2, device, method="styleganv")
video_metrics/calculate_fvd.py:17
↓ 3 callersMethodcompute
(self)
my_metrics.py:71
↓ 3 callersMethodcompute
Calculate FID score based on accumulated extracted features from the two distributions.
utils/torchmetric_fvd.py:391
↓ 3 callersMethodcompute_pad
(self, dim, s)
video_metrics/fvd/videogpt/pytorch_i3d.py:9
↓ 3 callersMethodcompute_pad
(self, dim, s)
video_metrics/fvd/videogpt/pytorch_i3d.py:71
↓ 3 callersFunctiondecode
Decoding, either greedy or with top-k or top-p sampling. If top-k = 0, don't limit the number of candidates (pure sampling). Top-k and top-p c
dis_mamba/mamba_ssm/utils/generation.py:93
↓ 3 callersFunctionin_bounds
(x, y, x_s, y_s, ax, ay, bx, by)
utils/utils_gilbert.py:25
↓ 3 callersFunctionin_bounds
(x, y, x_s, y_s, ax, ay, bx, by)
utils/utils_zigzag.py:32
↓ 3 callersFunctioninstantiate_from_config
(config)
utils/train_utils.py:33
↓ 3 callersMethodmake_loader
(self, dataset_config, train=True)
datasets/wds_dataloader.py:88
↓ 3 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
transport/utils.py:12
↓ 3 callersFunctionpoly_kernel
Adapted from `KID Score`_
utils/torchmetric_kid.py:49
↓ 3 callersFunctionresize
(clip, target_size, interpolation_mode)
datasets/video_utils.py:58
↓ 3 callersMethodsample
forward loop of sde
transport/integrators.py:69
↓ 3 callersMethodsample
Sampling x0 & t based on shape of x1 (if needed) Args: x1 - data point; [batch, *dim]
transport/transport.py:114
↓ 3 callersFunctionset_conv_params_fwd
dis_causal_conv1d/csrc/causal_conv1d.cpp:55
↓ 3 callersFunctionssim
(img1, img2)
video_metrics/calculate_ssim.py:6
↓ 3 callersMethodtransform
Converts a PIL Image to an input for the model
utils/torchmetric_fdd.py:74
↓ 2 callersMethod__init__
Initializes Unit3D module.
video_metrics/fvd/videogpt/pytorch_i3d.py:39
↓ 2 callersFunction_layer_norm_bwd
( dy, x, weight, bias, eps, mean, rstd, dresidual=None, has_residual=False
dis_mamba/mamba_ssm/ops/triton/layernorm.py:293
↓ 2 callersFunction_layer_norm_fwd
( x, weight, bias, eps, residual=None, out_dtype=None, residual_dtype=None, is_rms_norm=False )
dis_mamba/mamba_ssm/ops/triton/layernorm.py:123
↓ 2 callersFunction_symmetric_matrix_square_root
(mat, eps=1e-10)
video_metrics/fvd/videogpt/fvd.py:68
↓ 2 callersMethodbackward
(ctx, dout)
dis_causal_conv1d/causal_conv1d/causal_conv1d_interface.py:24
↓ 2 callersFunctionbimamba_inner_fn
( xz, conv1d_weight, conv1d_bias, x_proj_weight, delta_proj_weight, out_proj_weight, out_proj_bias,
dis_mamba/mamba_ssm/ops/selective_scan_interface.py:616
↓ 2 callersFunctioncenter_crop
(clip, crop_size)
datasets/video_utils.py:100
↓ 2 callersFunctioncompute_nearest_neighbour_distances
Args: input_features: numpy.ndarray([N, feature_dim], dtype=np.float32) nearest_k: int Returns: Distances to kth near
utils/torchmetric_prdc.py:61
↓ 2 callersFunctioncompute_pairwise_distance
Args: data_x: numpy.ndarray([N, feature_dim], dtype=np.float32) data_y: numpy.ndarray([N, feature_dim], dtype=np.float32) Ret
utils/torchmetric_prdc.py:32
↓ 2 callersFunctioncompute_stats
(feats: np.ndarray)
video_metrics/fvd/styleganv/fvd.py:75
↓ 2 callersFunctioncov
Estimate a covariance matrix given data. Covariance indicates the level to which two variables vary together. If we examine N-dimensional sam
video_metrics/fvd/videogpt/fvd.py:80
↓ 2 callersFunctioncreate_logger
Create a logger that writes to a log file and stdout.
utils/train_utils.py:59
↓ 2 callersFunctioncreate_transport
function for creating Transport object **Note**: model prediction defaults to velocity Args: - path_type: type of path to use; default to
transport/__init__.py:4
↓ 2 callersFunctiondraw_curve
(ax, num_bits)
utils/utils_zigzag.py:212
↓ 2 callersMethodforward
(self, x)
video_metrics/fvd/videogpt/pytorch_i3d.py:78
↓ 2 callersMethodgenerate
( self, input_ids, max_length, top_k=1, top_p=0.0, temperature
dis_mamba/mamba_ssm/utils/generation.py:207
↓ 2 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)
model_zigma.py:1049
↓ 2 callersFunctionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
model_zigma.py:1018
↓ 2 callersFunctionget_fvd_feats
(videos, i3d, device, bs=10)
video_metrics/fvd/styleganv/fvd.py:31
↓ 2 callersFunctionget_model
(args, device)
utils/train_utils.py:41
↓ 2 callersFunctionget_package_version
()
dis_causal_conv1d/setup.py:155
↓ 2 callersFunctionget_package_version
()
dis_mamba/setup.py:163
↓ 2 callersFunctiongilbert_xy2d_r
(cur_idx, x_dst, y_dst, x, y, ax, ay, bx, by)
utils/utils_gilbert.py:47
↓ 2 callersFunctiongilbert_xy2d_r
(cur_idx, x_dst, y_dst, x, y, ax, ay, bx, by)
utils/utils_zigzag.py:54
↓ 2 callersFunctionis_main_process
()
wandb_utils.py:20
↓ 2 callersFunctionmamba_inner_fn_no_out_proj
( xz, conv1d_weight, conv1d_bias, x_proj_weight, delta_proj_weight, A, B=None, C=None, D=None, delta_b
dis_mamba/mamba_ssm/ops/selective_scan_interface.py:627
↓ 2 callersFunctionmodify_logits_for_top_p_filtering
Set the logits for none top-p values to -inf. Done in-place.
dis_mamba/mamba_ssm/utils/generation.py:47
↓ 2 callersMethodplot
Plot a single or multiple values from the metric. Args: val: Either a single result from calling `metric.forward` or `metric.comp
utils/torchmetric_fdd.py:367
↓ 2 callersFunctionrankzero_logging_info
(rank, log)
utils/train_utils_args.py:3
↓ 2 callersFunctionrequires_grad
Set requires_grad flag for all parameters in a model.
utils/train_utils.py:116
↓ 2 callersFunctionreverse_permut_np
(permutation)
utils/utils_zigzag.py:136
↓ 2 callersMethodsample_ode
returns a sampling function with given ODE settings Args: - sampling_method: type of sampler used in solving the ODE; default to be Do
transport/transport.py:372
↓ 2 callersFunctionselective_state_update
Argument: state: (batch, dim, dstate) x: (batch, dim) dt: (batch, dim) A: (dim, dstate) B: (batch, dstate
dis_mamba/mamba_ssm/ops/triton/selective_state_update.py:99
↓ 2 callersFunctionset_ssm_params_fwd
dis_mamba/csrc/selective_scan/selective_scan.cpp:59
↓ 2 callersMethodstep
(self, hidden_states, conv_state, ssm_state)
dis_mamba/mamba_ssm/modules/mamba_simple.py:492
↓ 2 callersFunctiontrans
(x)
video_metrics/calculate_psnr.py:17
↓ 2 callersFunctiontrans
(x)
video_metrics/calculate_lpips.py:15
↓ 2 callersFunctiontrans
(x)
video_metrics/calculate_fvd.py:6
↓ 2 callersFunctiontrans
(x)
video_metrics/calculate_ssim.py:44
↓ 2 callersMethodupdate
Update the state with extracted features.
utils/torchmetric_sfid.py:369
↓ 2 callersMethodupdate
Update the state with extracted features.
utils/torchmetric_fdd.py:296
↓ 2 callersFunctionupdate_ema
Step the EMA model towards the current model.
utils/train_utils.py:104
↓ 2 callersMethodupdate_fake_and_real
(self, data, real)
my_metrics.py:47
↓ 1 callersMethod__forward_fn
TODO: generalize here by adding all private functions ending with steps to it
transport/integrators.py:55
↓ 1 callersMethod__get_last_step
Get the last step function of the SDE solver
transport/transport.py:273
↓ 1 callersMethod__get_sde_diffusion_and_drift
( self, *, diffusion_form="SBDM", diffusion_norm=1.0, )
transport/transport.py:252
↓ 1 callersMethod__init__
( self, name: str, features_list: List[str], feature_extractor_weights_path: O
utils/torchmetric_sfid.py:66
↓ 1 callersMethod__init__
(self, *args, **kwargs)
utils/torchmetric_fdd.py:64
↓ 1 callersMethod__init__
( self, detector_url="https://www.dropbox.com/s/ge9e5ujwgetktms/i3d_torchscript.pt?dl=1",
utils/torchmetric_fvd.py:170
↓ 1 callersMethod__init__
(self, sigma=0.0)
transport/path.py:20
↓ 1 callersMethod__init__
( self, d_model, d_state=16, d_conv=4, expand=2, dt_rank="auto
dis_mamba/mamba_ssm/modules/mamba_simple.py:65
next →1–100 of 471, ranked by callers