Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SwayStar123/SpeedrunDiT
/ functions
Functions
254 in github.com/SwayStar123/SpeedrunDiT
⨍
Functions
254
◇
Types & classes
35
↳
Endpoints
2
↓ 24 callers
Method
mean
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 callers
Function
get_score_from_velocity
Wrapper function: transfrom velocity prediction model to score Args: velocity: [batch_dim, ...] shaped tensor; velocity model output
samplers.py:15
↓ 14 callers
Method
load
(cls, path: str, arr_name: str)
evaluations/evaluator.py:525
↓ 9 callers
Method
write
Write text to stdout (and a file) and optionally flush.
preprocessing/dnnlib/util.py:75
↓ 6 callers
Function
Normalize
(in_channels, num_groups=32)
models/invae.py:17
↓ 6 callers
Method
__init__
( self, *, ch=128, out_ch=3, ch_mult=(1, 1, 2, 2, 4), num_res_
models/invae.py:166
↓ 5 callers
Method
__init__
( self, path_type='edm', input_size=32, patch_size=2, in_channels=4,
models/sit.py:269
↓ 5 callers
Function
compute_diffusion
(t_cur)
samplers.py:42
↓ 5 callers
Method
decode
(self, z)
models/invae.py:470
↓ 5 callers
Function
load_invae
(vae_name="REPA-E/e2e-invae", device=torch.device('cpu'))
preprocessing/encoders.py:87
↓ 5 callers
Function
nonlinearity
(x)
models/invae.py:12
↓ 5 callers
Method
save
(self, pt_path, verbose=True)
preprocessing/torch_utils/distributed.py:88
↓ 5 callers
Method
update
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 callers
Method
encode
(self, x)
preprocessing/encoders.py:79
↓ 4 callers
Method
init
(self, device)
preprocessing/encoders.py:43
↓ 4 callers
Method
load
(self, pt_path, verbose=True)
preprocessing/torch_utils/distributed.py:110
↓ 4 callers
Function
print0
(*args, **kwargs)
preprocessing/torch_utils/distributed.py:78
↓ 3 callers
Method
_file_ext
(self, fname)
dataset.py:56
↓ 3 callers
Method
_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 callers
Function
file_ext
(name: Union[str, Path])
preprocessing/dataset_tools.py:54
↓ 3 callers
Function
get_obj_from_module
Traverses the object name and returns the last (rightmost) python object.
preprocessing/dnnlib/util.py:264
↓ 3 callers
Function
get_rank
()
preprocessing/torch_utils/distributed.py:48
↓ 3 callers
Function
mean_flat
Take the mean over all non-batch dimensions.
loss.py:5
↓ 3 callers
Function
modulate
(x, shift, scale)
models/sit.py:29
↓ 3 callers
Function
named_params_and_buffers
(module)
preprocessing/torch_utils/misc.py:154
↓ 2 callers
Method
__getstate__
(self)
preprocessing/encoders.py:46
↓ 2 callers
Function
_batch_pairwise_distances
Compute pairwise distances between two batches of feature vectors.
evaluations/evaluator.py:440
↓ 2 callers
Function
_download_inception_model
()
evaluations/evaluator.py:599
↓ 2 callers
Function
apply_time_shift
(t, shift_dim, shift_base=4096)
samplers.py:46
↓ 2 callers
Method
close
Flush, close possible files, and remove stdout/stderr mirroring.
preprocessing/dnnlib/util.py:97
↓ 2 callers
Method
compute_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 callers
Function
euler_maruyama_sampler
( model, latents, y, num_steps=20, heun=False, # not used, just for c
samplers.py:52
↓ 2 callers
Method
evaluate_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 callers
Method
flush
Flush written text to both stdout and a file, if open.
preprocessing/dnnlib/util.py:90
↓ 2 callers
Method
frechet_distance
Compute the Frechet distance between two sets of statistics.
evaluations/evaluator.py:98
↓ 2 callers
Function
get_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 callers
Function
get_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 callers
Function
is_image_ext
(fname: Union[str, Path])
preprocessing/dataset_tools.py:59
↓ 2 callers
Function
is_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 callers
Function
iterate_images
()
preprocessing/dataset_tools.py:96
↓ 2 callers
Function
load_encoders
(enc_type, device, resolution=256)
utils.py:24
↓ 2 callers
Method
manifold_radii
(self, features: np.ndarray)
evaluations/evaluator.py:274
↓ 2 callers
Function
maybe_min
(a: int, b: Optional[int])
preprocessing/dataset_tools.py:47
↓ 2 callers
Method
names
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 callers
Function
norm_cdf
(x)
utils.py:74
↓ 2 callers
Function
open_dataset
(source, *, max_images: Optional[int])
preprocessing/dataset_tools.py:135
↓ 2 callers
Function
open_dest
(dest: str)
preprocessing/dataset_tools.py:148
↓ 2 callers
Method
pairwise_distances
Evaluate pairwise distances between two batches of feature vectors.
evaluations/evaluator.py:419
↓ 2 callers
Method
read_activations
(self, npz_path: str)
evaluations/evaluator.py:164
↓ 2 callers
Method
read_statistics
( self, npz_path: str, activations: Tuple[np.ndarray, np.ndarray] )
evaluations/evaluator.py:190
↓ 2 callers
Method
sample
(self)
models/invae.py:416
↓ 2 callers
Function
sample_posterior
(latents, latents_scale=1., latents_bias=0.)
train.py:55
↓ 2 callers
Function
suppress_tracer_warnings
()
preprocessing/torch_utils/misc.py:82
↓ 2 callers
Function
update_ema
Step the EMA model towards the current model.
train.py:61
↓ 1 callers
Function
VAE_F16D32
(**kwargs)
models/invae.py:492
↓ 1 callers
Method
__init__
(self)
preprocessing/encoders.py:40
↓ 1 callers
Method
__reduce__
(self)
preprocessing/torch_utils/persistence.py:128
↓ 1 callers
Function
_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 callers
Function
_create_feature_graph
(input_batch)
evaluations/evaluator.py:612
↓ 1 callers
Function
_create_softmax_graph
(input_batch)
evaluations/evaluator.py:629
↓ 1 callers
Method
_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 callers
Method
_gather_cos_sin
(self, rope_ids, N, device, dtype)
models/pos_embed.py:88
↓ 1 callers
Function
_module_to_src
r"""Query the source code of a given Python module.
preprocessing/torch_utils/persistence.py:215
↓ 1 callers
Function
_no_grad_trunc_normal_
(tensor, mean, std, a, b)
utils.py:71
↓ 1 callers
Function
_numpy_partition
(arr, kth, **kwargs)
evaluations/evaluator.py:662
↓ 1 callers
Function
_open_npy_file
(path: str, arr_name: str)
evaluations/evaluator.py:590
↓ 1 callers
Method
_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 callers
Function
_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 callers
Function
_recurse_dirs
(root: str)
preprocessing/dataset_tools.py:67
↓ 1 callers
Method
_run_vae_encoder
(self, x)
preprocessing/encoders.py:75
↓ 1 callers
Method
_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 callers
Function
_src_to_module
r"""Get or create a Python module for the given source code.
preprocessing/torch_utils/persistence.py:225
↓ 1 callers
Function
_sync
r"""Synchronize the global cumulative counters across devices and processes. Called internally by `Collector.update()`.
preprocessing/torch_utils/training_stats.py:236
↓ 1 callers
Function
_update_shapes
(pool3)
evaluations/evaluator.py:643
↓ 1 callers
Function
array2grid
(x)
train.py:47
↓ 1 callers
Function
broadcat
(tensors, dim = -1)
models/pos_embed.py:19
↓ 1 callers
Function
build_mlp
(hidden_size, projector_dim, z_dim)
models/sit.py:20
↓ 1 callers
Function
call_func_by_name
Finds the python object with the given name and calls it as a function.
preprocessing/dnnlib/util.py:280
↓ 1 callers
Function
center_crop_image
Center crop and resize image.
preprocessing/dataset_tools.py:192
↓ 1 callers
Function
center_crop_imagenet_image
Center cropping implementation from ADM. https://github.com/openai/guided-diffusion/blob/8fb3ad9197f16bbc40620447b2742e13458d2831/guided_diff
preprocessing/dataset_tools.py:215
↓ 1 callers
Function
center_crop_wide_image
Center crop wide image.
preprocessing/dataset_tools.py:200
↓ 1 callers
Function
cmdline
Dataset processing tool for dataset image data conversion and VAE encode/decode preprocessing.
preprocessing/dataset_tools.py:280
↓ 1 callers
Method
compute_inception_score
(self, activations: np.ndarray, split_size: int = 5000)
evaluations/evaluator.py:205
↓ 1 callers
Method
compute_prec_recall
( self, activations_ref: np.ndarray, activations_sample: np.ndarray )
evaluations/evaluator.py:220
↓ 1 callers
Method
compute_statistics
(self, activations: np.ndarray)
evaluations/evaluator.py:200
↓ 1 callers
Function
constant
(value, shape=None, dtype=None, device=None, memory_format=None)
preprocessing/torch_utils/misc.py:30
↓ 1 callers
Function
create_logger
Create a logger that writes to a log file and stdout.
train.py:74
↓ 1 callers
Function
create_npz_from_sample_folder
Builds a single .npz file from a folder of .png samples.
generate.py:28
↓ 1 callers
Function
download_model
Downloads a pre-trained checkpoint from Hugging Face Hub and returns the local file path.
utils.py:7
↓ 1 callers
Method
encode
(self, x)
models/invae.py:462
↓ 1 callers
Function
euler_maruyama_sampler_path_drop
( model, latents, y, num_steps=20, heun=False, # not used, just for c
samplers.py:181
↓ 1 callers
Function
expand_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 callers
Method
gen_fn
()
evaluations/evaluator.py:469
↓ 1 callers
Function
get_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 callers
Function
get_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
models/sit.py:629
↓ 1 callers
Function
get_obj_by_name
Finds the python object with the given name.
preprocessing/dnnlib/util.py:274
↓ 1 callers
Function
get_world_size
()
preprocessing/torch_utils/distributed.py:53
↓ 1 callers
Method
init
(self, device)
preprocessing/encoders.py:65
↓ 1 callers
Method
initialize_weights
(self)
models/sit.py:366
↓ 1 callers
Method
interpolant
(self, t)
loss.py:38
next →
1–100 of 254, ranked by callers