MCPcopy Create free account

hub / github.com/PixArt-alpha/PixArt-sigma / functions

Functions537 in github.com/PixArt-alpha/PixArt-sigma

↓ 2 callersFunctionbuild_lr_scheduler
(config, optimizer, train_dataloader, lr_scale_ratio)
diffusion/utils/lr_scheduler.py:9
↓ 2 callersFunctionbuild_model
(cfg, use_grad_checkpoint=False, use_fp32_attention=False, gc_step=1, **kwargs)
diffusion/model/builder.py:8
↓ 2 callersFunctionbuild_optimizer
(model, optimizer_cfg)
diffusion/utils/optimizer.py:129
↓ 2 callersFunctioncheck_valid_inputs
(*tensors, valid_dtypes=[torch.float16, torch.bfloat16])
diffusion/model/llava/mpt/attention.py:54
↓ 2 callersMethodclean_caption
(self, caption)
diffusion/model/t5.py:128
↓ 2 callersMethodcondition_score
Compute what the p_mean_variance output would have been, should the model's score function be conditioned by cond_fn. See con
diffusion/model/gaussian_diffusion.py:387
↓ 2 callersMethoddata_prediction_fn
Return the data prediction model (with corrector).
diffusion/model/dpm_solver.py:435
↓ 2 callersMethoddata_prediction_fn
Return the data prediction model (with corrector).
diffusion/model/sa_solver.py:377
↓ 2 callersMethoddenoise_to_zero_fn
Denoise at the final step, which is equivalent to solve the ODE from lambda_s to infty by first-order discretization.
diffusion/model/sa_solver.py:420
↓ 2 callersFunctiondownload_model
Downloads a pre-trained PixArt model from the web.
tools/download.py:33
↓ 2 callersMethoddownsample_2d
(self, tensor, H, W, scale_factor, sampling=None)
diffusion/model/nets/PixArt_blocks.py:97
↓ 2 callersMethodedm_sigma
(self, t)
diffusion/model/sa_solver.py:162
↓ 2 callersFunctionfind_model
Finds a pre-trained G.pt model, downloading it if necessary. Alternatively, loads a model from a local path.
tools/download.py:22
↓ 2 callersMethodflush
Flush written text to both stdout and a file, if open.
diffusion/model/utils.py:404
↓ 2 callersMethodforward
Forward pass of PixArt. x: (N, C, H, W) tensor of spatial inputs (images or latent representations of images) t: (N,) tensor
diffusion/model/nets/PixArtMS.py:165
↓ 2 callersMethodforward
Forward pass of PixArt. x: (N, C, H, W) tensor of spatial inputs (images or latent representations of images) t: (N,) tensor
diffusion/model/nets/PixArt.py:145
↓ 2 callersFunctiongenerate_noise_preds
(transformer : PixArtTransformer2DModel, latent_model_input, embeds, embeds_attn, timest
train_scripts/train_dreambooth_lora.py:297
↓ 2 callersFunctiongenerate_sample_1step
(model, scheduler, latents, maxt, prompt_embeds, prompt_attention_masks=None)
scripts/DMD/transformer_train/generate.py:22
↓ 2 callersFunctionget_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)
diffusion/model/nets/PixArt.py:289
↓ 2 callersFunctionget_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/
diffusion/model/nets/PixArt.py:258
↓ 2 callersFunctionget_closest_ratio
(height: float, width: float, ratios: dict)
tools/extract_features.py:29
↓ 2 callersMethodget_coefficients_fn
(self, order, interval_start, interval_end, lambda_list, tau)
diffusion/sa_solver_diffusers.py:526
↓ 2 callersMethodget_data_info
(self, idx)
diffusion/data/datasets/InternalData.py:123
↓ 2 callersMethodget_model
(self)
diffusion/model/llava/llava_mpt.py:192
↓ 2 callersFunctionget_model_input_time
Convert the continuous-time `t_continuous` (in [epsilon, T]) to the model input time. For discrete-time DPMs, we convert `t_continuou
diffusion/model/dpm_solver.py:273
↓ 2 callersFunctionget_model_input_time
Convert the continuous-time `t_continuous` (in [epsilon, T]) to the model input time. For discrete-time DPMs, we convert `t_continuou
diffusion/model/sa_solver.py:259
↓ 2 callersMethodget_output_embeddings
(self)
diffusion/model/llava/mpt/modeling_mpt.py:240
↓ 2 callersFunctionget_rel_pos
Get relative positional embeddings according to the relative positions of query and key sizes. Args: q_size (int): size of qu
diffusion/model/utils.py:121
↓ 2 callersMethodget_time_steps
Compute the intermediate time steps for sampling.
diffusion/model/sa_solver.py:398
↓ 2 callersFunctionget_transform
(type, resolution)
diffusion/data/transforms.py:13
↓ 2 callersFunctioninference
(vae, dataloader, signature, work_dir)
tools/extract_features.py:259
↓ 2 callersFunctioninit_random_seed
Initialize random seed. If the seed is not set, the seed will be automatically randomized, and then broadcast to all processes to prevent som
diffusion/utils/misc.py:33
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
diffusion/model/dpm_solver.py:1285
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
diffusion/model/sa_solver.py:1099
↓ 2 callersMethodinverse_lambda
Compute the continuous-time label t in [0, T] of a given half-logSNR lambda_t.
diffusion/model/sa_solver.py:142
↓ 2 callersFunctionis_distributed
()
diffusion/utils/dist_utils.py:16
↓ 2 callersFunctionmodel_wrapper
Thanks to DPM-Solver for their code base
diffusion/model/sa_solver.py:173
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
diffusion/model/dpm_solver.py:946
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
diffusion/model/dpm_solver.py:429
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
diffusion/model/sa_solver.py:371
↓ 2 callersFunctionnormal_kl
Compute the KL divergence between two gaussians. Shapes are automatically broadcasted, so batches can be compared to scalars, among other
diffusion/model/diffusion_utils.py:10
↓ 2 callersMethodp_sample_loop
Generate samples from the model. :param model: the model module. :param shape: the shape of the samples, (N, C, H, W).
diffusion/model/gaussian_diffusion.py:448
↓ 2 callersMethodregister_forward_hook
(self)
diffusion/utils/misc.py:287
↓ 2 callersFunctionrms_norm
(x, weight=None, eps=1e-05)
diffusion/model/llava/mpt/norm.py:27
↓ 2 callersFunctionrun_function
(start, end, functions)
diffusion/model/utils.py:55
↓ 2 callersMethodsample
(self, S, batch_size, shape, conditioning=None,
diffusion/sa_sampler.py:31
↓ 2 callersFunctionscalings_for_boundary_conditions
(timestep, sigma_data=0.5, timestep_scaling=10.0)
train_scripts/train_pixart_lcm.py:65
↓ 2 callersFunctionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
diffusion/utils/misc.py:66
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
diffusion/model/dpm_solver.py:681
↓ 2 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These ma
diffusion/model/nets/PixArt_blocks.py:282
↓ 1 callersMethod__init__
(self, sampler: Sampler, dataset: Dataset, batch_size: int,
diffusion/utils/data_sampler.py:22
↓ 1 callersMethod__init__
( self, params, lr: float = 1e-4, betas: Tuple[float, float] =
diffusion/utils/optimizer.py:176
↓ 1 callersMethod__init__
(self, file_name=None, file_mode="w", should_flush=True)
diffusion/model/utils.py:372
↓ 1 callersMethod__init__
(self, model, timestep_map, original_num_steps)
diffusion/model/respace.py:123
↓ 1 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4,
diffusion/model/nets/PixArt.py:68
↓ 1 callersMethod__init__
(self, config: MPTConfig, mm_vision_tower=None, mm_hidden_size=None)
diffusion/model/llava/llava_mpt.py:46
↓ 1 callersMethod__init__
(self, d_model: int, expansion_ratio: int, device: Optional[str]=None)
diffusion/model/llava/mpt/blocks.py:10
↓ 1 callersMethod__init__
(self, config: MPTConfig)
diffusion/model/llava/mpt/modeling_mpt.py:29
↓ 1 callersMethod__init__
(self, d_model: int, n_heads: int, attn_impl: str='triton', clip_qkv: Optional[float]=None, qk_ln: bool=False,
diffusion/model/llava/mpt/attention.py:122
↓ 1 callersMethod_apply_prefix_mask
(self, attn_bias: torch.Tensor, prefix_mask: torch.Tensor)
diffusion/model/llava/mpt/modeling_mpt.py:106
↓ 1 callersMethod_apply_sequence_id
(self, attn_bias: torch.Tensor, sequence_id: torch.LongTensor)
diffusion/model/llava/mpt/modeling_mpt.py:121
↓ 1 callersMethod_attn_bias
(self, device, dtype, attention_mask: Optional[torch.ByteTensor]=None, prefix_mask: Optional[torch.ByteTensor]
diffusion/model/llava/mpt/modeling_mpt.py:76
↓ 1 callersMethod_convert_to_karras
Constructs the noise schedule of Karras et al. (2022).
diffusion/sa_solver_diffusers.py:324
↓ 1 callersFunction_normal_init_
(std, mean=0.0)
diffusion/model/llava/mpt/param_init_fns.py:121
↓ 1 callersMethod_prior_bpd
Get the prior KL term for the variational lower-bound, measured in bits-per-dim. This term can't be optimized, as it only dep
diffusion/model/gaussian_diffusion.py:957
↓ 1 callersMethod_sigma_to_t
(self, sigma, log_sigmas)
diffusion/sa_solver_diffusers.py:300
↓ 1 callersMethod_warmed_up
(self)
diffusion/model/timestep_sampler.py:149
↓ 1 callersMethodanalyse_model
(self)
diffusion/utils/misc.py:234
↓ 1 callersFunctionapply_style
(style_name: str, positive: str, negative: str = "")
app/app_pixart_sigma.py:102
↓ 1 callersFunctionapply_style
(style_name: str, positive: str, negative: str = "")
app/app_pixart_dmd.py:99
↓ 1 callersFunctionattn_bias_shape
(attn_impl, n_heads, seq_len, alibi, prefix_lm, causal, use_sequence_id)
diffusion/model/llava/mpt/attention.py:234
↓ 1 callersMethodbasic_clean
(text)
diffusion/model/t5.py:123
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
diffusion/lcm_scheduler.py:49
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
diffusion/sa_solver_diffusers.py:28
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
diffusion/model/gaussian_diffusion.py:126
↓ 1 callersFunctionbuild_alibi_bias
(n_heads, seq_len, full=False, alibi_bias_max=8, device=None, dtype=None)
diffusion/model/llava/mpt/attention.py:268
↓ 1 callersFunctionbuild_attn_bias
(attn_impl, attn_bias, n_heads, seq_len, causal=False, alibi=False, alibi_bias_max=8)
diffusion/model/llava/mpt/attention.py:248
↓ 1 callersFunctioncast_training_params
(model: Union[torch.nn.Module, List[torch.nn.Module]], dtype=torch.float32)
train_scripts/train_pixart_lora_hf.py:529
↓ 1 callersFunctioncheckpoint_sequential
(functions, step, input, *args, **kwargs)
diffusion/model/utils.py:48
↓ 1 callersFunctioncleanup
End DDP training.
diffusion/model/utils.py:354
↓ 1 callersFunctioncompute_t5_features
(pretrained_model_path : str, captions_folder : str, class_id : str, unique_id : str, output_path : str, read_
train_scripts/train_dreambooth_lora.py:81
↓ 1 callersFunctioncompute_t5_validation_embeds
(pretrained_model_path : str, validation_prompt : str)
train_scripts/train_dreambooth_lora.py:65
↓ 1 callersFunctioncompute_vae_features
(pretrained_model_path : str, images_path : str, unique_id : str, class_id : str, out
train_scripts/train_dreambooth_lora.py:131
↓ 1 callersFunctioncond_grad_fn
Compute the gradient of the classifier, i.e. nabla_{x} log p_t(cond | x_t).
diffusion/model/dpm_solver.py:302
↓ 1 callersFunctioncond_grad_fn
Compute the gradient of the classifier, i.e. nabla_{x} log p_t(cond | x_t).
diffusion/model/sa_solver.py:288
↓ 1 callersMethodcondition_mean
Compute the mean for the previous step, given a function cond_fn that computes the gradient of a conditional log probability with res
diffusion/model/gaussian_diffusion.py:375
↓ 1 callersMethodconvert_model_output
Convert the model output to the corresponding type the DPMSolver/DPMSolver++ algorithm needs. DPM-Solver is designed to discretize an
diffusion/sa_solver_diffusers.py:337
↓ 1 callersMethodcreate_frame
(self, module, input, output)
diffusion/utils/misc.py:259
↓ 1 callersMethodddim_sample
Sample x_{t-1} from the model using DDIM. Same usage as p_sample().
diffusion/model/gaussian_diffusion.py:542
↓ 1 callersMethodddim_sample_loop_progressive
Use DDIM to sample from the model and yield intermediate samples from each timestep of DDIM. Same usage as p_sample_loop_prog
diffusion/model/gaussian_diffusion.py:662
↓ 1 callersMethodddim_step
(self, pred_x0, pred_noise, timestep_index)
train_scripts/train_pixart_lcm.py:98
↓ 1 callersMethoddenoise_to_zero_fn
Denoise at the final step, which is equivalent to solve the ODE from lambda_s to infty by first-order discretization.
diffusion/model/dpm_solver.py:545
↓ 1 callersMethoddetect_overflow
Report whether the tensor contains any `nan` or `inf` entries. This is useful for detecting overflows/underflows and best to call rig
diffusion/utils/misc.py:345
↓ 1 callersFunctiondiscretized_gaussian_log_likelihood
Compute the log-likelihood of a Gaussian distribution discretizing to a given image. :param x: the target images. It is assumed that this
diffusion/model/diffusion_utils.py:62
↓ 1 callersMethoddpm_solver_adaptive
The adaptive step size solver based on singlestep DPM-Solver. Args: x: A pytorch tensor. The initial value at time `t_T`
diffusion/model/dpm_solver.py:970
↓ 1 callersMethoddump_saved_frames
(self)
diffusion/utils/misc.py:226
↓ 1 callersMethodedm_inverse_sigma
(self, edmsigma)
diffusion/model/sa_solver.py:165
↓ 1 callersFunctionema_update
(model_dest: nn.Module, model_src: nn.Module, rate)
train_scripts/train_pixart_lcm.py:48
↓ 1 callersFunctioneps_to_mu
(scheduler, model_output, sample, timesteps)
scripts/DMD/transformer_train/generate.py:34
↓ 1 callersFunctionexpand_dims
Expand the tensor `v` to the dim `dims`. Args: `v`: a PyTorch tensor with shape [N]. `dim`: a `int`. Returns: a P
diffusion/model/sa_solver.py:1140
← previousnext →101–200 of 537, ranked by callers