MCPcopy Create free account

hub / github.com/alibaba-damo-academy/DyDiT / functions

Functions281 in github.com/alibaba-damo-academy/DyDiT

Methodbackward
(ctx, g)
DyDiT/dynamic_model.py:105
Methodcalc_bpd_loop
Compute the entire variational lower-bound, measured in bits-per-dim, as well as other related quantities. :param model: the
DyDiT/diffusion/gaussian_diffusion.py:918
Functioncleanup
End DDP training.
DyDiT/utils.py:213
Functioncollect_env
()
DyDiT/utils.py:298
Methodcondition_mean
(self, cond_fn, *args, **kwargs)
DyDiT/diffusion/respace.py:104
Methodcondition_score
(self, cond_fn, *args, **kwargs)
DyDiT/diffusion/respace.py:107
Functioncontinuous_gaussian_log_likelihood
Compute the log-likelihood of a continuous Gaussian distribution. :param x: the targets :param means: the Gaussian mean Tensor. :para
DyDiT/diffusion/diffusion_utils.py:47
Functionconvert_list_to_tensor
(list_convert)
DyDiT/dynamic_model.py:11
Functioncreate_logger
Create a logger that writes to a log file and stdout.
DyDiT/utils.py:152
Functioncreate_named_schedule_sampler
Create a ScheduleSampler from a library of pre-defined samplers. :param name: the name of the sampler. :param diffusion: the diffusion ob
DyDiT/diffusion/timestep_sampler.py:13
Functioncreate_tensorboard
Create a tensorboard that saves losses.
DyDiT/utils.py:172
Methodddim_reverse_sample
Sample x_{t+1} from the model using DDIM reverse ODE.
DyDiT/diffusion/gaussian_diffusion.py:562
Methodddim_sample_loop
Generate samples from the model using DDIM. Same usage as p_sample_loop().
DyDiT/diffusion/gaussian_diffusion.py:600
Methodevaluate
Evaluate if new feature vectors are at the manifold.
DyDiT/evaluator.py:295
Methodforward
head_select: (b, num_layers, num_head)
DyDiT/loss.py:52
Methodforward
(self, x)
DyDiT/dynamic_model.py:75
Methodforward
(ctx, x_in1, x_in2, x_in3=math.inf)
DyDiT/dynamic_model.py:90
Methodforward
(ctx, x_in)
DyDiT/dynamic_model.py:100
Methodforward
(self, x)
DyDiT/dynamic_model.py:125
Methodforward
(self, input_x)
DyDiT/models.py:43
Methodforward
(self, input_x)
DyDiT/models.py:68
Methodforward
(self, x: torch.Tensor, channel_mask=None)
DyDiT/models.py:120
Methodforward
(self, x, channel_mask=None)
DyDiT/models.py:179
Methodforward
(self, t)
DyDiT/models.py:236
Methodforward
(self, labels, train, force_drop_ids=None)
DyDiT/models.py:264
Methodforward
(self, x, c, t, complete_model)
DyDiT/models.py:296
Methodforward
(self, x, c)
DyDiT/models.py:336
Methodforward
r""" The forward method of the `Attention` class. Args: hidden_states (`torch.Tensor`): The hidden states
DyFLUX/flux_models/attention_processor_dyn.py:465
Methodforward
(self, x, temb, text, tau=5.0)
DyFLUX/flux_models/dy_utils.py:57
Methodforward
(self, tokens, token_len=1024, channel_mask_attn=None, channel_mask_ffn=None)
DyFLUX/flux_models/dy_utils.py:120
Methodforward
(self, hidden_states: torch.Tensor, channel_mask: torch.Tensor,
DyFLUX/flux_models/dy_utils.py:219
Methodforward
(self, ids: torch.Tensor)
DyFLUX/flux_models/transformer_flux_dyn.py:67
Methodforward
( self, hidden_states: torch.FloatTensor, temb: torch.FloatTensor, image_rotar
DyFLUX/flux_models/transformer_flux_dyn.py:114
Methodforward
( self, hidden_states: torch.FloatTensor, encoder_hidden_states: torch.FloatTensor,
DyFLUX/flux_models/transformer_flux_dyn.py:250
Methodforward
( self, hidden_states: torch.Tensor, encoder_hidden_states: torch.Tensor = None,
DyFLUX/flux_models/transformer_flux_dyn.py:429
Methodforward_inference
(self, input_x, channel_mask=None)
DyFLUX/flux_models/dy_utils.py:100
Methodforward_with_cfg
Forward pass of DiT, but also batches the unconditional forward pass for classifier-free guidance.
DyDiT/models.py:468
Methodfuse_projections
(self, fuse=True)
DyFLUX/flux_models/attention_processor_dyn.py:682
Functionget_experiment_dir
(root_dir, args)
DyDiT/utils.py:131
Functionget_grad_norm
r""" Copy from torch.nn.utils.clip_grad_norm_ Clips gradient norm of an iterable of parameters. The norm is computed over all gradients
DyDiT/utils.py:36
Functionget_named_beta_schedule
Get a pre-defined beta schedule for the given name. The beta schedule library consists of beta schedules which remain similar in the limi
DyDiT/diffusion/gaussian_diffusion.py:98
Methodget_processor
r""" Get the attention processor in use. Args: return_deprecated_lora (`bool`, *optional*, defaults to `False`):
DyFLUX/flux_models/attention_processor_dyn.py:451
Methodglobal_avg
(self)
DyDiT/misc.py:66
Methodguidance_scale
(self)
DyFLUX/flux_models/pipeline_flux_dyn.py:491
Functiongumbel_softmax
(logits, tau=5.0, dim = -1)
DyDiT/dynamic_model.py:50
Functioninit_distributed_mode
(args)
DyDiT/misc.py:217
Methodinterrupt
(self)
DyFLUX/flux_models/pipeline_flux_dyn.py:503
Methodis_vb
(self)
DyDiT/diffusion/gaussian_diffusion.py:54
Methodjoint_attention_kwargs
(self)
DyFLUX/flux_models/pipeline_flux_dyn.py:495
Functionload_model
(args, model_without_ddp, optimizer, loss_scaler)
DyDiT/misc.py:324
Methodlog_every
(self, iterable, print_freq, header=None)
DyDiT/misc.py:124
Methodmedian
(self)
DyDiT/misc.py:56
Methodnum_timesteps
(self)
DyFLUX/flux_models/pipeline_flux_dyn.py:499
Methodp_mean_variance
( self, model, *args, **kwargs )
DyDiT/diffusion/respace.py:89
Methodprocess_xstart
(x)
DyDiT/diffusion/gaussian_diffusion.py:310
Methodread_batch
(self, batch_size: int)
DyDiT/evaluator.py:486
Methodread_batch
(self, batch_size: int)
DyDiT/evaluator.py:516
Methodremaining
(self)
DyDiT/evaluator.py:501
Methodremaining
(self)
DyDiT/evaluator.py:524
Functionrequires_grad
Set requires_grad flag for all parameters in a model.
DyDiT/utils.py:206
Functionsave_model
(args, epoch, model, model_without_ddp, optimizer, loss_scaler, save_force=False)
DyDiT/misc.py:288
Functionsave_video_grid
(video, nrow=None)
DyDiT/utils.py:259
Methodset_attention_slice
r""" Set the slice size for attention computation. Args: slice_size (`int`): The slice size for attention
DyFLUX/flux_models/attention_processor_dyn.py:403
Methodset_tau
(self, tau)
DyDiT/dynamic_model.py:72
Methodset_use_memory_efficient_attention_xformers
r""" Set whether to use memory efficient attention from `xformers` or not. Args: use_memory_efficient_attention_xformers
DyFLUX/flux_models/attention_processor_dyn.py:296
Methodset_use_npu_flash_attention
r""" Set whether to use npu flash attention from `torch_npu` or not.
DyFLUX/flux_models/attention_processor_dyn.py:279
Functionsetup_distributed
Initialize distributed training environment. support both slurm and torch.distributed.launch see torch.distributed.init_process_group() for mo
DyDiT/utils.py:220
Methodsynchronize_between_processes
Warning: does not synchronize the deque!
DyDiT/misc.py:42
Methodsynchronize_between_processes
(self)
DyDiT/misc.py:117
Functionteacache_forward
( self, hidden_states: torch.Tensor, encoder_hidden_states: torch.Tensor = None, pooled_projec
DyFLUX/teacache_forward_utils.py:7
Functiontext_preprocessing
(text, clean_caption=False)
DyDiT/utils.py:322
Methodtraining_losses
Compute training losses for a single timestep. :param model: the model to evaluate loss on. :param x_start: the [N x C x ...]
DyDiT/diffusion/gaussian_diffusion.py:715
Methodtraining_losses_without_completemodel
Compute training losses for a single timestep. :param model: the model to evaluate loss on. :param x_start: the [N x C x ...]
DyDiT/diffusion/gaussian_diffusion.py:817
Functionupdate_ema
Step the EMA model towards the current model.
DyDiT/utils.py:195
Methodupdate_with_all_losses
(self, ts, losses)
DyDiT/diffusion/timestep_sampler.py:139
Methodupdate_with_local_losses
Update the reweighting using losses from a model. Call this method from each rank with a batch of timesteps and the correspon
DyDiT/diffusion/timestep_sampler.py:72
Methodvalue
(self)
DyDiT/misc.py:74
Methodwarmup
(self)
DyDiT/evaluator.py:253
Methodweights
(self)
DyDiT/diffusion/timestep_sampler.py:67
Methodweights
(self)
DyDiT/diffusion/timestep_sampler.py:130
Functionwrite_tensorboard
write the loss information to a tensorboard file. Only for pytorch DDP mode.
DyDiT/utils.py:182
← previous201–281 of 281, ranked by callers