MCPcopy Create free account

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

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

↓ 1 callersFunction_set_rng_states
Set the global random state of :mod:`torch`, :mod:`torch.cuda`, :mod:`numpy` and Python in the current process.
utils/isolate_rng.py:45
↓ 1 callersFunction_t5
(name, encoder_only=False, decoder_only=False, return_tokenizer=False, tokeniz
models/wan/t5.py:409
↓ 1 callersFunction_video_vae
Autoencoder3d adapted from Stable Diffusion 1.x, 2.x and XL.
models/cosmos_predict2.py:48
↓ 1 callersFunction_video_vae
(pretrained_path=None, z_dim=16, dim=160, device="cpu", **kwargs)
models/wan/vae2_2.py:863
↓ 1 callersFunction_video_vae
Autoencoder3d adapted from Stable Diffusion 1.x, 2.x and XL.
models/wan/vae2_1.py:588
↓ 1 callersMethodadd_text_embedding_dataset
(self, te_dataset)
utils/dataset.py:305
↓ 1 callersFunctionapply_debiased_estimation
(loss, timesteps, noise_scheduler, v_prediction=False)
models/sdxl.py:347
↓ 1 callersFunctionapply_normuon_variance_reduction
NorMuon variance reduction. Algebraically fuses the normalization steps to minimize memory ops.
optimizers/generic_optim.py:236
↓ 1 callersFunctionapply_patches
()
utils/patches.py:408
↓ 1 callersFunctionapply_snr_weight
(loss, timesteps, noise_scheduler, gamma, v_prediction=False)
models/sdxl.py:333
↓ 1 callersFunctionapproximate_svd
Perform approximate Singular Value Decomposition (SVD) using Subsampled Randomized Hadamard Transform (SRHT). Args: - input_matrix (torc
optimizers/projectors/approx_svd.py:22
↓ 1 callersMethodbuild_patch_embed
(self)
models/cosmos_predict2_modeling.py:1306
↓ 1 callersMethodbuild_pos_embed
(self)
models/cosmos_predict2_modeling.py:1328
↓ 1 callersFunctionbypass_flux_guidance
(transformer)
models/flux.py:139
↓ 1 callersFunctioncanonicalize
(text, keep_punctuation_exact_string=None)
models/wan/tokenizers.py:22
↓ 1 callersMethodcheck_params
Check if parameters set are all okay and raise error if there is any strange combination.
optimizers/generic_optim.py:608
↓ 1 callersFunctionclean_memory_on_device
r""" Clean memory on the specified device, will be called from training scripts.
utils/offloading.py:19
↓ 1 callersFunctionclip_grad_norm_
Clips gradient norm of an iterable of parameters. This has been adapted from Nvidia megatron. We add norm averaging to consider MoE params wh
utils/patches.py:175
↓ 1 callersFunctionclip_xlm_roberta_vit_h_14
( pretrained=False, pretrained_name='open-clip-xlm-roberta-large-vit-huge-14', **kwarg
models/wan/clip.py:465
↓ 1 callersMethodcompute_attention
(self, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor)
models/cosmos_predict2_modeling.py:443
↓ 1 callersMethodcompute_qkv
( self, x: torch.Tensor, context: Optional[torch.Tensor] = None, rope_emb: Opt
models/cosmos_predict2_modeling.py:413
↓ 1 callersFunctioncompute_scale_for_dtype
Compute appropriate scale for the given tensor and target dtype. Args: tensor: Input tensor to be quantized dtype: Target dt
optimizers/optimizer_utils.py:32
↓ 1 callersFunctionconvert_crop_and_resize
(pil_img, width_and_height)
tools/image_resize_test.py:15
↓ 1 callersFunctionconvert_crop_and_resize
(pil_img, width_and_height)
models/base.py:61
↓ 1 callersFunctionconvert_openai_text_enc_state_dict
(text_enc_dict)
models/sdxl.py:275
↓ 1 callersFunctionconvert_openclip_text_enc_state_dict
(text_enc_dict)
models/sdxl.py:228
↓ 1 callersFunctionconvert_unet_state_dict
(unet_state_dict)
models/sdxl.py:103
↓ 1 callersFunctionconvert_vae_state_dict
(vae_state_dict)
models/sdxl.py:183
↓ 1 callersMethodcreate_backward_hook
(self, block_index: int)
utils/offloading.py:231
↓ 1 callersMethodcreate_new_shard
(self)
utils/cache.py:90
↓ 1 callersMethoddequantize
(self, model, diffusion_model_dtype)
models/base.py:528
↓ 1 callersFunctiondistribute_modulations
()
models/chroma.py:47
↓ 1 callersFunctiondistributed_init
Initialize distributed training environment.
train.py:245
↓ 1 callersFunctiondistributed_init
Initialize distributed training environment.
test/debug_deepspeed_init.py:27
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/ernie_image.py:91
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/hunyuan_video_15.py:181
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/z_image.py:95
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/auraflow.py:159
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/base.py:384
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/cosmos_predict2.py:421
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/ltx2.py:349
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/ideogram4.py:106
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/krea2.py:153
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/qwen_image.py:487
↓ 1 callersMethodenable_block_swap
(self, blocks_to_swap)
models/wan/wan.py:385
↓ 1 callersMethodenable_paramiter_swapping
(self, paramiter_swapping_factor=0.1)
optimizers/automagic.py:95
↓ 1 callersMethodencode
(self, x)
models/cosmos.py:66
↓ 1 callersFunctionenforce_zero_terminal_snr
(betas)
models/sdxl.py:299
↓ 1 callersFunctionevaluate_single
(model_engine, eval_dataloader, eval_gradient_accumulation_steps, quantile, pbar=None)
train.py:176
↓ 1 callersFunctionexecute_mapping
(original_key)
models/wan/t5.py:465
↓ 1 callersMethodexpired
(self)
utils/reduction.py:49
↓ 1 callersFunctionextract_clips
(video, target_frames, video_clip_mode)
models/base.py:37
↓ 1 callersFunctionfix_noise_scheduler_betas_for_zero_terminal_snr
(noise_scheduler)
models/sdxl.py:295
↓ 1 callersMethodforward
r""" Args: x(Tensor): Shape [B, L1, C] e(Tensor): Shape [B, L1, C]
models/wan/model.py:332
↓ 1 callersMethodfree_dead_references
(self)
utils/reduction.py:90
↓ 1 callersMethodgenerate_embeddings
(self, B_T_H_W_C: torch.Size, fps: Optional[torch.Tensor])
models/cosmos_predict2_modeling.py:487
↓ 1 callersFunctionget_and_update_subset_norm_denom
(group, state, grad, beta2)
optimizers/generic_optim.py:28
↓ 1 callersFunctionget_and_update_subspace_momentum
(group, state, p)
optimizers/generic_optim.py:67
↓ 1 callersMethodget_call_text_encoder_fn
(self, text_encoder)
models/base.py:346
↓ 1 callersMethodget_call_text_encoder_fn
(self, text_encoder)
models/sd3.py:78
↓ 1 callersMethodget_call_vae_fn
(self, vae)
models/sd3.py:69
↓ 1 callersMethodget_conds
(self, inputs)
models/ideogram4.py:46
↓ 1 callersMethodget_conds
(self, inputs)
models/flux2.py:116
↓ 1 callersFunctionget_dit_config
(state_dict, key_prefix='')
models/cosmos_predict2.py:106
↓ 1 callersFunctionget_format_params
Returns (mantissa_bits, total_bits) for each format. mantissa_bits excludes the implicit leading 1.
optimizers/optimizer_utils.py:121
↓ 1 callersMethodget_learning_rates
(self)
optimizers/automagic.py:163
↓ 1 callersFunctionget_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
models/hidream.py:31
↓ 1 callersFunctionget_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
models/chroma.py:30
↓ 1 callersFunctionget_lin_function
( x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15 )
models/lumina_2.py:23
↓ 1 callersFunctionget_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
models/cosmos_predict2.py:42
↓ 1 callersFunctionget_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
models/sd3.py:19
↓ 1 callersFunctionget_lin_function
( x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15 )
models/omnigen2.py:21
↓ 1 callersFunctionget_lin_function
(x1: float = 256, y1: float = 0.5, x2: float = 4096, y2: float = 1.15)
models/flux.py:124
↓ 1 callersFunctionget_most_recent_run_dir
(output_dir)
train.py:146
↓ 1 callersMethodget_numerator
(self, group, state, p, state_device)
optimizers/generic_optim.py:515
↓ 1 callersFunctionget_per_sigma_loss_weights
Args: sigma (tensor): noise level Returns: loss weights per sigma noise level
models/cosmos.py:37
↓ 1 callersMethodget_preprocess_media_file_fn
(self)
models/base.py:343
↓ 1 callersFunctionget_prodigy_d
(optimizer)
train.py:258
↓ 1 callersFunctionget_projected_grad
(group, state, p)
optimizers/generic_optim.py:101
↓ 1 callersFunctionget_projector
(group, p)
optimizers/generic_optim.py:108
↓ 1 callersFunctionget_rotary_pos_embed
(transformer, video_length, height, width)
models/hunyuan_video.py:35
↓ 1 callersMethodget_size_bucket_datasets
(self)
utils/dataset.py:890
↓ 1 callersFunctionget_t_distribution
(model_config)
utils/common.py:124
↓ 1 callersMethodget_text_conditioning
(self, input_ids, input_ids_2)
models/sdxl.py:736
↓ 1 callersMethodget_text_embeddings
(self, image_spec, caption_number)
utils/dataset.py:173
↓ 1 callersMethodget_text_encoders
(self)
models/base.py:304
↓ 1 callersMethodget_text_encoders
(self)
models/sd3.py:60
↓ 1 callersMethodget_vae
(self)
models/base.py:301
↓ 1 callersMethodget_vae
(self)
models/sd3.py:57
↓ 1 callersFunctionhas_inf_or_nan
(x)
optimizers/generic_optim.py:23
↓ 1 callersMethodinit_weights
(self)
models/cosmos_predict2_modeling.py:257
↓ 1 callersMethodinit_weights
(self)
models/cosmos_predict2_modeling.py:399
↓ 1 callersMethodinit_weights
(self)
models/cosmos_predict2_modeling.py:712
↓ 1 callersMethodinit_weights
(self)
models/cosmos_predict2_modeling.py:830
↓ 1 callersMethodinit_weights
(self)
models/cosmos_predict2_modeling.py:895
↓ 1 callersMethodinit_weights
(self)
models/cosmos_predict2_modeling.py:1293
↓ 1 callersMethodinit_weights
r""" Initialize model parameters using Xavier initialization.
models/wan/model.py:519
↓ 1 callersFunctionis_dev
(safetensors_path)
models/flux.py:112
↓ 1 callersFunctionis_package_installed
(package_name)
optimizers/projectors/approx_svd.py:9
↓ 1 callersFunctionisolate_rng
A context manager that resets the global random state on exit to what it was before entering. It supports isolating the states for PyTorch, Numpy,
utils/isolate_rng.py:58
← previousnext →201–300 of 1,157, ranked by callers