Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tdrussell/diffusion-pipe
/ functions
Functions
1,157 in github.com/tdrussell/diffusion-pipe
⨍
Functions
1,157
◇
Types & classes
222
↓ 343 callers
Method
to
(self, *args, **kwargs)
optimizers/optimizer_utils.py:237
↓ 223 callers
Method
get
(self, key)
utils/reduction.py:80
↓ 61 callers
Function
make_contiguous
(*tensors)
models/base.py:33
↓ 44 callers
Method
prepare_block_devices_before_forward
(self)
utils/offloading.py:257
↓ 44 callers
Method
set_forward_only
(self, forward_only: bool)
utils/offloading.py:223
↓ 38 callers
Method
from_pretrained
( cls, weights_file, config, torch_dtype=torch.bfloat16, transformer_d
models/wan/wan.py:30
↓ 37 callers
Function
is_main_process
()
utils/common.py:33
↓ 30 callers
Method
sample
(self, imgs, deterministic=False)
models/wan/vae2_2.py:846
↓ 22 callers
Method
disable_block_swap
(self)
utils/offloading.py:215
↓ 22 callers
Method
submit_move_blocks_forward
(self, block_idx: int)
utils/offloading.py:285
↓ 22 callers
Method
wait_for_block
(self, block_idx: int)
utils/offloading.py:277
↓ 20 callers
Method
encode
(self, x, scale)
models/wan/vae2_2.py:783
↓ 14 callers
Method
load_state_dict
(self, state_dict)
train.py:75
↓ 13 callers
Function
load_state_dict
(path)
utils/common.py:76
↓ 12 callers
Method
__init__
( self, x_dim: int, context_dim: int, num_heads: int, mlp_ratio: float
models/cosmos_predict2_modeling.py:958
↓ 11 callers
Method
__init__
( self, in_channels: int, out_channels: int, factor_t, factor_s=1,
models/wan/vae2_2.py:372
↓ 11 callers
Function
get_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
utils/common.py:118
↓ 11 callers
Function
time_shift
(mu: float, sigma: float, t: torch.Tensor)
utils/common.py:114
↓ 10 callers
Method
add
(self, item)
utils/cache.py:109
↓ 10 callers
Function
iterate_safetensors
(path)
utils/common.py:88
↓ 10 callers
Method
register
(self, dataset)
utils/dataset.py:1150
↓ 9 callers
Method
__init__
(self, unet, pipeline)
models/sdxl.py:979
↓ 9 callers
Function
reduce_tensor
(tensor)
utils/reduction.py:226
↓ 8 callers
Method
__init__
(self, vocab_size, dim, dim_attn, dim_ffn,
models/wan/t5.py:368
↓ 8 callers
Function
bucket_suffix
(key)
utils/dataset.py:59
↓ 8 callers
Method
to
(self, device)
optimizers/projectors/svd_projector.py:161
↓ 7 callers
Method
__init__
(self, dim=128, z_dim=4, dim_mult=[1, 2, 4, 4],
models/wan/vae2_1.py:481
↓ 7 callers
Method
__init__
(self, dim, out_dim, patch_size, eps=1e-6)
models/wan/model.py:317
↓ 7 callers
Function
flash_attention
q: [B, Lq, Nq, C1]. k: [B, Lk, Nk, C1]. v: [B, Lk, Nk, C2]. Nq must be divisible by Nk. q_lens
models/wan/attention.py:19
↓ 7 callers
Function
get_orthogonal_matrix
(weights, rank, proj_type, approx_svd=False, asvd_ss_scale=2)
optimizers/projectors/svd_projector.py:9
↓ 6 callers
Method
__init__
(self, dim, mid_dim)
models/wan/clip.py:90
↓ 6 callers
Function
half
(x)
models/wan/attention.py:54
↓ 6 callers
Method
reset_parameters
(self)
models/cosmos_predict2_modeling.py:1011
↓ 5 callers
Method
__init__
(self, model)
models/flux2.py:401
↓ 5 callers
Function
fp16_clamp
(x)
models/wan/t5.py:14
↓ 5 callers
Method
unpatchify
r""" Reconstruct video tensors from patch embeddings. Args: x (List[Tensor]): List of patchified features
models/wan/model.py:494
↓ 4 callers
Method
__init__
(self, llama_model)
models/hidream.py:327
↓ 4 callers
Method
__init__
(self, z_dim=16, vae_pth=None, dtype=torch.float,
models/cosmos_predict2.py:75
↓ 4 callers
Method
__init__
Construct a layernorm module in the T5 style. No bias and no subtraction of mean.
models/llm_adapter.py:19
↓ 4 callers
Method
__init__
(self, model)
models/ideogram4.py:261
↓ 4 callers
Method
__init__
(self, config)
models/flux.py:163
↓ 4 callers
Method
_pull_batches_from_dataloader
(self)
utils/dataset.py:1357
↓ 4 callers
Function
_tokenize
(tokenizer, prompts)
models/cosmos_predict2.py:156
↓ 4 callers
Function
apply_rotary_emb_qwen
Apply rotary embeddings to input tensors using the given frequency tensor. This function applies rotary embeddings to the given query or key
models/qwen_image.py:26
↓ 4 callers
Method
cache_latents
(self, map_fn, regenerate_cache=False, trust_cache=False, caching_batch_size=1)
utils/dataset.py:1038
↓ 4 callers
Method
clear_cache
(self)
models/wan/vae2_2.py:853
↓ 4 callers
Method
clear_cache
(self)
models/wan/vae2_1.py:578
↓ 4 callers
Method
decode
(self, z)
tools/cosmos_vae_test.py:59
↓ 4 callers
Method
decode
(self, z, scale)
models/wan/vae2_2.py:812
↓ 4 callers
Method
dequantize
(self)
optimizers/optimizer_utils.py:234
↓ 4 callers
Function
empty_cuda_cache
()
utils/common.py:54
↓ 4 callers
Function
hadamard_transform
(x: torch.Tensor)
optimizers/projectors/approx_svd.py:17
↓ 4 callers
Method
init_weights
(self)
models/cosmos_predict2_modeling.py:1029
↓ 4 callers
Method
post_init
(self, data_parallel_rank, data_parallel_world_size, per_device_batch_size: dict, gradient_accumulation_steps,
utils/dataset.py:951
↓ 4 callers
Function
round_to_nearest_multiple
(x, multiple)
utils/common.py:106
↓ 4 callers
Method
save_model
(self, name)
utils/saver.py:110
↓ 4 callers
Function
shuffle_with_seed
(l, seed=None)
utils/dataset.py:40
↓ 4 callers
Function
vae_encode
(vae, image)
models/flux.py:82
↓ 3 callers
Method
__init__
(self, model)
models/chroma.py:493
↓ 3 callers
Method
__init__
(self, model)
models/ernie_image.py:210
↓ 3 callers
Method
__init__
(self, model)
models/hunyuan_video_15.py:307
↓ 3 callers
Method
__init__
(self, model)
models/z_image.py:241
↓ 3 callers
Method
__init__
(self, model)
models/auraflow.py:265
↓ 3 callers
Method
__init__
(self, pipeline)
models/cosmos.py:403
↓ 3 callers
Method
__init__
(self, block, block_idx, offloader)
models/hunyuan_video.py:621
↓ 3 callers
Method
__init__
(self, block, block_idx, offloader)
models/hunyuan_image.py:457
↓ 3 callers
Method
__init__
(self, model)
models/krea2.py:266
↓ 3 callers
Method
__init__
(self, vae, clip)
models/wan/wan.py:61
↓ 3 callers
Method
_add_adapter
(self, adapter_config, top_level_module, target_modules, state_dict_key_prefix='')
models/sdxl.py:441
↓ 3 callers
Method
_create_dataloader
(self, skip_first_n_batches=None)
utils/dataset.py:1342
↓ 3 callers
Method
_extract_masked_hidden
(self, hidden_states: torch.Tensor, mask: torch.Tensor)
models/hunyuan_image.py:173
↓ 3 callers
Function
_map_and_cache
(dataset, map_fn, cache_dir, cache_file_prefix='', new_fingerprint_args=None, regenerate_cache=False, caching_
utils/dataset.py:84
↓ 3 callers
Function
basic_clean
(text)
models/wan/tokenizers.py:10
↓ 3 callers
Method
cache
(self, unload_models=True)
utils/dataset.py:1157
↓ 3 callers
Method
cache_text_embeddings
(self, map_fn, i, regenerate_cache=False, caching_batch_size=1)
utils/dataset.py:1042
↓ 3 callers
Method
encode
(self, x)
tools/cosmos_vae_test.py:49
↓ 3 callers
Method
encode
(self, x, scale)
models/wan/vae2_1.py:512
↓ 3 callers
Function
fd_id
(fd)
utils/reduction.py:528
↓ 3 callers
Method
finalize_current_shard
(self)
utils/cache.py:99
↓ 3 callers
Method
get_conds
(self, inputs)
models/krea2.py:92
↓ 3 callers
Method
get_param_groups
(self, parameters)
models/base.py:360
↓ 3 callers
Function
get_subsample_idx_and_random_signs
(n, subsample_size, device, dtype, manual_seed, states)
optimizers/projectors/approx_svd.py:117
↓ 3 callers
Method
init
(self)
utils/cache.py:39
↓ 3 callers
Method
initialize_state
(self, p)
optimizers/automagic.py:329
↓ 3 callers
Method
load_diffusion_model
(self)
models/sd3.py:43
↓ 3 callers
Method
load_model_if_needed
(self)
models/base.py:462
↓ 3 callers
Function
load_safetensors
(path)
utils/common.py:68
↓ 3 callers
Function
rope_params
(max_seq_len, dim, theta=10000)
models/wan/model.py:29
↓ 3 callers
Method
save_checkpoint
(self, step, examples)
utils/saver.py:118
↓ 3 callers
Function
srht
Compute the Subsampled Randomized Hadamard Transform (SRHT) of a given input matrix. Args: - input_matrix (torch.Tensor): Input matrix o
optimizers/projectors/approx_svd.py:86
↓ 3 callers
Method
step
(self, closure=None)
train.py:66
↓ 3 callers
Function
storage_from_cache
(cls, key)
utils/reduction.py:536
↓ 3 callers
Function
synchronize_device
(device: torch.device)
utils/offloading.py:34
↓ 3 callers
Function
transposed_srht
Compute the Transposed SRHT of a given input matrix of size (k, d) where k is the subsampled size. Args: - input_matrix (torch.Tensor):
optimizers/projectors/approx_svd.py:50
↓ 3 callers
Method
visual
(self, videos)
models/wan/clip.py:521
↓ 2 callers
Method
__init__
(self, model)
models/lumina_2.py:323
↓ 2 callers
Method
__init__
(self, transformer)
models/ltx_video.py:298
↓ 2 callers
Method
__init__
(self, model)
models/sd3.py:219
↓ 2 callers
Method
__init__
(self, model)
models/ltx2.py:598
↓ 2 callers
Method
__init__
(self, model)
models/omnigen2.py:302
next →
1–100 of 1,157, ranked by callers