MCPcopy Create free account

hub / github.com/PKU-YuanGroup/MagicTime / functions

Functions144 in github.com/PKU-YuanGroup/MagicTime

↓ 14 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
utils/unet_blocks.py:1460
↓ 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
utils/util.py:339
↓ 6 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
utils/util.py:264
↓ 5 callersFunctionget_motion_module
( in_channels, motion_module_type: str, motion_module_kwargs: dict )
utils/unet_blocks.py:506
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
utils/util.py:255
↓ 4 callersFunctionrenew_vae_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
utils/util.py:285
↓ 4 callersFunctionsave_json
Save data to a JSON file.
data_preprocess/step2_2_preprocess_frame_caption.py:10
↓ 4 callersFunctionsave_json_file
Saves data to a JSON file.
data_preprocess/step3_2_preprocess_video_caption.py:59
↓ 3 callersMethodfrom_pretrained_2d
(cls, pretrained_model_path, subfolder=None, unet_additional_kwargs=None)
utils/unet.py:476
↓ 3 callersFunctionrenew_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
utils/util.py:300
↓ 3 callersFunctionsave_videos_grid
(videos: torch.Tensor, path: str, rescale=False, n_rows=6, fps=8)
utils/util.py:16
↓ 3 callersMethodupdate_dreambooth
(self, dreambooth_dropdown, motion_module_dropdown=None)
app.py:122
↓ 2 callersMethod_get_frame_indices_adjusted
(self, video_length, n_frames)
utils/dataset.py:35
↓ 2 callersFunctionconv_attn_to_linear
(checkpoint)
utils/util.py:601
↓ 2 callersFunctionconvert_ldm_unet_checkpoint
Takes a state dict and a config, and returns a converted checkpoint.
utils/util.py:389
↓ 2 callersFunctionconvert_ldm_vae_checkpoint
(checkpoint, config)
utils/util.py:612
↓ 2 callersMethodforward
(self, hidden_states)
utils/unet_blocks.py:489
↓ 2 callersFunctionload_json
Load and return the content of a JSON file.
data_preprocess/step2_2_preprocess_frame_caption.py:5
↓ 2 callersFunctionremove_unmatch_records
Removes records from gpt_results if their ID exists in disordered_records. :param gpt_data: dict, the data from gpt_results.json :param d
data_preprocess/step3_2_preprocess_video_caption.py:49
↓ 2 callersFunctionrenew_vae_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
utils/util.py:310
↓ 2 callersMethodupdate_motion_module
(self, motion_module_dropdown)
app.py:156
↓ 2 callersMethodupdate_motion_module_2
(self, motion_module_dropdown)
app.py:164
↓ 1 callersMethod_encode_prompt
(self, prompt, device, num_videos_per_prompt, do_classifier_free_guidance, negative_prompt)
utils/pipeline_magictime.py:143
↓ 1 callersMethod_generate_frame_indices
(self, video_length, n_frames, sample_stride, is_transmit)
utils/dataset.py:49
↓ 1 callersFunctioncall_gpt
(prompt, model_name="gpt-4-vision-preview", api_key=None)
data_preprocess/step3_1_GPT4V_video_caption_concise.py:62
↓ 1 callersFunctioncall_gpt
(prompt, model_name="gpt-4-vision-preview", api_key=None)
data_preprocess/step3_1_GPT4V_video_caption_detail.py:64
↓ 1 callersFunctioncall_gpt
(prompt, model_name="gpt-4-vision-preview", api_key=None)
data_preprocess/step2_1_GPT4V_frame_caption.py:168
↓ 1 callersMethodcheck_inputs
(self, prompt, height, width, callback_steps)
utils/pipeline_magictime.py:264
↓ 1 callersFunctionconvert_ldm_clip_checkpoint
(checkpoint)
utils/util.py:572
↓ 1 callersFunctionconvert_ldm_clip_text_model
(text_model, checkpoint)
utils/util.py:588
↓ 1 callersFunctioncreate_prompts
(txt_prompt, data)
data_preprocess/step3_1_GPT4V_video_caption_concise.py:29
↓ 1 callersFunctioncreate_prompts
(txt_prompt, data)
data_preprocess/step3_1_GPT4V_video_caption_detail.py:31
↓ 1 callersFunctioncreate_prompts
(grouped_images, image_directory, txt_prompt)
data_preprocess/step2_1_GPT4V_frame_caption.py:125
↓ 1 callersFunctionddim_loop
(pipeline, ddim_scheduler, latent, num_inv_steps, prompt)
utils/util.py:67
↓ 1 callersMethoddecode_latents
(self, latents)
utils/pipeline_magictime.py:232
↓ 1 callersFunctionextract_frames
(video_path, output_folder, num_frames=8)
data_preprocess/step0_extract_frame_resize.py:18
↓ 1 callersFunctionfind_disorder
Identify entries with unordered frames.
data_preprocess/step2_2_preprocess_frame_caption.py:49
↓ 1 callersMethodget_batch
(self, idx)
utils/dataset.py:69
↓ 1 callersFunctionget_down_block
( down_block_type, num_layers, in_channels, out_channels, temb_channels, add_downsampl
utils/unet_blocks.py:801
↓ 1 callersFunctionget_image_filenames
(directory)
data_preprocess/step2_1_GPT4V_frame_caption.py:97
↓ 1 callersFunctionget_noise_pred_single
(latents, t, context, unet)
utils/util.py:62
↓ 1 callersFunctionget_up_block
( up_block_type, num_layers, in_channels, out_channels, prev_output_channel, temb_chan
utils/unet_blocks.py:881
↓ 1 callersFunctiongroup_images_by_video_id
(filenames)
data_preprocess/step2_1_GPT4V_frame_caption.py:112
↓ 1 callersFunctionhas_been_processed
(video_id, output_file)
data_preprocess/step3_1_GPT4V_video_caption_concise.py:39
↓ 1 callersFunctionhas_been_processed
(video_id, output_file)
data_preprocess/step3_1_GPT4V_video_caption_detail.py:41
↓ 1 callersFunctionhas_been_processed
(video_id, output_file)
data_preprocess/step2_1_GPT4V_frame_caption.py:141
↓ 1 callersFunctionimage_b64
(image_path)
data_preprocess/step2_1_GPT4V_frame_caption.py:107
↓ 1 callersFunctioninit_prompt
(prompt, pipeline)
utils/util.py:32
↓ 1 callersFunctionis_disordered
(section)
data_preprocess/step2_2_preprocess_frame_caption.py:37
↓ 1 callersFunctionload_diffusers_lora
(pipeline, state_dict, alpha=1.0)
utils/util.py:153
↓ 1 callersFunctionload_diffusers_lora_unet
(unet, state_dict, alpha=1.0)
utils/util.py:175
↓ 1 callersFunctionload_existing_results
(file_path)
data_preprocess/step3_1_GPT4V_video_caption_concise.py:49
↓ 1 callersFunctionload_existing_results
(file_path)
data_preprocess/step3_1_GPT4V_video_caption_detail.py:51
↓ 1 callersFunctionload_existing_results
(file_path)
data_preprocess/step2_1_GPT4V_frame_caption.py:155
↓ 1 callersFunctionload_weights
( magictime_pipeline, motion_module_path = "", dreambooth_model_path = "", magic_ad
utils/util.py:84
↓ 1 callersFunctionmain
(args)
inference_magictime.py:19
↓ 1 callersFunctionmain
(num_workers, all_prompts, output_file, api_key)
data_preprocess/step3_1_GPT4V_video_caption_concise.py:89
↓ 1 callersFunctionmain
(num_workers, all_prompts, output_file, api_key)
data_preprocess/step3_1_GPT4V_video_caption_detail.py:91
↓ 1 callersFunctionmain
(num_workers, all_prompts, output_file, api_key)
data_preprocess/step2_1_GPT4V_frame_caption.py:196
↓ 1 callersFunctionmerge_json_files_with_transmit_status
(caption_file, output_file)
data_preprocess/step4_1_create_webvid_format.py:6
↓ 1 callersFunctionnext_step
(model_output: Union[torch.FloatTensor, np.ndarray], timestep: int, sample: Union[torch.FloatTen
utils/util.py:50
↓ 1 callersFunctionparse_video_id
(filename)
data_preprocess/step2_1_GPT4V_frame_caption.py:102
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
utils/pipeline_magictime.py:247
↓ 1 callersMethodprepare_latents
(self, batch_size, num_channels_latents, video_length, height, width, dtype, device, generator, latents=None)
utils/pipeline_magictime.py:279
↓ 1 callersFunctionprocess_all_videos
(folder_path, output_folder)
data_preprocess/step0_extract_frame_resize.py:47
↓ 1 callersFunctionprocess_frame_caption
Process frame captions and save matched data.
data_preprocess/step2_2_preprocess_frame_caption.py:15
↓ 1 callersFunctionprocess_json
(file_path)
data_preprocess/step3_2_preprocess_video_caption.py:6
↓ 1 callersFunctionrandom_seed
()
app.py:78
↓ 1 callersFunctionread_json_file
Reads a JSON file and returns its content.
data_preprocess/step3_2_preprocess_video_caption.py:25
↓ 1 callersMethodrefresh_motion_module
(self)
app.py:114
↓ 1 callersMethodrefresh_personalized_model
(self)
app.py:118
↓ 1 callersFunctionremove_by_Frame
(data)
data_preprocess/step3_2_preprocess_video_caption.py:30
↓ 1 callersFunctionremove_disorder
Remove disordered entries from the dataset.
data_preprocess/step2_2_preprocess_frame_caption.py:64
↓ 1 callersFunctionremove_unmatch_records
Removes records from gpt_results if their ID exists in disordered_records. :param data: dict, the data from gpt_results.json :return: dic
data_preprocess/step2_2_preprocess_frame_caption.py:70
↓ 1 callersFunctionresize_frame
(frame, short_edge=256)
data_preprocess/step0_extract_frame_resize.py:7
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module will split the input tensor in slices, to
utils/unet.py:249
↓ 1 callersFunctionui
()
app.py:239
↓ 1 callersFunctionzero_module
(module)
utils/unet_blocks.py:494
Method__call__
( self, prompt: Union[str, List[str]], video_length: Optional[int], height: Op
utils/pipeline_magictime.py:309
Method__getitem__
(self, idx)
utils/dataset.py:90
Method__init__
(self)
app.py:82
Method__init__
( self, sample_size: Optional[int] = None, in_channels: int = 4, out_channels:
utils/unet.py:40
Method__init__
( self, num_attention_heads: int = 16, attention_head_dim: int = 88, in_channe
utils/unet_blocks.py:32
Method__init__
( self, dim: int, num_attention_heads: int, attention_head_dim: int, d
utils/unet_blocks.py:145
Method__init__
(self, channels, use_conv=False, use_conv_transpose=False, out_channels=None, name="conv")
utils/unet_blocks.py:306
Method__init__
(self, channels, use_conv=False, out_channels=None, padding=1, name="conv")
utils/unet_blocks.py:357
Method__init__
( self, *, in_channels, out_channels=None, conv_shortcut=False,
utils/unet_blocks.py:383
Method__init__
( self, in_channels, num_attention_heads = 8, num_transformer_b
utils/unet_blocks.py:518
Method__init__
( self, in_channels, num_attention_heads, attention_head_dim, num_lay
utils/unet_blocks.py:554
Method__init__
( self, dim, num_attention_heads, attention_head_dim, attention_block_
utils/unet_blocks.py:630
Method__init__
( self, d_model, dropout = 0., max_len = 24 )
utils/unet_blocks.py:694
Method__init__
( self, attention_mode = None, cross_frame_attention_m
utils/unet_blocks.py:715
Method__init__
( self, in_channels: int, temb_channels: int, dropout: float = 0.0, nu
utils/unet_blocks.py:961
Method__init__
( self, in_channels: int, out_channels: int, temb_channels: int, dropo
utils/unet_blocks.py:1071
Method__init__
( self, in_channels: int, out_channels: int, temb_channels: int, dropo
utils/unet_blocks.py:1214
Method__init__
( self, in_channels: int, out_channels: int, prev_output_channel: int,
utils/unet_blocks.py:1314
Method__init__
( self, csv_path, video_folder, sample_size=512, sample_stride=4, sample_n
utils/dataset.py:10
Method__init__
( self, vae: AutoencoderKL, text_encoder: CLIPTextModel, tokenizer: CLIPTokeni
utils/pipeline_magictime.py:37
Method__len__
(self)
utils/dataset.py:87
Method_execution_device
(self)
utils/pipeline_magictime.py:131
next →1–100 of 144, ranked by callers