MCPcopy Create free account

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

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

↓ 1 callersMethodtoken_drop
Drops labels to enable classifier-free guidance.
diffusion/model/nets/PixArt_blocks.py:359
↓ 1 callersMethodtoken_drop
Drops labels to enable classifier-free guidance.
diffusion/model/nets/PixArt_blocks.py:389
↓ 1 callersMethodtoken_drop
Drops labels to enable classifier-free guidance.
diffusion/model/nets/PixArt_blocks.py:422
↓ 1 callersFunctiontokenize_captions
(examples, is_train=True, proportion_empty_prompts=0., max_length=120)
train_scripts/train_pixart_lora_hf.py:672
↓ 1 callersMethodtrace_frames
(self)
diffusion/utils/misc.py:219
↓ 1 callersFunctiontrain
()
train_scripts/train.py:125
↓ 1 callersFunctiontrain
()
train_scripts/train_pixart_lcm.py:176
↓ 1 callersFunctiontrain_dreambooth
(pretrained_model_path, images_folder, captions_folder,
train_scripts/train_dreambooth_lora.py:356
↓ 1 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
diffusion/model/nets/PixArtMS.py:236
↓ 1 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
diffusion/model/nets/PixArt.py:199
↓ 1 callersMethodupdate_fn
(p, grad, exp_avg, lr, wd, beta1, beta2)
diffusion/utils/optimizer.py:191
↓ 1 callersMethodupdate_with_all_losses
Update the reweighting using losses from a model. Sub-classes should override this method to update the reweighting using los
diffusion/model/timestep_sampler.py:106
↓ 1 callersFunctionvalidation_and_save
(pretrained_model_path : str, transformer, validation_prompt : str, val_embeds, generator, output_folder, epoc
train_scripts/train_dreambooth_lora.py:318
↓ 1 callersFunctionvisualize
(items, bs, sample_steps, cfg_scale)
scripts/inference.py:54
↓ 1 callersMethodweights
Get a numpy array of weights, one per diffusion step. The weights needn't be normalized, but must be positive.
diffusion/model/timestep_sampler.py:38
↓ 1 callersFunctionwrite_entry
(json_entries, folder, image_path, caption_path, image_filename, intern_imgs_path)
tools/convert_images_to_json.py:63
Method__call__
(self, x, timestep, **kwargs)
diffusion/model/respace.py:129
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_stat
scripts/DMD/transformer_train/attention_processor.py:9
Method__enter__
(self)
diffusion/model/utils.py:385
Method__exit__
(self, exc_type, exc_value, traceback)
diffusion/model/utils.py:388
Method__getattr__
(self, name)
diffusion/data/datasets/InternalData.py:156
Method__getattr__
(self, name)
diffusion/data/datasets/InternalData.py:326
Method__getitem__
(self, idx)
tools/extract_features.py:91
Method__getitem__
(self, idx)
diffusion/data/datasets/InternalData.py:114
Method__getitem__
(self, idx)
diffusion/data/datasets/InternalData.py:282
Method__getitem__
(self, idx)
diffusion/data/datasets/InternalData_ms.py:162
Method__getitem__
(self, idx)
diffusion/data/datasets/InternalData_ms.py:343
Method__getitem__
(self, idx)
diffusion/data/datasets/dmd.py:177
Method__getitem__
(self, idx)
train_scripts/train_dreambooth_lora.py:267
Method__init__
(self, root, # Notice: need absolute path here image_list_json=['data_info.
tools/extract_features.py:37
Method__init__
( self, num_train_timesteps: int = 1000, beta_start: float = 0.0001,
diffusion/lcm_scheduler.py:176
Method__init__
(self, model, noise_schedule="linear", diffusion_steps=1000,
diffusion/sa_sampler.py:11
Method__init__
( self, num_train_timesteps: int = 1000, beta_start: float = 0.0001,
diffusion/sa_solver_diffusers.py:139
Method__init__
(self, *args, **kwargs)
diffusion/utils/data_sampler.py:80
Method__init__
(self, num_tasks, log_interval=1, desc="Process")
diffusion/utils/misc.py:86
Method__init__
(self, model, max_frames_to_save=21, trace_batch_nums=[], abort_after_batch_num=None)
diffusion/utils/misc.py:193
Method__init__
(self, *args, **kwargs)
diffusion/utils/optimizer.py:244
Method__init__
Create a wrapper class for the forward SDE (VP type). *** Update: We support discrete-time diffusion models by implementing a picewis
diffusion/model/dpm_solver.py:6
Method__init__
Construct a DPM-Solver. We support both DPM-Solver (`algorithm_type="dpmsolver"`) and DPM-Solver++ (`algorithm_type="dpmsolver++"`).
diffusion/model/dpm_solver.py:340
Method__init__
(self, diffusion)
diffusion/model/timestep_sampler.py:63
Method__init__
(self, diffusion, history_per_term=10, uniform_prob=0.001)
diffusion/model/timestep_sampler.py:121
Method__init__
(self, device, seeds)
diffusion/model/utils.py:426
Method__init__
(self, device, dir_or_name='t5-v1_1-xxl', *, local_cache=False, cache_dir=None, hf_token=None, use_text_prepro
diffusion/model/t5.py:18
Method__init__
Thanks to DPM-Solver for their code base
diffusion/model/sa_solver.py:8
Method__init__
Construct a SA-Solver The default value for algorithm_type is "data_prediction" and we recommend not to change it to "noise_
diffusion/model/sa_solver.py:326
Method__init__
( self, *, betas, model_mean_type, model_var_type, loss_type,
diffusion/model/gaussian_diffusion.py:154
Method__init__
(self, use_timesteps, **kwargs)
diffusion/model/respace.py:73
Method__init__
( self, patch_size=16, in_chans=3, embed_dim=768,
diffusion/model/nets/PixArtMS.py:25
Method__init__
(self, hidden_size, num_heads, mlp_ratio=4.0, drop_path=0., input_size=None, sampling=None, s
diffusion/model/nets/PixArtMS.py:54
Method__init__
(self, hidden_size, num_heads, mlp_ratio=4.0, drop_path=0, input_size=None, sampling=None, sr
diffusion/model/nets/PixArt.py:30
Method__init__
(self, d_model, num_heads, attn_drop=0., proj_drop=0., **block_kwargs)
diffusion/model/nets/PixArt_blocks.py:29
Method__init__
Args: dim (int): Number of input channels. num_heads (int): Number of attention heads. qkv_bias (bool: I
diffusion/model/nets/PixArt_blocks.py:64
Method__init__
(self, hidden_size, patch_size, out_channels)
diffusion/model/nets/PixArt_blocks.py:210
Method__init__
(self, final_hidden_size, c_emb_size, patch_size, out_channels)
diffusion/model/nets/PixArt_blocks.py:229
Method__init__
(self, hidden_size, decoder_hidden_size)
diffusion/model/nets/PixArt_blocks.py:249
Method__init__
(self, hidden_size, frequency_embedding_size=256)
diffusion/model/nets/PixArt_blocks.py:272
Method__init__
(self, hidden_size, frequency_embedding_size=256)
diffusion/model/nets/PixArt_blocks.py:317
Method__init__
(self, num_classes, hidden_size, dropout_prob)
diffusion/model/nets/PixArt_blocks.py:352
Method__init__
(self, in_channels, hidden_size, uncond_prob, act_layer=nn.GELU(approximate='tanh'), token_num=120)
diffusion/model/nets/PixArt_blocks.py:383
Method__init__
(self, in_channels, hidden_size, uncond_prob, act_layer=nn.GELU(approximate='tanh'), token_num=120)
diffusion/model/nets/PixArt_blocks.py:415
Method__init__
(self, config)
diffusion/model/llava/llava_mpt.py:176
Method__init__
(self, d_model: int, n_heads: int, expansion_ratio: int, attn_config: Dict={'attn_type': 'multihead_attention'
diffusion/model/llava/mpt/blocks.py:22
Method__init__
(self, config: MPTConfig)
diffusion/model/llava/mpt/modeling_mpt.py:219
Method__init__
The MPT configuration class. Args: d_model (int): The size of the embedding dimension of the model. n_heads (int): Th
diffusion/model/llava/mpt/configuration_mpt.py:10
Method__init__
(self, normalized_shape, eps=1e-05, elementwise_affine=True, device=None, dtype=None)
diffusion/model/llava/mpt/norm.py:16
Method__init__
(self, normalized_shape, eps=1e-05, weight=True, dtype=None, device=None)
diffusion/model/llava/mpt/norm.py:48
Method__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:181
Method__init__
(self, root, image_list_json='data_info.json', transform=No
diffusion/data/datasets/InternalData.py:23
Method__init__
(self, root, image_list_json='data_info.json', transform=No
diffusion/data/datasets/InternalData.py:163
Method__init__
(self, root, image_list_json='data_info.json', transform=No
diffusion/data/datasets/InternalData_ms.py:22
Method__init__
(self, root, image_list_json='data_info.json', transform=No
diffusion/data/datasets/InternalData_ms.py:174
Method__init__
:param root: the root of saving txt features ./data/data/ :param latent_root: the root of saving latent image pairs :param im
diffusion/data/datasets/dmd.py:22
Method__init__
(self, output_folder : str, class_id : str, unique_id : str, batch_size : int, num_repeats)
train_scripts/train_dreambooth_lora.py:249
Method__init__
(self, alpha_cumprods, timesteps=1000, ddim_timesteps=50)
train_scripts/train_pixart_lcm.py:78
Method__init__
( self, tokenizer: T5Tokenizer, text_encoder: T5EncoderModel,
scripts/diffusers_patches.py:484
Method__iter__
(self)
diffusion/utils/data_sampler.py:51
Method__iter__
(self)
diffusion/utils/data_sampler.py:98
Method__len__
(self)
diffusion/lcm_scheduler.py:457
Method__len__
(self)
diffusion/sa_solver_diffusers.py:855
Method__len__
(self)
diffusion/data/datasets/InternalData.py:153
Method__len__
(self)
diffusion/data/datasets/InternalData.py:323
Method__len__
(self)
diffusion/data/datasets/dmd.py:103
Method__len__
(self)
train_scripts/train_dreambooth_lora.py:264
Method_basic_init
(module)
diffusion/model/nets/PixArtMS.py:252
Method_basic_init
(module)
diffusion/model/nets/PixArt.py:216
Method_get_variance
(self, timestep, prev_timestep)
diffusion/lcm_scheduler.py:244
Function_inner
(folder)
scripts/DMD/transformer_train/utils.py:84
Method_register_forward_hook
(self, module)
diffusion/utils/misc.py:290
Method_reorder_cache
Used by HuggingFace generate when using beam search with kv-caching. See https://github.com/huggingface/transformers/blob/3ec7a47664ebe40c40f
diffusion/model/llava/mpt/modeling_mpt.py:299
Method_scale_timesteps
(self, t)
diffusion/model/respace.py:117
Method_set_gradient_checkpointing
(self, module, value=False)
diffusion/model/llava/llava_mpt.py:195
Method_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
diffusion/lcm_scheduler.py:255
Functionablation_sampler
( net, latents, class_labels=None, cfg_scale=None, feat=None, randn_like=torch.randn_like, num
diffusion/model/edm_sample.py:54
Methodactivation_checkpointing_fn
(self, module)
diffusion/model/llava/mpt/modeling_mpt.py:214
Methodactivation_checkpointing_fn
(self, module)
diffusion/model/llava/mpt/modeling_mpt.py:275
Functionadd_decomposed_rel_pos
Calculate decomposed Relative Positional Embeddings from :paper:`mvitv2`. https://github.com/facebookresearch/mvit/blob/19786631e330df9f3622e
diffusion/model/utils.py:154
Methodadd_noise
( self, original_samples: torch.FloatTensor, noise: torch.FloatTensor,
diffusion/sa_solver_diffusers.py:832
Methodadd_noise
Compute the noised input xt = alpha_t * x + sigma_t * noise. Args: x: A `torch.Tensor` with shape `(batch_size, *shape)`
diffusion/model/dpm_solver.py:1033
Methodadd_params
Add all parameters of module to the params list. The parameters of the given module will be added to the list of param groups, with s
diffusion/utils/optimizer.py:34
Functionall_gather
Run all_gather on arbitrary picklable data (not necessarily tensors) Args: data: any picklable object Returns: list[data]
diffusion/utils/dist_utils.py:85
← previousnext →301–400 of 537, ranked by callers