MCPcopy Create free account

hub / github.com/SandAI-org/MAGI-1 / functions

Functions318 in github.com/SandAI-org/MAGI-1

Method__init__
Initialize an instance of the PPScheduler class
inference/infra/parallelism/pipeline_parallel.py:31
Method__init__
(self)
inference/infra/parallelism/tile_parallel.py:23
Method__init__
Initializes an instance of the class. Args: encode_fn (function): The encoding function used for tile sampling.
inference/infra/parallelism/tile_parallel.py:182
Method__init__
(self, ddconfig: dict, model_type: Literal['vit', 'vit_ncthw'] = 'vit')
inference/model/vae/vae_model.py:224
Method__init__
(self)
inference/model/vae/vae_model.py:346
Method__init__
(self, normalized_shape, eps=1e-5, elementwise_affine=True)
inference/model/vae/vae_module.py:230
Method__init__
( self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0, ln_in_attn=Fals
inference/model/vae/vae_module.py:262
Method__init__
( self, dim, num_heads, mlp_ratio=4.0, qkv_bias=False, qk_scal
inference/model/vae/vae_module.py:309
Method__init__
(self, video_size=224, video_length=16, patch_size=16, patch_length=1, in_chans=3, embed_dim=768)
inference/model/vae/vae_module.py:356
Method__init__
( self, video_size=256, video_length=16, patch_size=8, patch_length=4,
inference/model/vae/vae_module.py:413
Method__init__
( self, video_size=256, video_length=16, patch_size=8, patch_length=4,
inference/model/vae/vae_module.py:573
Method__init__
(self, parameters, deterministic=False)
inference/model/vae/vae_module.py:724
Method__init__
(self, config: MagiConfig, pre_process: bool = True, post_process: bool = True)
inference/model/dit/dit_model.py:51
Method__init__
(self, kwargs)
inference/model/dit/dit_model.py:448
Method__init__
(self, model_config: ModelConfig, frequency_embedding_size=256)
inference/model/dit/dit_module.py:55
Method__init__
(self, model_config: ModelConfig)
inference/model/dit/dit_module.py:111
Method__init__
(self, hidden_size, patch_size, t_patch_size, out_channels)
inference/model/dit/dit_module.py:165
Method__init__
(self, model_config: ModelConfig)
inference/model/dit/dit_module.py:178
Method__init__
(self, model_config: ModelConfig, hidden_size: int)
inference/model/dit/dit_module.py:344
Method__init__
( self, input_size: int, output_size_q: int, output_size_kv: int, laye
inference/model/dit/dit_module.py:391
Method__init__
(self, in_features: int, out_features: int, bias=False, dtype=torch.bfloat16, device=None)
inference/model/dit/dit_module.py:433
Method__init__
(self, in_features: int, out_features: int, bias=False, dtype=torch.bfloat16, device=None)
inference/model/dit/dit_module.py:464
Method__init__
( self, dim, max_res=224, temperature=10000, in_pixels=True, l
inference/model/dit/dit_module.py:728
Method__init__
(self, model_config: ModelConfig, engine_config: EngineConfig, layer_number: int)
inference/model/dit/dit_module.py:781
Method__init__
(self, model_config: ModelConfig, engine_config: EngineConfig, layer_number: int)
inference/model/dit/dit_module.py:852
Method__init__
(self, model_config: ModelConfig, engine_config: EngineConfig, layer_number: int = 1)
inference/model/dit/dit_module.py:1259
Method__init__
( self, model_config: ModelConfig, engine_config: EngineConfig, pre_process: bool = True, post_process
inference/model/dit/dit_module.py:1376
Method__init__
( self, device, dir_or_name="t5-v1_1-xxl", *, local_cache=False,
inference/model/t5/t5_model.py:33
Method__init__
Initialize the EventPathTimer. This constructor sets the previous message and time to None, preparing the instance for recor
inference/common/timer.py:31
Method__init__
(self, max_batch_size, max_sequence_length)
inference/common/dataclass.py:66
Method__init__
(self, model: torch.nn.Module, transport_inputs: List[InferenceInput], device: torch.device)
inference/pipeline/video_generate.py:252
Method__init__
(self, config_path)
inference/pipeline/pipeline.py:28
Method__init__
(self)
inference/pipeline/video_process.py:45
Method_init_weights
(self, m)
inference/model/vae/vae_module.py:502
Method_init_weights
(self, m)
inference/model/vae/vae_module.py:664
Function_load_shard
(shard_path, param_names, num_threads=None)
inference/infra/checkpoint/checkpointing.py:35
Methodallow_spatial_tiling
Determines whether spatial tiling is allowed or not. Returns: bool: True if spatial tiling is allowed, False otherwise.
inference/model/vae/vae_model.py:72
Methodallow_spatial_tiling
(self)
inference/model/vae/vae_model.py:332
Methodappend_dims
Appends dimensions to the end of a tensor until it has target_dims dimensions.
inference/pipeline/video_generate.py:316
Methodbatch_to_chunk
(input, denoising_range_num)
inference/model/dit/dit_model.py:442
Methodchunk_to_batch
(input, denoising_range_num)
inference/model/dit/dit_model.py:437
Methoddecode
Abstract method for decoding the input tensor. Args: x (torch.Tensor [N C T H W]): The input tensor to be decoded.
inference/model/vae/vae_model.py:95
Methoddefault
(self, obj)
inference/common/config.py:166
Functiondestroy_model_parallel
Set the groups to none.
inference/infra/distributed/parallel_state.py:637
Methodencode
(self, prompt: str, t5_pretrained_path: str, t5_device: str)
comfyui/comfy_nodes.py:71
Methodencode
Abstract method for encoding the input tensor. Args: x (torch.Tensor [N C T H W] range[-1, 1]): The input tensor to be e
inference/model/vae/vae_model.py:82
Methodencode
Encode the input video. Args: x (torch.Tensor): Input video tensor has shape N C T H W Returns: tup
inference/model/vae/vae_model.py:259
Methodfirst_frame_as_image
Property representing the first frame as image. For tokenizer like CausalVAE, Omnitokenizer, the first frame is treated as image.
inference/model/vae/vae_model.py:59
Methodforward
(self, x, sample_posterior=True)
inference/model/vae/vae_model.py:310
Methodforward
(self, x)
inference/model/vae/vae_module.py:217
Methodforward
(self, x)
inference/model/vae/vae_module.py:236
Methodforward
(self, x, feat_shape=None)
inference/model/vae/vae_module.py:279
Methodforward
(self, x, feat_shape=None)
inference/model/vae/vae_module.py:344
Methodforward
Forward pass of the PatchEmbed module. Args: x (torch.Tensor): Input tensor of shape (B, C, T, H, W), where
inference/model/vae/vae_module.py:378
Methodforward
(self, x)
inference/model/vae/vae_module.py:515
Methodforward
(self, x)
inference/model/vae/vae_module.py:677
Methodforward
(self, t)
inference/model/dit/dit_module.py:94
Methodforward
(self, caption, train, caption_dropout_mask=None)
inference/model/dit/dit_module.py:146
Methodforward
(self, x)
inference/model/dit/dit_module.py:169
Methodforward
(self, c)
inference/model/dit/dit_module.py:193
Methodforward
(self, input: Tensor)
inference/model/dit/dit_module.py:355
Methodforward
(self, input: torch.Tensor)
inference/model/dit/dit_module.py:445
Methodforward
(self, x)
inference/model/dit/dit_module.py:477
Methodforward
(self, hidden_states)
inference/model/dit/dit_module.py:542
Methodforward
( self, hidden_states: torch.Tensor, key_value_states: torch.Tensor, inference
inference/model/dit/dit_module.py:1138
Methodforward
( self, hidden_states: torch.Tensor, condition: torch.Tensor, condition_map: t
inference/model/dit/dit_module.py:1294
Methodforward
( self, hidden_states: Tensor, condition: Tensor, condition_map: Tensor,
inference/model/dit/dit_module.py:1412
Methodforward_dispatcher
(self, x, timestep, y, mask, kv_range, inference_params, **kwargs)
inference/model/dit/dit_model.py:501
Methodfreeze_pretrain
(self)
inference/model/vae/vae_module.py:561
Methodfull_attention
(self, bs: int, meta_args: ModelMetaArgs, q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, i: int)
inference/model/dit/dit_module.py:1068
Methodget_attn_and_xattn_with_comm_overlap
Get Q, K, V with communication overlap. Input: get_q: Callable, function to get q, shape [b, sq, hn, hd] get_
inference/infra/parallelism/context_parallel.py:457
Functionget_cp_rank
Return my rank for the context parallel group.
inference/infra/distributed/parallel_state.py:629
Functionget_cp_world_size
Return world size for the context parallel group.
inference/infra/distributed/parallel_state.py:621
Functionget_device
(local_rank=None)
inference/infra/distributed/dist_utils.py:81
Functionget_dp_group_gloo
Get the data parallel group-gloo the caller rank belongs to.
inference/infra/distributed/parallel_state.py:487
Functionget_dp_rank
Return my rank for the data parallel group.
inference/infra/distributed/parallel_state.py:613
Functionget_dp_world_size
Return world size for the data parallel group.
inference/infra/distributed/parallel_state.py:605
Methodget_last_layer
Get the last layer of the decoder. Returns: torch.Tensor: Last layer of the decoder.
inference/model/vae/vae_model.py:322
Functionget_model_parallel_group
Get the model parallel group the caller rank belongs to.
inference/infra/distributed/parallel_state.py:449
Functionget_pipeline_model_parallel_first_rank
Return the global rank of the first process in the pipeline for the current tensor parallel group
inference/infra/distributed/parallel_state.py:574
Functionget_pipeline_model_parallel_last_rank
Return the global rank of the last process in the pipeline for the current tensor parallel group
inference/infra/distributed/parallel_state.py:581
Functionget_pipeline_model_parallel_next_rank
Return the global rank that follows the caller in the pipeline
inference/infra/distributed/parallel_state.py:589
Functionget_pipeline_model_parallel_prev_rank
Return the global rank that preceeds the caller in the pipeline
inference/infra/distributed/parallel_state.py:597
Methodget_qkv
(self, mixed_qqkv: torch.Tensor, cos_emb: torch.Tensor, sin_emb: torch.Tensor)
inference/model/dit/dit_module.py:998
Functionget_tensor_model_parallel_last_rank
Calculate the global rank corresponding to the first local rank in the tensor model parallel group.
inference/infra/distributed/parallel_state.py:561
Functionget_tensor_model_parallel_ranks
Return all global ranks for the tensor model parallel group.
inference/infra/distributed/parallel_state.py:549
Functionget_tensor_model_parallel_src_rank
Calculate the global rank corresponding to the first local rank in the tensor model parallel group.
inference/infra/distributed/parallel_state.py:536
Functionget_tp_rank
Return my rank for the tensor model parallel group.
inference/infra/distributed/parallel_state.py:516
Functionget_tp_world_size
Return world size for the tensor model parallel group.
inference/infra/distributed/parallel_state.py:506
Functionget_world_size
()
inference/infra/distributed/dist_utils.py:73
Methodget_xqkv
(self, mixed_qqkv: torch.Tensor, key_value_states: torch.Tensor)
inference/model/dit/dit_module.py:1005
Methodinit_from_ckpt
(self, path, ignore_keys=list())
inference/model/vae/vae_model.py:256
Functioninitialize_model_parallel
Initialize model data parallel groups. Borrow from: https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/parallel_state.py Args:
inference/infra/distributed/parallel_state.py:236
Functionis_last_rank
()
inference/infra/distributed/dist_utils.py:65
Functionis_pipeline_first_stage
Return True if in the first pipeline model-parallel stage, False otherwise.
inference/infra/distributed/parallel_state.py:526
Functionis_pipeline_last_stage
Return True if in the last pipeline model-parallel stage, False otherwise.
inference/infra/distributed/parallel_state.py:531
Functionis_unitialized
Check if parallel state has been initialized Deprecated. Use is_initialized instead.
inference/infra/distributed/parallel_state.py:432
Methodkl
(self, other=None)
inference/model/vae/vae_module.py:738
Methodload
(self, prompt)
comfyui/comfy_nodes.py:45
Methodload
(self, video_path)
comfyui/comfy_nodes.py:114
← previousnext →201–300 of 318, ranked by callers