MCPcopy Create free account

hub / github.com/TMElyralab/MuseV / functions

Functions388 in github.com/TMElyralab/MuseV

↓ 41 callersMethodkeys
key
musev/utils/register.py:42
↓ 22 callersMethod__init__
(self, name: str = None)
musev/auto_prompt/attributes/human.py:52
↓ 22 callersFunctionalign_repeat_tensor_single_dim
沿着 dim 纬度, 补齐 src 的长度到目标 target_length。 当 src 长度不如 target_length 时, 取其中 前 n_src_base_length 然后 repeat 到 target_length align length of src to
musev/data/data_util.py:605
↓ 14 callersMethodfrom_pretrained
( cls, pretrained_model_path, conditioning_embedding_channels: int, conditioni
musev/models/controlnet.py:374
↓ 13 callersFunctionassign_to_checkpoint
This does the final conversion step: take locally converted weights and apply a global renaming to them. It splits attention layers, and take
musev/utils/convert_from_ckpt.py:152
↓ 9 callersFunctionbatch_adain_conditioned_tensor
_summary_ Args: tensor (torch.Tensor): b c t h w src_index (torch.LongTensor): _description_ dst_index (torch.LongTensor)
musev/data/data_util.py:550
↓ 7 callersFunctionvideo_fusion_noise
( tensor: torch.Tensor = None, shape: Tuple[int] = None, dtype: torch.dtype = None, device: to
musev/utils/noise_util.py:31
↓ 6 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
musev/models/unet_2d_blocks.py:1424
↓ 6 callersFunction_copy_linear
(hf_linear, pt_linear)
musev/utils/convert_from_ckpt.py:679
↓ 6 callersMethod_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
musev/schedulers/scheduling_dpmsolver_multistep.py:291
↓ 6 callersFunctionbatch_index_select
_summary_ Args: tensor (torch.Tensor): D1*D2*D3*D4... index (torch.LongTensor): D1*N or N, N<= tensor.shape[dim] dim (int
musev/data/data_util.py:413
↓ 6 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
musev/utils/convert_from_ckpt.py:63
↓ 5 callersMethod__init__
( self, query_dim: int, cross_attention_dim: int | None = None, heads: int = 8
musev/models/attention_processor.py:59
↓ 5 callersFunctionmultiply_range
(start_position, multiplier)
musev/utils/text_emb_util.py:74
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
musev/utils/convert_from_ckpt.py:53
↓ 4 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
musev/models/unet_3d_blocks.py:1257
↓ 4 callersFunctionbatch_concat_two_tensor_with_index
( data1: torch.Tensor, data1_index: torch.LongTensor, data2: torch.Tensor, data2_index: torch.
musev/data/data_util.py:285
↓ 4 callersFunctionget_negative_prompt
(negative_prompt, cfg_path=None, n: int = 10)
scripts/inference/video2video.py:895
↓ 4 callersFunctionget_negative_prompt
(negative_prompt, cfg_path=None, n: int = 10)
scripts/inference/text2video.py:780
↓ 4 callersFunctionget_negative_prompt
(negative_prompt, cfg_path=None, n: int = 10)
scripts/gradio/gradio_video2video.py:409
↓ 4 callersFunctionget_negative_prompt
(negative_prompt, cfg_path=None, n: int = 10)
scripts/gradio/gradio_text2video.py:381
↓ 4 callersFunctionload_facein_extractor_and_proj_by_name
( model_name: str, ip_ckpt: Tuple[str, nn.Module], ip_image_encoder: Tuple[str, nn.Module] = None,
musev/models/facein_loader.py:94
↓ 4 callersFunctionload_ip_adapter_face_extractor_and_proj_by_name
( model_name: str, ip_ckpt: Tuple[str, nn.Module], ip_image_encoder: Tuple[str, nn.Module] = None,
musev/models/ip_adapter_face_loader.py:98
↓ 4 callersFunctionload_ip_adapter_image_proj_by_name
( model_name: str, ip_ckpt: Tuple[str, nn.Module] = None, cross_attention_dim: int = 768, clip
musev/models/ip_adapter_loader.py:71
↓ 4 callersFunctionload_referencenet_by_name
通过模型名字 初始化 referencenet,载入预训练参数, 如希望后续通过简单名字就可以使用预训练模型,需要在这里完成定义 init referencenet with model_name. if you want to use pretrai
musev/models/referencenet_loader.py:84
↓ 4 callersFunctionload_unet_by_name
通过模型名字 初始化Unet,载入预训练参数. init unet with model_name. 如希望后续通过简单名字就可以使用预训练模型,需要在这里完成定义 if you want to use pretrained model with simple nam
musev/models/unet_loader.py:206
↓ 4 callersFunctionload_vision_clip_encoder_by_name
( ip_image_encoder: Tuple[str, nn.Module] = None, dtype: torch.dtype = torch.float16, device: str
musev/models/ip_adapter_loader.py:52
↓ 4 callersFunctionread_image_and_name
(path)
scripts/inference/video2video.py:971
↓ 4 callersFunctionread_image_and_name
(path)
scripts/inference/text2video.py:856
↓ 4 callersFunctionread_image_and_name
(path)
scripts/gradio/gradio_video2video.py:486
↓ 4 callersFunctionread_image_and_name
(path)
scripts/gradio/gradio_text2video.py:458
↓ 4 callersFunctionrenew_vae_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
musev/utils/convert_from_ckpt.py:85
↓ 4 callersFunctionsave_videos_grid_with_opencv
存储tensor视频为gif、mp4等 Args: videos (Union[torch.Tensor, np.ndarray]): 五维视频tensor, 如 b c t h w,值范围[0-1] path (str): 视频存储路径,后缀会影响存储方式
musev/utils/util.py:135
↓ 4 callersMethodset_skip_temporal_layers
( self, valid: bool, )
musev/models/unet_3d_condition.py:1639
↓ 3 callersFunctionconvert_2D_to_3D
( module_names, valid_modules=( "CrossAttnDownBlock2D", "CrossAttnUpBlock2D",
musev/models/unet_3d_condition.py:140
↓ 3 callersFunctionfuse_part_tensor
fuse overstep tensor with weight of src into dst out = src_fused_part * weight + dst * (1-weight) for overlap Args: src (torch.Tensor
musev/data/data_util.py:655
↓ 3 callersFunctiononline_t2v_inference
( prompt, image_np, seed, fps, w, h, video_len, img_edge_ratio: float = 1.0,
scripts/gradio/gradio_text2video.py:614
↓ 3 callersFunctiononline_v2v_inference
( prompt, image_np, video, processor, seed, fps, w, h, video_length, i
scripts/gradio/gradio_video2video.py:646
↓ 3 callersMethodprepare_image
( self, image, # b c t h w batch_size, num_images_per_prompt, device,
musev/pipelines/pipeline_controlnet.py:433
↓ 3 callersFunctionrenew_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
musev/utils/convert_from_ckpt.py:101
↓ 3 callersFunctionrepeat_index_to_target_size
( index: torch.LongTensor, target_size: int )
musev/data/data_util.py:271
↓ 3 callersMethodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. A
musev/schedulers/scheduling_dpmsolver_multistep.py:771
↓ 2 callersFunctionadaptive_instance_normalization
Args: src (torch.Tensor): b c t h w dst (torch.Tensor): b c t h w
musev/data/data_util.py:499
↓ 2 callersMethodadd
(key, value)
musev/utils/register.py:26
↓ 2 callersMethodadd_noise
( self, original_samples: torch.FloatTensor, noise: torch.FloatTensor, timeste
musev/schedulers/scheduling_dpmsolver_multistep.py:787
↓ 2 callersFunctionalpha_bar
(time_step)
musev/schedulers/scheduling_euler_ancestral_discrete.py:79
↓ 2 callersFunctionalpha_bar
(time_step)
musev/schedulers/scheduling_dpmsolver_multistep.py:55
↓ 2 callersFunctionbatch_index_copy
_summary_ Args: tensor (torch.Tensor): b*c*h dim (int): index (torch.LongTensor): b*d, source (torch.Tensor):
musev/data/data_util.py:440
↓ 2 callersFunctionbatch_index_fill
_summary_ Args: tensor (torch.Tensor): b*c*h dim (int): index (torch.LongTensor): b*d, value (torch.Tensor): b
musev/data/data_util.py:471
↓ 2 callersFunctionconcat_two_tensor_with_index
_summary_ Args: data1 (torch.Tensor): b1*c1*h1*w1*... data1_index (torch.LongTensor): N, if dim=1, N=c1 data2 (torch.Tens
musev/data/data_util.py:242
↓ 2 callersFunctionconv_attn_to_linear
(checkpoint)
musev/utils/convert_from_ckpt.py:207
↓ 2 callersFunctionconvert_ldm_unet_checkpoint
Takes a state dict and a config, and returns a converted checkpoint.
musev/utils/convert_from_ckpt.py:332
↓ 2 callersMethoddecode_latents
(self, latents)
musev/pipelines/pipeline_controlnet.py:233
↓ 2 callersFunctiongenerate_prompts
(tasks: List[Dict])
musev/auto_prompt/util.py:7
↓ 2 callersMethodget_attns
r""" Returns: `dict` of attention attns: A dictionary containing all attention attns used in the model with indexed by
musev/models/unet_3d_condition.py:1699
↓ 2 callersFunctionget_down_block
( down_block_type: str, num_layers: int, in_channels: int, out_channels: int, temb_channel
musev/models/unet_2d_blocks.py:67
↓ 2 callersFunctionget_prompts_with_weights
r""" Tokenize a list of prompts and return its tokens with weights of each token. No padding, starting or ending token is included.
musev/utils/text_emb_util.py:118
↓ 2 callersFunctionget_unweighted_text_embeddings
When the length of tokens is a multiple of the capacity of the text encoder, it should be split into chunks and sent to the text encoder indi
musev/utils/text_emb_util.py:178
↓ 2 callersFunctionget_up_block
( up_block_type: str, num_layers: int, in_channels: int, out_channels: int, prev_output_ch
musev/models/unet_2d_blocks.py:284
↓ 2 callersFunctionlimit_shape
limite generation video shape to avoid gpu memory overflow
scripts/gradio/app_docker_space.py:94
↓ 2 callersFunctionlimit_shape
limite generation video shape to avoid gpu memory overflow
scripts/gradio/app_gradio_space.py:127
↓ 2 callersFunctionlimit_shape
limite generation video shape to avoid gpu memory overflow
scripts/gradio/app.py:92
↓ 2 callersMethodload_lora
( self, lora_dict: Dict[str, Dict], )
musev/pipelines/pipeline_controlnet_predictor.py:311
↓ 2 callersFunctionload_unet
通过模型名字 初始化Unet,载入预训练参数. init unet with model_name. 该部分都是通过 models.unet_3d_condition.py:UNet3DConditionModel 定义、训练的模型 model is defined and trai
musev/models/unet_loader.py:83
↓ 2 callersFunctionordered_halving
(val)
musev/pipelines/context.py:12
↓ 2 callersFunctionpad_tokens_and_weights
r""" Pad the tokens (with starting and ending tokens) and weights (with 1.0) to max_length.
musev/utils/text_emb_util.py:153
↓ 2 callersMethodprepare_control_image
( self, image, # b c t h w width, height, batch_size, num_ima
musev/pipelines/pipeline_controlnet.py:454
↓ 2 callersFunctionprepare_image
( image, # b c t h w batch_size, device, dtype, image_processor: Callable, num_images
musev/pipelines/pipeline_controlnet.py:87
↓ 2 callersMethodprepare_image
( self, image, # b c t h w width, height, batch_size, num_ima
musev/models/controlnet.py:32
↓ 2 callersFunctionrenew_vae_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
musev/utils/convert_from_ckpt.py:122
↓ 2 callersFunctionresize_spatial_position_emb
_summary_ Args: emb (torch.Tensor): b ( h w) d height (int): _description_ width (int): _description_ scale (floa
musev/models/embeddings.py:55
↓ 2 callersMethodrun_pipe_text2video
generate long video with end2end mode 1. prepare vision condition image by assingning, redraw, or generation with text2image module w
musev/pipelines/pipeline_controlnet_predictor.py:356
↓ 2 callersMethodrun_pipe_video2video
类似controlnet text2img pipeline。 输入视频,用视频得到controlnet condition。 目前仅支持time_size == step,overlap=0 输出视频长度=输入视频长度 simil
musev/pipelines/pipeline_controlnet_predictor.py:760
↓ 2 callersMethodset_attn_processor
r""" Parameters: `processor (`dict` of `AttentionProcessor` or `AttentionProcessor`): The instantiated processor c
musev/models/unet_3d_condition.py:714
↓ 2 callersFunctionupdate_pipeline_basemodel
使用model_path更新pipeline中的基础参数 Args: pipeline (DiffusionPipeline): _description_ model_path (str): _description_ text_sd_mo
musev/utils/model_util.py:47
↓ 2 callersFunctionupdate_pipeline_lora_models
使用 lora 更新pipeline中的unet相关参数 Args: pipeline (DiffusionPipeline): _description_ lora_dict (Dict[str, Dict]): _description_
musev/utils/model_util.py:401
↓ 2 callersFunctionupdate_unet_ip_adapter_cross_attn_param
use independent ip_adapter attn 中的 to_k, to_v in unet ip_adapter: dict whose keys are ['1.to_k_ip.weight', '1.to_v_ip.weight', '3.to_k_ip.weight'
musev/models/ip_adapter_loader.py:308
↓ 2 callersFunctionupdate_unet_with_sd
更新T2V模型中的T2I参数. update t2i parameters in t2v model Args: unet (nn.Module): _description_ sd_model (Tuple[str, nn.Module]): _descr
musev/models/unet_loader.py:41
↓ 1 callersMethod__init__
Args: funcs (list): 继承`BaseAttribute2Text`并实现了`__call__`函数的类. Inherited `BaseAttribute2Text` and implemented the `__call__` funct
musev/auto_prompt/attributes/attributes.py:75
↓ 1 callersMethod__init__
纯空模板,无论输入啥,都只返回空格字符串作为prompt。 Args: template (str): 符合只输出空格字符串的模板, name (str, optional): 该模板字符串名字,暂无实际用处. Defaults to
musev/auto_prompt/attributes/attr2template.py:112
↓ 1 callersMethod__init__
( self, conditioning_embedding_channels: int, conditioning_channels: int = 3,
musev/models/controlnet.py:327
↓ 1 callersMethod_convert_to_karras
Constructs the noise schedule of Karras et al. (2022).
musev/schedulers/scheduling_dpmsolver_multistep.py:358
↓ 1 callersFunction_copy_attn_layer
(hf_attn_layer, pt_attn_layer)
musev/utils/convert_from_ckpt.py:671
↓ 1 callersFunction_copy_layer
(hf_layer, pt_layer)
musev/utils/convert_from_ckpt.py:683
↓ 1 callersFunction_copy_layers
(hf_layers, pt_layers)
musev/utils/convert_from_ckpt.py:696
↓ 1 callersMethod_sigma_to_t
(self, sigma, log_sigmas)
musev/schedulers/scheduling_dpmsolver_multistep.py:330
↓ 1 callersFunctionadaptive_instance_normalization_with_ref
( src: torch.LongTensor, dst: torch.LongTensor, style_fidelity: float = 0.5, do_classifier_fre
musev/data/data_util.py:529
↓ 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 = [
musev/schedulers/scheduling_euler_ancestral_discrete.py:61
↓ 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 = [
musev/schedulers/scheduling_dpmsolver_multistep.py:37
↓ 1 callersMethodcheck_inputs
( self, prompt, image, callback_steps, negative_prompt=None, p
musev/pipelines/pipeline_controlnet.py:480
↓ 1 callersFunctionconvert_ldm_clip_checkpoint
(checkpoint, pretrained_model_path)
musev/utils/convert_from_ckpt.py:720
↓ 1 callersFunctionconvert_ldm_vae_checkpoint
(checkpoint, config)
musev/utils/convert_from_ckpt.py:563
↓ 1 callersMethodconvert_model_output
Convert the model output to the corresponding type that the algorithm (DPM-Solver / DPM-Solver++) needs. DPM-Solver is designed to d
musev/schedulers/scheduling_dpmsolver_multistep.py:373
↓ 1 callersFunctionconvert_motion_lora_ckpt_to_diffusers
(pipeline, state_dict, alpha=1.0)
musev/utils/convert_lora_safetensor_to_diffusers.py:28
↓ 1 callersFunctioncreate_unet_diffusers_config
Creates a config for the diffusers based on the config of the LDM model.
musev/utils/convert_from_ckpt.py:219
↓ 1 callersFunctionddim_loop
(pipeline, ddim_scheduler, latent, num_inv_steps, prompt)
musev/utils/util.py:325
↓ 1 callersFunctiondownload_model
()
scripts/gradio/app_docker_space.py:20
↓ 1 callersFunctiondownload_model
()
scripts/gradio/app_gradio_space.py:52
↓ 1 callersFunctiondownload_model
()
scripts/gradio/app.py:18
↓ 1 callersMethoddpm_solver_first_order_update
One step for the first-order DPM-Solver (equivalent to DDIM). See https://arxiv.org/abs/2206.00927 for the detailed derivation.
musev/schedulers/scheduling_dpmsolver_multistep.py:448
next →1–100 of 388, ranked by callers