MCPcopy Create free account

hub / github.com/SwayStar123/SpeedrunDiT / functions

Functions254 in github.com/SwayStar123/SpeedrunDiT

↓ 24 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
preprocessing/torch_utils/training_stats.py:190
↓ 16 callersFunctionget_score_from_velocity
Wrapper function: transfrom velocity prediction model to score Args: velocity: [batch_dim, ...] shaped tensor; velocity model output
samplers.py:15
↓ 14 callersMethodload
(cls, path: str, arr_name: str)
evaluations/evaluator.py:525
↓ 9 callersMethodwrite
Write text to stdout (and a file) and optionally flush.
preprocessing/dnnlib/util.py:75
↓ 6 callersFunctionNormalize
(in_channels, num_groups=32)
models/invae.py:17
↓ 6 callersMethod__init__
( self, *, ch=128, out_ch=3, ch_mult=(1, 1, 2, 2, 4), num_res_
models/invae.py:166
↓ 5 callersMethod__init__
( self, path_type='edm', input_size=32, patch_size=2, in_channels=4,
models/sit.py:269
↓ 5 callersFunctioncompute_diffusion
(t_cur)
samplers.py:42
↓ 5 callersMethoddecode
(self, z)
models/invae.py:470
↓ 5 callersFunctionload_invae
(vae_name="REPA-E/e2e-invae", device=torch.device('cpu'))
preprocessing/encoders.py:87
↓ 5 callersFunctionnonlinearity
(x)
models/invae.py:12
↓ 5 callersMethodsave
(self, pt_path, verbose=True)
preprocessing/torch_utils/distributed.py:88
↓ 5 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
preprocessing/torch_utils/training_stats.py:149
↓ 4 callersMethodencode
(self, x)
preprocessing/encoders.py:79
↓ 4 callersMethodinit
(self, device)
preprocessing/encoders.py:43
↓ 4 callersMethodload
(self, pt_path, verbose=True)
preprocessing/torch_utils/distributed.py:110
↓ 4 callersFunctionprint0
(*args, **kwargs)
preprocessing/torch_utils/distributed.py:78
↓ 3 callersMethod_file_ext
(self, fname)
dataset.py:56
↓ 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
preprocessing/torch_utils/training_stats.py:172
↓ 3 callersFunctionfile_ext
(name: Union[str, Path])
preprocessing/dataset_tools.py:54
↓ 3 callersFunctionget_obj_from_module
Traverses the object name and returns the last (rightmost) python object.
preprocessing/dnnlib/util.py:264
↓ 3 callersFunctionget_rank
()
preprocessing/torch_utils/distributed.py:48
↓ 3 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
loss.py:5
↓ 3 callersFunctionmodulate
(x, shift, scale)
models/sit.py:29
↓ 3 callersFunctionnamed_params_and_buffers
(module)
preprocessing/torch_utils/misc.py:154
↓ 2 callersMethod__getstate__
(self)
preprocessing/encoders.py:46
↓ 2 callersFunction_batch_pairwise_distances
Compute pairwise distances between two batches of feature vectors.
evaluations/evaluator.py:440
↓ 2 callersFunction_download_inception_model
()
evaluations/evaluator.py:599
↓ 2 callersFunctionapply_time_shift
(t, shift_dim, shift_base=4096)
samplers.py:46
↓ 2 callersMethodclose
Flush, close possible files, and remove stdout/stderr mirroring.
preprocessing/dnnlib/util.py:97
↓ 2 callersMethodcompute_activations
Compute image features for downstream evals. :param batches: a iterator over NHWC numpy arrays in [0, 255]. :return: a tuple
evaluations/evaluator.py:168
↓ 2 callersFunctioneuler_maruyama_sampler
( model, latents, y, num_steps=20, heun=False, # not used, just for c
samplers.py:52
↓ 2 callersMethodevaluate_pr
Evaluate precision and recall efficiently. :param features_1: [N1 x D] feature vectors for reference batch. :param radii_1:
evaluations/evaluator.py:351
↓ 2 callersMethodflush
Flush written text to both stdout and a file, if open.
preprocessing/dnnlib/util.py:90
↓ 2 callersMethodfrechet_distance
Compute the Frechet distance between two sets of statistics.
evaluations/evaluator.py:98
↓ 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)
models/sit.py:640
↓ 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
preprocessing/dnnlib/util.py:223
↓ 2 callersFunctionis_image_ext
(fname: Union[str, Path])
preprocessing/dataset_tools.py:59
↓ 2 callersFunctionis_persistent
r"""Test whether the given object or class is persistent, i.e., whether it will save its source code when pickled.
preprocessing/torch_utils/persistence.py:143
↓ 2 callersFunctioniterate_images
()
preprocessing/dataset_tools.py:96
↓ 2 callersFunctionload_encoders
(enc_type, device, resolution=256)
utils.py:24
↓ 2 callersMethodmanifold_radii
(self, features: np.ndarray)
evaluations/evaluator.py:274
↓ 2 callersFunctionmaybe_min
(a: int, b: Optional[int])
preprocessing/dataset_tools.py:47
↓ 2 callersMethodnames
r"""Returns the names of all statistics broadcasted so far that match the regular expression specified at construction time.
preprocessing/torch_utils/training_stats.py:143
↓ 2 callersFunctionnorm_cdf
(x)
utils.py:74
↓ 2 callersFunctionopen_dataset
(source, *, max_images: Optional[int])
preprocessing/dataset_tools.py:135
↓ 2 callersFunctionopen_dest
(dest: str)
preprocessing/dataset_tools.py:148
↓ 2 callersMethodpairwise_distances
Evaluate pairwise distances between two batches of feature vectors.
evaluations/evaluator.py:419
↓ 2 callersMethodread_activations
(self, npz_path: str)
evaluations/evaluator.py:164
↓ 2 callersMethodread_statistics
( self, npz_path: str, activations: Tuple[np.ndarray, np.ndarray] )
evaluations/evaluator.py:190
↓ 2 callersMethodsample
(self)
models/invae.py:416
↓ 2 callersFunctionsample_posterior
(latents, latents_scale=1., latents_bias=0.)
train.py:55
↓ 2 callersFunctionsuppress_tracer_warnings
()
preprocessing/torch_utils/misc.py:82
↓ 2 callersFunctionupdate_ema
Step the EMA model towards the current model.
train.py:61
↓ 1 callersFunctionVAE_F16D32
(**kwargs)
models/invae.py:492
↓ 1 callersMethod__init__
(self)
preprocessing/encoders.py:40
↓ 1 callersMethod__reduce__
(self)
preprocessing/torch_utils/persistence.py:128
↓ 1 callersFunction_check_pickleable
r"""Check that the given object is pickleable, raising an exception if it is not. This function is expected to be considerably more efficient
preprocessing/torch_utils/persistence.py:240
↓ 1 callersFunction_create_feature_graph
(input_batch)
evaluations/evaluator.py:612
↓ 1 callersFunction_create_softmax_graph
(input_batch)
evaluations/evaluator.py:629
↓ 1 callersMethod_drop_tokens
Randomly drop a fraction of tokens (except we ensure at least one token kept). x: (B, T, C) drop_ratio: fraction of tokens t
models/sit.py:422
↓ 1 callersMethod_gather_cos_sin
(self, rope_ids, N, device, dtype)
models/pos_embed.py:88
↓ 1 callersFunction_module_to_src
r"""Query the source code of a given Python module.
preprocessing/torch_utils/persistence.py:215
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
utils.py:71
↓ 1 callersFunction_numpy_partition
(arr, kth, **kwargs)
evaluations/evaluator.py:662
↓ 1 callersFunction_open_npy_file
(path: str, arr_name: str)
evaluations/evaluator.py:590
↓ 1 callersMethod_pad_with_mask
x_sparse: (B, T_keep, C) ids_keep: (B, T_keep) T_full: full sequence length T Returns: x_pad: (B, T_full,
models/sit.py:450
↓ 1 callersFunction_read_bytes
Copied from: https://github.com/numpy/numpy/blob/fb215c76967739268de71aa4bda55dd1b062bc2e/numpy/lib/format.py#L788-L886 Read from file-like
evaluations/evaluator.py:560
↓ 1 callersFunction_recurse_dirs
(root: str)
preprocessing/dataset_tools.py:67
↓ 1 callersMethod_run_vae_encoder
(self, x)
preprocessing/encoders.py:75
↓ 1 callersMethod_sprint_fuse
f_dense: (B, T, C) encoder output ft g_full: (B, T, C) padded sparse output g_pad Returns fused h: (B, T, C)
models/sit.py:467
↓ 1 callersFunction_src_to_module
r"""Get or create a Python module for the given source code.
preprocessing/torch_utils/persistence.py:225
↓ 1 callersFunction_sync
r"""Synchronize the global cumulative counters across devices and processes. Called internally by `Collector.update()`.
preprocessing/torch_utils/training_stats.py:236
↓ 1 callersFunction_update_shapes
(pool3)
evaluations/evaluator.py:643
↓ 1 callersFunctionarray2grid
(x)
train.py:47
↓ 1 callersFunctionbroadcat
(tensors, dim = -1)
models/pos_embed.py:19
↓ 1 callersFunctionbuild_mlp
(hidden_size, projector_dim, z_dim)
models/sit.py:20
↓ 1 callersFunctioncall_func_by_name
Finds the python object with the given name and calls it as a function.
preprocessing/dnnlib/util.py:280
↓ 1 callersFunctioncenter_crop_image
Center crop and resize image.
preprocessing/dataset_tools.py:192
↓ 1 callersFunctioncenter_crop_imagenet_image
Center cropping implementation from ADM. https://github.com/openai/guided-diffusion/blob/8fb3ad9197f16bbc40620447b2742e13458d2831/guided_diff
preprocessing/dataset_tools.py:215
↓ 1 callersFunctioncenter_crop_wide_image
Center crop wide image.
preprocessing/dataset_tools.py:200
↓ 1 callersFunctioncmdline
Dataset processing tool for dataset image data conversion and VAE encode/decode preprocessing.
preprocessing/dataset_tools.py:280
↓ 1 callersMethodcompute_inception_score
(self, activations: np.ndarray, split_size: int = 5000)
evaluations/evaluator.py:205
↓ 1 callersMethodcompute_prec_recall
( self, activations_ref: np.ndarray, activations_sample: np.ndarray )
evaluations/evaluator.py:220
↓ 1 callersMethodcompute_statistics
(self, activations: np.ndarray)
evaluations/evaluator.py:200
↓ 1 callersFunctionconstant
(value, shape=None, dtype=None, device=None, memory_format=None)
preprocessing/torch_utils/misc.py:30
↓ 1 callersFunctioncreate_logger
Create a logger that writes to a log file and stdout.
train.py:74
↓ 1 callersFunctioncreate_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
generate.py:28
↓ 1 callersFunctiondownload_model
Downloads a pre-trained checkpoint from Hugging Face Hub and returns the local file path.
utils.py:7
↓ 1 callersMethodencode
(self, x)
models/invae.py:462
↓ 1 callersFunctioneuler_maruyama_sampler_path_drop
( model, latents, y, num_steps=20, heun=False, # not used, just for c
samplers.py:181
↓ 1 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
samplers.py:5
↓ 1 callersMethodgen_fn
()
evaluations/evaluator.py:469
↓ 1 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/
models/sit.py:611
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
models/sit.py:629
↓ 1 callersFunctionget_obj_by_name
Finds the python object with the given name.
preprocessing/dnnlib/util.py:274
↓ 1 callersFunctionget_world_size
()
preprocessing/torch_utils/distributed.py:53
↓ 1 callersMethodinit
(self, device)
preprocessing/encoders.py:65
↓ 1 callersMethodinitialize_weights
(self)
models/sit.py:366
↓ 1 callersMethodinterpolant
(self, t)
loss.py:38
next →1–100 of 254, ranked by callers