Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PixArt-alpha/PixArt-sigma
/ functions
Functions
537 in github.com/PixArt-alpha/PixArt-sigma
⨍
Functions
537
◇
Types & classes
71
↓ 1 callers
Function
extract_caption_t5
()
tools/extract_features.py:172
↓ 1 callers
Function
extract_caption_t5_job
(item)
tools/extract_features.py:136
↓ 1 callers
Function
extract_img_vae
(bs)
tools/extract_features.py:206
↓ 1 callers
Function
extract_img_vae_multiscale
(bs=1)
tools/extract_features.py:272
↓ 1 callers
Function
extract_into_tensor
(a, t, x_shape)
train_scripts/train_pixart_lcm.py:71
↓ 1 callers
Function
find_closest_resolution
(ratio, resolution)
train_scripts/train_dreambooth_lora.py:43
↓ 1 callers
Function
flush
()
scripts/inference_pipeline.py:58
↓ 1 callers
Function
fused_init_helper_
(module: nn.Module, init_fn_)
diffusion/model/llava/mpt/param_init_fns.py:17
↓ 1 callers
Function
gather_difflen_tensor
(feat, num_samples_list, concat=True, group=None, group_size=None)
diffusion/utils/dist_utils.py:205
↓ 1 callers
Function
gen_slopes
(n_heads, alibi_bias_max=8, device=None)
diffusion/model/llava/mpt/attention.py:259
↓ 1 callers
Function
generate
(items)
tools/generate_dmd_data_noise_pairs.py:27
↓ 1 callers
Function
get_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
diffusion/model/nets/PixArt.py:278
↓ 1 callers
Method
get_abs_min_max
(var, ctx)
diffusion/utils/misc.py:340
↓ 1 callers
Function
get_args
()
tools/extract_features.py:303
↓ 1 callers
Function
get_args
()
app/app_pixart_sigma.py:109
↓ 1 callers
Function
get_args
()
app/app_pixart_dmd.py:106
↓ 1 callers
Function
get_args
()
scripts/interface.py:33
↓ 1 callers
Function
get_args
()
scripts/inference.py:24
↓ 1 callers
Function
get_beta_schedule
This is the deprecated API for creating beta schedules. See get_named_beta_schedule() for the new library of schedules.
diffusion/model/gaussian_diffusion.py:66
↓ 1 callers
Function
get_chunks
(lst, n)
diffusion/data/datasets/utils.py:132
↓ 1 callers
Method
get_coefficients_exponential_negative
Calculate the integral of exp(-x) * x^order dx from interval_start to interval_end
diffusion/sa_solver_diffusers.py:417
↓ 1 callers
Method
get_coefficients_exponential_negative
Calculate the integral of exp(-x) * x^order dx from interval_start to interval_end For calculating the coefficient of gradient terms
diffusion/model/sa_solver.py:426
↓ 1 callers
Method
get_coefficients_exponential_positive
Calculate the integral of exp(x(1+tau^2)) * x^order dx from interval_start to interval_end
diffusion/sa_solver_diffusers.py:437
↓ 1 callers
Method
get_coefficients_exponential_positive
Calculate the integral of exp(x(1+tau^2)) * x^order dx from interval_start to interval_end For calculating the coefficient of gradien
diffusion/model/sa_solver.py:449
↓ 1 callers
Function
get_cosine_decay_to_constant_with_warmup
Create a schedule with a cosine annealing lr followed by a constant lr. Args: optimizer ([`~torch.optim.Optimizer`]): Th
diffusion/utils/lr_scheduler.py:43
↓ 1 callers
Function
get_data_root_and_path
(data_dir)
diffusion/data/builder.py:27
↓ 1 callers
Function
get_local_rank
()
diffusion/utils/dist_utils.py:36
↓ 1 callers
Method
get_orders_and_timesteps_for_singlestep_solver
Get the order of each step for sampling by the singlestep DPM-Solver. We combine both DPM-Solver-1,2,3 to use all the function evalu
diffusion/model/dpm_solver.py:485
↓ 1 callers
Method
get_scalings_for_boundary_condition_discrete
(self, t)
diffusion/lcm_scheduler.py:313
↓ 1 callers
Method
get_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
diffusion/lcm_scheduler.py:437
↓ 1 callers
Method
getdata
(self, index)
diffusion/data/datasets/InternalData.py:88
↓ 1 callers
Method
getdata
(self, index)
diffusion/data/datasets/InternalData.py:250
↓ 1 callers
Method
getdata
(self, index)
diffusion/data/datasets/InternalData_ms.py:108
↓ 1 callers
Method
getdata
(self, index)
diffusion/data/datasets/InternalData_ms.py:284
↓ 1 callers
Method
getdata
(self, index)
diffusion/data/datasets/dmd.py:134
↓ 1 callers
Method
initialize
(self)
diffusion/model/nets/PixArtMS.py:250
↓ 1 callers
Method
initialize_weights
(self)
diffusion/model/nets/PixArt.py:214
↓ 1 callers
Function
is_local_master
()
diffusion/utils/dist_utils.py:49
↓ 1 callers
Method
lagrange_polynomial_coefficient
Calculate the coefficient of lagrange polynomial
diffusion/sa_solver_diffusers.py:463
↓ 1 callers
Method
lagrange_polynomial_coefficient
Calculate the coefficient of lagrange polynomial For lagrange interpolation
diffusion/model/sa_solver.py:478
↓ 1 callers
Method
load_json
(self, file_path)
diffusion/data/datasets/InternalData.py:143
↓ 1 callers
Method
load_json
(self, file_path)
diffusion/data/datasets/InternalData.py:313
↓ 1 callers
Method
load_ori_img
(self, img_path)
diffusion/data/datasets/dmd.py:117
↓ 1 callers
Function
log_validation
(model, step, device, vae=None)
train_scripts/train.py:45
↓ 1 callers
Function
log_validation
(model, step, device)
train_scripts/train_pixart_lcm.py:106
↓ 1 callers
Function
main
(args)
tools/convert_diffusers_to_pipeline.py:23
↓ 1 callers
Function
main
(args)
tools/convert_diffusers_to_pixart.py:20
↓ 1 callers
Function
main
(args)
tools/convert_pixart_to_diffusers.py:23
↓ 1 callers
Function
main
(args)
tools/merge_transformers.py:21
↓ 1 callers
Function
main
()
tools/convert_images_to_json.py:13
↓ 1 callers
Function
main
()
train_scripts/train_pixart_dmd.py:116
↓ 1 callers
Function
main
()
train_scripts/train_pixart_lora_hf.py:415
↓ 1 callers
Function
main
(args)
scripts/inference_pipeline.py:14
↓ 1 callers
Function
model_fn
The noise predicition model function that is used for DPM-Solver.
diffusion/model/dpm_solver.py:311
↓ 1 callers
Function
model_fn
The noise predicition model function that is used for DPM-Solver.
diffusion/model/sa_solver.py:297
↓ 1 callers
Function
mprint
Print only from rank 0.
diffusion/model/utils.py:346
↓ 1 callers
Method
multistep_dpm_solver_second_update
Multistep solver DPM-Solver-2 from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The initial value at t
diffusion/model/dpm_solver.py:805
↓ 1 callers
Method
multistep_dpm_solver_third_update
Multistep solver DPM-Solver-3 from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The initial value at t
diffusion/model/dpm_solver.py:864
↓ 1 callers
Function
ndarr_image
(tensor: Union[torch.Tensor, List[torch.Tensor]], **kwargs,)
scripts/interface.py:50
↓ 1 callers
Method
numerical_clip_alpha
For some beta schedules such as cosine schedule, the log-SNR has numerical isssues. We clip the log-SNR near t=T within -5.1 to ensur
diffusion/model/dpm_solver.py:114
↓ 1 callers
Method
p_sample
Sample x_{t-1} from the model at the given timestep. :param model: the model to sample from. :param x: the current tensor at
diffusion/model/gaussian_diffusion.py:405
↓ 1 callers
Method
p_sample_loop_progressive
Generate samples from the model and yield intermediate samples from each timestep of diffusion. Arguments are the same as p_s
diffusion/model/gaussian_diffusion.py:493
↓ 1 callers
Function
parse_args
()
tools/generate_dmd_data_noise_pairs.py:64
↓ 1 callers
Function
parse_args
()
train_scripts/train.py:244
↓ 1 callers
Function
parse_args
()
train_scripts/train_pixart_lora_hf.py:86
↓ 1 callers
Function
parse_args
()
train_scripts/train_pixart_lcm.py:367
↓ 1 callers
Function
parse_args
()
scripts/DMD/transformer_train/args.py:3
↓ 1 callers
Function
print_usage
()
tools/convert_images_to_json.py:9
↓ 1 callers
Method
q_mean_variance
Get the distribution q(x_t | x_0). :param x_start: the [N x C x ...] tensor of noiseless inputs. :param t: the number of diff
diffusion/model/gaussian_diffusion.py:229
↓ 1 callers
Function
randomize_seed_fn
(seed: int, randomize_seed: bool)
tools/generate_dmd_data_noise_pairs.py:20
↓ 1 callers
Function
randomize_seed_fn
(seed: int, randomize_seed: bool)
app/app_pixart_sigma.py:177
↓ 1 callers
Function
randomize_seed_fn
(seed: int, randomize_seed: bool)
app/app_pixart_dmd.py:162
↓ 1 callers
Function
randomize_seed_fn
(seed: int, randomize_seed: bool)
scripts/interface.py:66
↓ 1 callers
Function
rename_file_with_creation_time
(file_path)
diffusion/utils/logger.py:86
↓ 1 callers
Function
rescale_zero_terminal_snr
Rescales betas to have zero terminal SNR Based on https://arxiv.org/pdf/2305.08891.pdf (Algorithm 1) Args: betas (`torch.FloatTensor`
diffusion/lcm_scheduler.py:89
↓ 1 callers
Method
reset_saved_frames
(self)
diffusion/utils/misc.py:223
↓ 1 callers
Function
resize_and_crop_tensor
(samples: torch.Tensor, new_width: int, new_height: int)
diffusion/model/utils.py:468
↓ 1 callers
Method
sample
Compute the sample at time `t_end` by DPM-Solver, given the initial `x` at time `t_start`. =========================================
diffusion/model/dpm_solver.py:1069
↓ 1 callers
Method
sample_few_steps
For the PC-mode, please refer to the wiki page https://en.wikipedia.org/wiki/Predictor%E2%80%93corrector_method#PEC_mode_and_PECE_mo
diffusion/model/sa_solver.py:755
↓ 1 callers
Method
sample_more_steps
For the PC-mode, please refer to the wiki page https://en.wikipedia.org/wiki/Predictor%E2%80%93corrector_method#PEC_mode_and_PECE_mo
diffusion/model/sa_solver.py:911
↓ 1 callers
Method
sample_subset
(self, ratio)
diffusion/data/datasets/InternalData.py:319
↓ 1 callers
Method
save_frame
(self, frame=None)
diffusion/utils/misc.py:210
↓ 1 callers
Function
save_image
(img, seed='')
app/app_pixart_sigma.py:167
↓ 1 callers
Function
save_image
(img, seed='')
app/app_pixart_dmd.py:152
↓ 1 callers
Function
save_model_card
(repo_id: str, images=None, base_model=str, dataset_name=str, repo_folder=None)
train_scripts/train_pixart_dmd.py:90
↓ 1 callers
Function
save_model_card
(repo_id: str, images=None, base_model=str, dataset_name=str, repo_folder=None)
train_scripts/train_pixart_lora_hf.py:58
↓ 1 callers
Function
save_results
(results, paths, signature, work_dir)
tools/extract_features.py:238
↓ 1 callers
Function
set_env
(seed=0)
scripts/interface.py:59
↓ 1 callers
Function
set_env
(seed=0)
scripts/inference.py:47
↓ 1 callers
Function
set_fsdp_env
()
train_scripts/train.py:37
↓ 1 callers
Function
set_fsdp_env
()
train_scripts/train_pixart_lcm.py:41
↓ 1 callers
Function
set_grad_checkpoint
(model, use_fp32_attention=False, gc_step=1)
diffusion/model/utils.py:28
↓ 1 callers
Method
set_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
diffusion/lcm_scheduler.py:288
↓ 1 callers
Method
singlestep_dpm_solver_update
Singlestep DPM-Solver with the order `order` from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at
diffusion/model/dpm_solver.py:917
↓ 1 callers
Function
small_param_init_fn_
(module: nn.Module, n_layers: int, d_model: int, init_div_is_residual: Union[int, float, str, bool]=True, emb_
diffusion/model/llava/mpt/param_init_fns.py:137
↓ 1 callers
Function
space_timesteps
Create a list of timesteps to use from an original diffusion process, given the number of timesteps we want to take from equally-sized portio
diffusion/model/respace.py:12
↓ 1 callers
Method
step
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
diffusion/lcm_scheduler.py:321
↓ 1 callers
Method
stochastic_adams_bashforth_update
One step for the SA-Predictor. Args: model_output (`torch.FloatTensor`): The direct output from the lear
diffusion/sa_solver_diffusers.py:545
↓ 1 callers
Method
stochastic_adams_moulton_update
One step for the SA-Corrector. Args: this_model_output (`torch.FloatTensor`): The model outputs at `x_t`
diffusion/sa_solver_diffusers.py:626
↓ 1 callers
Method
text_preprocessing
(self, text)
diffusion/model/t5.py:113
← previous
next →
201–300 of 537, ranked by callers