MCPcopy Create free account

hub / github.com/tdrussell/diffusion-pipe / functions

Functions1,157 in github.com/tdrussell/diffusion-pipe

↓ 343 callersMethodto
(self, *args, **kwargs)
optimizers/optimizer_utils.py:237
↓ 223 callersMethodget
(self, key)
utils/reduction.py:80
↓ 61 callersFunctionmake_contiguous
(*tensors)
models/base.py:33
↓ 44 callersMethodprepare_block_devices_before_forward
(self)
utils/offloading.py:257
↓ 44 callersMethodset_forward_only
(self, forward_only: bool)
utils/offloading.py:223
↓ 38 callersMethodfrom_pretrained
( cls, weights_file, config, torch_dtype=torch.bfloat16, transformer_d
models/wan/wan.py:30
↓ 37 callersFunctionis_main_process
()
utils/common.py:33
↓ 30 callersMethodsample
(self, imgs, deterministic=False)
models/wan/vae2_2.py:846
↓ 22 callersMethoddisable_block_swap
(self)
utils/offloading.py:215
↓ 22 callersMethodsubmit_move_blocks_forward
(self, block_idx: int)
utils/offloading.py:285
↓ 22 callersMethodwait_for_block
(self, block_idx: int)
utils/offloading.py:277
↓ 20 callersMethodencode
(self, x, scale)
models/wan/vae2_2.py:783
↓ 14 callersMethodload_state_dict
(self, state_dict)
train.py:75
↓ 13 callersFunctionload_state_dict
(path)
utils/common.py:76
↓ 12 callersMethod__init__
( self, x_dim: int, context_dim: int, num_heads: int, mlp_ratio: float
models/cosmos_predict2_modeling.py:958
↓ 11 callersMethod__init__
( self, in_channels: int, out_channels: int, factor_t, factor_s=1,
models/wan/vae2_2.py:372
↓ 11 callersFunctionget_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
utils/common.py:118
↓ 11 callersFunctiontime_shift
(mu: float, sigma: float, t: torch.Tensor)
utils/common.py:114
↓ 10 callersMethodadd
(self, item)
utils/cache.py:109
↓ 10 callersFunctioniterate_safetensors
(path)
utils/common.py:88
↓ 10 callersMethodregister
(self, dataset)
utils/dataset.py:1150
↓ 9 callersMethod__init__
(self, unet, pipeline)
models/sdxl.py:979
↓ 9 callersFunctionreduce_tensor
(tensor)
utils/reduction.py:226
↓ 8 callersMethod__init__
(self, vocab_size, dim, dim_attn, dim_ffn,
models/wan/t5.py:368
↓ 8 callersFunctionbucket_suffix
(key)
utils/dataset.py:59
↓ 8 callersMethodto
(self, device)
optimizers/projectors/svd_projector.py:161
↓ 7 callersMethod__init__
(self, dim=128, z_dim=4, dim_mult=[1, 2, 4, 4],
models/wan/vae2_1.py:481
↓ 7 callersMethod__init__
(self, dim, out_dim, patch_size, eps=1e-6)
models/wan/model.py:317
↓ 7 callersFunctionflash_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 callersFunctionget_orthogonal_matrix
(weights, rank, proj_type, approx_svd=False, asvd_ss_scale=2)
optimizers/projectors/svd_projector.py:9
↓ 6 callersMethod__init__
(self, dim, mid_dim)
models/wan/clip.py:90
↓ 6 callersFunctionhalf
(x)
models/wan/attention.py:54
↓ 6 callersMethodreset_parameters
(self)
models/cosmos_predict2_modeling.py:1011
↓ 5 callersMethod__init__
(self, model)
models/flux2.py:401
↓ 5 callersFunctionfp16_clamp
(x)
models/wan/t5.py:14
↓ 5 callersMethodunpatchify
r""" Reconstruct video tensors from patch embeddings. Args: x (List[Tensor]): List of patchified features
models/wan/model.py:494
↓ 4 callersMethod__init__
(self, llama_model)
models/hidream.py:327
↓ 4 callersMethod__init__
(self, z_dim=16, vae_pth=None, dtype=torch.float,
models/cosmos_predict2.py:75
↓ 4 callersMethod__init__
Construct a layernorm module in the T5 style. No bias and no subtraction of mean.
models/llm_adapter.py:19
↓ 4 callersMethod__init__
(self, model)
models/ideogram4.py:261
↓ 4 callersMethod__init__
(self, config)
models/flux.py:163
↓ 4 callersMethod_pull_batches_from_dataloader
(self)
utils/dataset.py:1357
↓ 4 callersFunction_tokenize
(tokenizer, prompts)
models/cosmos_predict2.py:156
↓ 4 callersFunctionapply_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 callersMethodcache_latents
(self, map_fn, regenerate_cache=False, trust_cache=False, caching_batch_size=1)
utils/dataset.py:1038
↓ 4 callersMethodclear_cache
(self)
models/wan/vae2_2.py:853
↓ 4 callersMethodclear_cache
(self)
models/wan/vae2_1.py:578
↓ 4 callersMethoddecode
(self, z)
tools/cosmos_vae_test.py:59
↓ 4 callersMethoddecode
(self, z, scale)
models/wan/vae2_2.py:812
↓ 4 callersMethoddequantize
(self)
optimizers/optimizer_utils.py:234
↓ 4 callersFunctionempty_cuda_cache
()
utils/common.py:54
↓ 4 callersFunctionhadamard_transform
(x: torch.Tensor)
optimizers/projectors/approx_svd.py:17
↓ 4 callersMethodinit_weights
(self)
models/cosmos_predict2_modeling.py:1029
↓ 4 callersMethodpost_init
(self, data_parallel_rank, data_parallel_world_size, per_device_batch_size: dict, gradient_accumulation_steps,
utils/dataset.py:951
↓ 4 callersFunctionround_to_nearest_multiple
(x, multiple)
utils/common.py:106
↓ 4 callersMethodsave_model
(self, name)
utils/saver.py:110
↓ 4 callersFunctionshuffle_with_seed
(l, seed=None)
utils/dataset.py:40
↓ 4 callersFunctionvae_encode
(vae, image)
models/flux.py:82
↓ 3 callersMethod__init__
(self, model)
models/chroma.py:493
↓ 3 callersMethod__init__
(self, model)
models/ernie_image.py:210
↓ 3 callersMethod__init__
(self, model)
models/hunyuan_video_15.py:307
↓ 3 callersMethod__init__
(self, model)
models/z_image.py:241
↓ 3 callersMethod__init__
(self, model)
models/auraflow.py:265
↓ 3 callersMethod__init__
(self, pipeline)
models/cosmos.py:403
↓ 3 callersMethod__init__
(self, block, block_idx, offloader)
models/hunyuan_video.py:621
↓ 3 callersMethod__init__
(self, block, block_idx, offloader)
models/hunyuan_image.py:457
↓ 3 callersMethod__init__
(self, model)
models/krea2.py:266
↓ 3 callersMethod__init__
(self, vae, clip)
models/wan/wan.py:61
↓ 3 callersMethod_add_adapter
(self, adapter_config, top_level_module, target_modules, state_dict_key_prefix='')
models/sdxl.py:441
↓ 3 callersMethod_create_dataloader
(self, skip_first_n_batches=None)
utils/dataset.py:1342
↓ 3 callersMethod_extract_masked_hidden
(self, hidden_states: torch.Tensor, mask: torch.Tensor)
models/hunyuan_image.py:173
↓ 3 callersFunction_map_and_cache
(dataset, map_fn, cache_dir, cache_file_prefix='', new_fingerprint_args=None, regenerate_cache=False, caching_
utils/dataset.py:84
↓ 3 callersFunctionbasic_clean
(text)
models/wan/tokenizers.py:10
↓ 3 callersMethodcache
(self, unload_models=True)
utils/dataset.py:1157
↓ 3 callersMethodcache_text_embeddings
(self, map_fn, i, regenerate_cache=False, caching_batch_size=1)
utils/dataset.py:1042
↓ 3 callersMethodencode
(self, x)
tools/cosmos_vae_test.py:49
↓ 3 callersMethodencode
(self, x, scale)
models/wan/vae2_1.py:512
↓ 3 callersFunctionfd_id
(fd)
utils/reduction.py:528
↓ 3 callersMethodfinalize_current_shard
(self)
utils/cache.py:99
↓ 3 callersMethodget_conds
(self, inputs)
models/krea2.py:92
↓ 3 callersMethodget_param_groups
(self, parameters)
models/base.py:360
↓ 3 callersFunctionget_subsample_idx_and_random_signs
(n, subsample_size, device, dtype, manual_seed, states)
optimizers/projectors/approx_svd.py:117
↓ 3 callersMethodinit
(self)
utils/cache.py:39
↓ 3 callersMethodinitialize_state
(self, p)
optimizers/automagic.py:329
↓ 3 callersMethodload_diffusion_model
(self)
models/sd3.py:43
↓ 3 callersMethodload_model_if_needed
(self)
models/base.py:462
↓ 3 callersFunctionload_safetensors
(path)
utils/common.py:68
↓ 3 callersFunctionrope_params
(max_seq_len, dim, theta=10000)
models/wan/model.py:29
↓ 3 callersMethodsave_checkpoint
(self, step, examples)
utils/saver.py:118
↓ 3 callersFunctionsrht
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 callersMethodstep
(self, closure=None)
train.py:66
↓ 3 callersFunctionstorage_from_cache
(cls, key)
utils/reduction.py:536
↓ 3 callersFunctionsynchronize_device
(device: torch.device)
utils/offloading.py:34
↓ 3 callersFunctiontransposed_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 callersMethodvisual
(self, videos)
models/wan/clip.py:521
↓ 2 callersMethod__init__
(self, model)
models/lumina_2.py:323
↓ 2 callersMethod__init__
(self, transformer)
models/ltx_video.py:298
↓ 2 callersMethod__init__
(self, model)
models/sd3.py:219
↓ 2 callersMethod__init__
(self, model)
models/ltx2.py:598
↓ 2 callersMethod__init__
(self, model)
models/omnigen2.py:302
next →1–100 of 1,157, ranked by callers