MCPcopy Create free account

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

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

↓ 1 callersMethodcore_attention
(self, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, bs: int, meta_args: ModelMetaArgs)
inference/model/dit/dit_module.py:1023
↓ 1 callersFunctioncp_post_process
(cp_size: int, cp_strategy: str, x: torch.Tensor, meta_args: ModelMetaArgs)
inference/infra/parallelism/context_parallel.py:364
↓ 1 callersFunctioncp_pre_process
This function is used to handle context parallel behavior, split input tensors into multiple parts and scatter them to different GPUs. I
inference/infra/parallelism/context_parallel.py:308
↓ 1 callersFunctioncp_shuffle_overlap_process
( cp_size: int, x: torch.Tensor, condition_map: torch.Tensor, rope: torch.Tensor, xattn_ma
inference/infra/parallelism/context_parallel.py:257
↓ 1 callersFunctioncp_ulysses_process
( cp_size: int, x: torch.Tensor, condition_map: torch.Tensor, rope: torch.Tensor, xattn_ma
inference/infra/parallelism/context_parallel.py:227
↓ 1 callersMethoddecode
Decode the quantized tensor. Args: quant (torch.Tensor): Quantized tensor. Returns: torch.Tensor: D
inference/model/vae/vae_model.py:290
↓ 1 callersFunctiondecode_chunk
(chunk, vae_ckpt, scale_factor, tile_sample_min_length, parallel_group)
inference/pipeline/video_process.py:347
↓ 1 callersMethodencode
Encode the input tensor. Args: video (torch.Tensor): Input tensor with shape (N, T, C, H, W). vae (VideoToken
inference/pipeline/video_process.py:112
↓ 1 callersFunctionevent_path_timer
Get the current EventPathTimer instance. Returns: EventPathTimer: The current EventPathTimer instance. Raises: AssertionErro
inference/common/timer.py:75
↓ 1 callersFunctionextract_feature_for_inference
( model: torch.nn.Module, prefix_video: torch.Tensor, caption_embs: torch.Tensor, emb_masks: torch.Tensor
inference/pipeline/video_generate.py:83
↓ 1 callersMethodextract_prefix_video_feature
Non-Const Method
inference/pipeline/video_generate.py:389
↓ 1 callersFunctionffmpeg_i2v
(image_path, w=384, h=224, aspect_policy="fit")
inference/pipeline/video_process.py:207
↓ 1 callersFunctionffmpeg_v2v
(video_path, fps, w=384, h=224, prefix_frame=None, prefix_video_max_chunk=5)
inference/pipeline/video_process.py:233
↓ 1 callersMethodforward_3cfg
Forward pass of PixArt, but also batches the unconditional forward pass for classifier-free guidance.
inference/model/dit/dit_model.py:400
↓ 1 callersMethodforward_k
(self, hidden_states)
inference/model/dit/dit_module.py:421
↓ 1 callersMethodforward_ln
(self, hidden_states)
inference/model/dit/dit_module.py:412
↓ 1 callersMethodforward_post_process
(self, x, meta_args: ModelMetaArgs)
inference/model/dit/dit_model.py:342
↓ 1 callersMethodforward_pre_process
( self, x, t, y, caption_dropout_mask=None, xattn_mask=None, kv_range=None, **kwargs )
inference/model/dit/dit_model.py:264
↓ 1 callersMethodforward_q
(self, hidden_states)
inference/model/dit/dit_module.py:415
↓ 1 callersMethodforward_qx
(self, hidden_states)
inference/model/dit/dit_module.py:418
↓ 1 callersMethodforward_v
(self, hidden_states)
inference/model/dit/dit_module.py:424
↓ 1 callersFunctionfreq_bands
( num_bands: int, temperature: float = 10000.0, step: int = 2, device: Optional[torch.device] = None )
inference/model/vae/vae_module.py:55
↓ 1 callersFunctionfused_qkv_communication
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, cp_split_sizes: List[int] )
inference/infra/parallelism/context_parallel.py:426
↓ 1 callersMethodgating_and_mlp
( self, hidden_states: torch.Tensor, residual: torch.Tensor, condition: torch.Tensor, condition_map: t
inference/model/dit/dit_module.py:1348
↓ 1 callersMethodgenerate_default_kvrange
Const Method
inference/pipeline/video_generate.py:454
↓ 1 callersMethodgenerate_kvrange_for_denoising_video
Const Method
inference/pipeline/video_generate.py:510
↓ 1 callersMethodgenerate_kvrange_for_prefix_video
Const Method
inference/pipeline/video_generate.py:371
↓ 1 callersFunctiongenerate_masked_orthogonal_rank_groups
Generate orthogonal parallel groups based on the parallel size and mask. Arguments: world_size (int): world size parallel_size (
inference/infra/distributed/parallel_state.py:86
↓ 1 callersMethodgenerate_noise2clean_kvrange
Const Method
inference/pipeline/video_generate.py:467
↓ 1 callersFunctiongenerate_sequences
(chunk_num, window_size, chunk_offset)
inference/pipeline/video_generate.py:164
↓ 1 callersMethodget_attn_and_xattn_with_fused_kv_comm
When seq_len is very small, CPU-bound issues are severe. By fusing kv communication, CPU operations and the number of kernel launches
inference/infra/parallelism/context_parallel.py:503
↓ 1 callersMethodget_attn_and_xattn_with_fused_qkv_comm
By fusing the communication of q, k, and v together, further optimize CPU-bound issues.
inference/infra/parallelism/context_parallel.py:529
↓ 1 callersMethodget_cfg_scale
(self, t, cfg_t_range, prev_chunk_scale_s, text_scale_s)
inference/model/dit/dit_model.py:496
↓ 1 callersMethodget_default_bands
(self)
inference/model/dit/dit_module.py:748
↓ 1 callersMethodget_denoise_step_of_each_chunk
( self, infer_idx: int, denoise_step_per_stage: int, t_start: int, t_e
inference/pipeline/video_generate.py:343
↓ 1 callersMethodget_embed
(self, shape: Optional[List[int]], ref_feat_shape: Optional[List[int]] = None)
inference/model/dit/dit_module.py:757
↓ 1 callersMethodget_embedding_and_meta
Forward embedding and meta for VideoDiT. NOTE: This function should only handle single card behavior. Input: x:
inference/model/dit/dit_model.py:115
↓ 1 callersMethodget_kv
(self, mixed_qqkv: torch.Tensor, cos_emb: torch.Tensor, sin_emb: torch.Tensor)
inference/model/dit/dit_module.py:991
↓ 1 callersMethodget_logger
(cls, name=__name__, level=logging.INFO)
inference/common/logger.py:24
↓ 1 callersMethodget_mask
(self, order: str, token: str)
inference/infra/distributed/parallel_state.py:213
↓ 1 callersFunctionget_negative_special_token_keys
()
inference/pipeline/prompt_process.py:86
↓ 1 callersMethodget_q
(self, mixed_qqkv: torch.Tensor, cos_emb: torch.Tensor, sin_emb: torch.Tensor)
inference/model/dit/dit_module.py:953
↓ 1 callersFunctionget_special_token_keys
()
inference/pipeline/prompt_process.py:67
↓ 1 callersMethodget_text_embeddings
(self, texts)
inference/model/t5/t5_model.py:129
↓ 1 callersFunctioninit_intervel
Init intervel
inference/pipeline/video_generate.py:225
↓ 1 callersFunctioninit_pp_scheduler
Initialize the PPScheduler instance. Raises: AssertionError: If the PPScheduler is already initialized.
inference/infra/parallelism/pipeline_parallel.py:102
↓ 1 callersFunctioninit_t
Init Timestep and Transform t
inference/pipeline/video_generate.py:183
↓ 1 callersMethodinit_work_queue
(self)
inference/pipeline/video_generate.py:277
↓ 1 callersMethodintegrate
Non-Const Method
inference/pipeline/video_generate.py:529
↓ 1 callersMethodintegrate_velocity
(self, infer_idx: int, cur_denoise_step: int)
inference/pipeline/video_generate.py:670
↓ 1 callersFunctionis_initialized
Useful for code segments that may be accessed with or without mpu initialization
inference/infra/distributed/parallel_state.py:427
↓ 1 callersFunctionis_last_tp_cp_rank
()
inference/infra/distributed/dist_utils.py:69
↓ 1 callersFunctionload_checkpoint
(model)
inference/infra/checkpoint/checkpointing.py:158
↓ 1 callersFunctionload_sharded_safetensors_parallel_with_progress
(checkpoint_dir)
inference/infra/checkpoint/checkpointing.py:68
↓ 1 callersFunctionload_state_dict
(runtime_config: RuntimeConfig, engine_config: EngineConfig)
inference/infra/checkpoint/checkpointing.py:140
↓ 1 callersFunctionmain
()
inference/pipeline/entry.py:34
↓ 1 callersFunctionndgrid
generate N-D grid in dimension order. The ndgrid function is like meshgrid except that the order of the first two input arguments are switched.
inference/model/vae/vae_module.py:31
↓ 1 callersFunctionndgrid
generate N-D grid in dimension order. The ndgrid function is like meshgrid except that the order of the first two input arguments are switched.
inference/model/dit/dit_module.py:557
↓ 1 callersMethodoverlap
(self, fattn, qs, k, v)
inference/infra/parallelism/context_parallel.py:637
↓ 1 callersFunctionpad_duration_token_keys
(special_token_keys: List[str])
inference/pipeline/prompt_process.py:58
↓ 1 callersFunctionparse_arguments
()
inference/pipeline/entry.py:21
↓ 1 callersFunctionpixel_freq_bands
( num_bands: int, max_freq: float = 224.0, linear_bands: bool = True, device: Optional[torch.device] = Non
inference/model/vae/vae_module.py:63
↓ 1 callersMethodqueue_irecv_prev_data
Get a tensor from the receive queue and wait for the receive operation to complete. Returns: torch.Tensor: The received tensor ob
inference/infra/parallelism/pipeline_parallel.py:88
↓ 1 callersFunctionrange_mod_triton
Inputs: x: (s, b, h). Tensor of inputs embedding (images or latent representations of images) c_mapping: (s, b). Tensor of condit
inference/model/dit/dit_module.py:238
↓ 1 callersMethodrecv_prev_data
Receive data from the previous pipeline and return the received tensor. Args: shape (torch.Size): The shape of the tensor to rece
inference/infra/parallelism/pipeline_parallel.py:63
↓ 1 callersMethodrun_image_to_video
(self, prompt: str, image_path: str, output_path: str)
inference/pipeline/pipeline.py:37
↓ 1 callersMethodrun_text_to_video
(self, prompt: str, output_path: str)
inference/pipeline/pipeline.py:34
↓ 1 callersMethodrun_video_to_video
(self, prompt: str, prefix_video_path: str, output_path: str)
inference/pipeline/pipeline.py:41
↓ 1 callersMethodset_environ_variables
(self)
comfyui/comfy_nodes.py:145
↓ 1 callersMethodset_input_tensor
Set input tensor to be used instead of forward()'s input. When doing pipeline parallelism the input from the previous stage comes fro
inference/model/dit/dit_module.py:1401
↓ 1 callersFunctionsoftcap
(x: torch.Tensor, cap: int)
inference/model/dit/dit_module.py:360
↓ 1 callersMethodsplit_query_for_overlap
(self, query)
inference/infra/parallelism/context_parallel.py:629
↓ 1 callersFunctionsplit_tensor_along_last_dim
Split a tensor along its last dimension. Args: tensor: input tensor. num_partitions: number of partitions to split the tensor
inference/model/dit/dit_module.py:825
↓ 1 callersMethodsynced_record
Record the current time with a message. Args: message (str): A message to log along with the current time. This
inference/common/timer.py:51
↓ 1 callersFunctiont_resolution_transform
(x, shift=3.0)
inference/pipeline/video_generate.py:198
↓ 1 callersFunctiont_transform
(x)
inference/pipeline/video_generate.py:213
↓ 1 callersMethodtext_preprocessing
(self, text)
inference/model/t5/t5_model.py:152
↓ 1 callersMethodtiled_decode
(self, z: torch.FloatTensor, verbose: bool = False)
inference/infra/parallelism/tile_parallel.py:348
↓ 1 callersMethodtiled_decode_3d
Decodes the input tensor using the tile autoencoder. Args: x (torch.Tensor): The input tensor to be decoded.
inference/model/vae/vae_model.py:180
↓ 1 callersMethodtiled_encode
(self, x: torch.FloatTensor, verbose: bool = False)
inference/infra/parallelism/tile_parallel.py:254
↓ 1 callersMethodtiled_encode_3d
Encodes the input tensor `x` using tiled encoding. Args: x (torch.Tensor shape:[N C T H W]): The input tensor to be enco
inference/model/vae/vae_model.py:138
↓ 1 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These ma
inference/model/dit/dit_module.py:74
↓ 1 callersMethodtotal_forward_step
(self, infer_idx: int)
inference/pipeline/video_generate.py:573
↓ 1 callersMethodtry_pad_prefix_video
Non-Const Method
inference/pipeline/video_generate.py:435
↓ 1 callersMethodunpatchify
(self, x, H, W)
inference/model/dit/dit_model.py:103
↓ 1 callersFunctionunwrap_model
(model)
inference/infra/checkpoint/checkpointing.py:101
↓ 1 callersMethodwalk
(self)
inference/pipeline/video_generate.py:721
MethodINPUT_TYPES
(s)
comfyui/comfy_nodes.py:33
MethodINPUT_TYPES
(s)
comfyui/comfy_nodes.py:51
MethodINPUT_TYPES
(s)
comfyui/comfy_nodes.py:84
MethodINPUT_TYPES
(s)
comfyui/comfy_nodes.py:103
MethodINPUT_TYPES
(s)
comfyui/comfy_nodes.py:121
MethodINPUT_TYPES
(s)
comfyui/comfy_nodes.py:212
Method__call__
(cls, *args, **kwargs)
inference/pipeline/video_process.py:38
Method__enter__
(self)
inference/model/dit/dit_model.py:457
Method__exit__
(self, exc_type, exc_val, exc_tb)
inference/model/dit/dit_model.py:463
Method__init__
(self, tp: int, dp: int, pp: int, cp: int, order: str)
inference/infra/distributed/parallel_state.py:193
Method__init__
(self)
inference/infra/parallelism/context_parallel.py:90
Method__init__
(self)
inference/infra/parallelism/context_parallel.py:453
Method__init__
(self, cp_shuffle_num, cp_world_size, cp_split_sizes)
inference/infra/parallelism/context_parallel.py:624
← previousnext →101–200 of 318, ranked by callers