MCPcopy Create free account

hub / github.com/JaydenLyh/Reward-Forcing / functions

Functions579 in github.com/JaydenLyh/Reward-Forcing

↓ 2 callersFunctionget_array_shape_from_lmdb
(env, array_name)
utils/lmdb.py:4
↓ 2 callersMethodget_batch
(self, names)
demo_utils/vae_torch2trt.py:157
↓ 2 callersFunctionget_denoising_loss
(loss_type: str)
utils/loss.py:80
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
wan/utils/fm_solvers.py:679
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
wan/utils/fm_solvers_unipc.py:628
↓ 2 callersMethodinference_with_trajectory
( self, noise: torch.Tensor, initial_latent: Optional[torch.Tensor] = None
pipeline/self_forcing_training.py:60
↓ 2 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
videoalign/utils.py:89
↓ 2 callersFunctionprocess_data_dict
(data_dict, seen_prompts)
utils/lmdb.py:30
↓ 2 callersFunctionprocess_wanvideo_tensor
简化版视频处理:根据FPS抽帧 + Resize
videoalign/vision_process.py:292
↓ 2 callersMethodquantize_if_needed
(self, t, expected_dtype, scale)
demo_utils/vae.py:376
↓ 2 callersFunctionrope_apply
(x, grid_sizes, freqs)
wan/modules/model.py:40
↓ 2 callersFunctionrope_apply
x: [B, L, N, C]. grid_sizes: [B, 3]. freqs: [M, C // 2].
wan/distributed/xdit_context_parallel.py:26
↓ 2 callersFunctionset_workspace
Version-agnostic workspace limit.
demo_utils/vae_torch2trt.py:98
↓ 2 callersFunctionsmart_nframes
calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the configuration of video.
videoalign/vision_process.py:129
↓ 2 callersFunctionsmart_nframes
calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the configuration of video.
wan/utils/qwen_vl_utils.py:133
↓ 2 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the multistep DPMSolver.
wan/utils/fm_solvers.py:706
↓ 2 callersFunctionstore_arrays_to_lmdb
Store rows of multiple numpy arrays in a single LMDB. Each row is stored separately with a naming convention.
utils/lmdb.py:11
↓ 2 callersFunctionumt5_xxl
(**kwargs)
wan/modules/t5.py:456
↓ 2 callersMethodunpatchify
r""" Reconstruct video tensors from patch embeddings. Args: x (List[Tensor]): List of patchified features
wan/modules/causal_model.py:1031
↓ 2 callersFunctionwhitespace_clean
(text)
wan/modules/tokenizers.py:18
↓ 2 callersMethodwrite
(self, frame_tensor)
demo_utils/taehv.py:268
↓ 1 callersMethod_clean
(self, text)
wan/modules/tokenizers.py:75
↓ 1 callersFunction_clip
(pretrained=False, pretrained_name=None, model_cls=XLMRobertaCLIP, return_transf
wan/modules/clip.py:434
↓ 1 callersMethod_compute_kl_grad
Compute the KL grad (eq 7 in https://arxiv.org/abs/2311.18828). Input: - noisy_image_or_video: a tensor with shape [B, F,
model/causvid.py:47
↓ 1 callersMethod_compute_kl_grad
Compute the KL grad (eq 7 in https://arxiv.org/abs/2311.18828). Input: - noisy_image_or_video: a tensor with shape [B, F,
model/re_dmd.py:53
↓ 1 callersMethod_compute_kl_grad
Compute the KL grad (eq 7 in https://arxiv.org/abs/2311.18828). Input: - noisy_image_or_video: a tensor with shape [B, F,
model/dmd.py:54
↓ 1 callersMethod_consistency_backward_simulation
Simulate the generator's input from noise to avoid training/inference mismatch. See Sec 4.5 of the DMD2 paper (https://arxiv.org/abs/
model/base.py:181
↓ 1 callersMethod_consistency_backward_simulation
Simulate the generator's input from noise to avoid training/inference mismatch. See Sec 4.5 of the DMD2 paper (https://arxiv.org/abs/
model/base.py:406
↓ 1 callersFunction_convert_A_B_to_chosen_rejected
Inputs: rewards_A: [B, N] rewards_B: [B, N] scores_A: [B, N] scores_B: [B, N] chosen_label: [B, N] Ou
videoalign/trainer.py:177
↓ 1 callersMethod_convert_flow_pred_to_x0
Convert flow matching's prediction to x0 prediction. flow_pred: the prediction with shape [B, C, H, W] xt: the input noisy da
utils/wan_wrapper.py:171
↓ 1 callersMethod_forward
r""" Forward pass through the diffusion model Args: x (List[Tensor]): List of input video tensors, each w
wan/modules/model.py:637
↓ 1 callersMethod_forward_inference
r""" Run the diffusion model with kv caching. See Algorithm 2 of CausVid paper https://arxiv.org/abs/2412.07772 for details. T
wan/modules/causal_model.py:732
↓ 1 callersMethod_forward_train
r""" Forward pass through the diffusion model Args: x (List[Tensor]): List of input video tensors, each w
wan/modules/causal_model.py:863
↓ 1 callersMethod_init_shadow
(self, fsdp_module)
utils/distributed.py:98
↓ 1 callersMethod_init_step_index
Initialize the step_index counter for the scheduler.
wan/utils/fm_solvers.py:693
↓ 1 callersMethod_init_step_index
Initialize the step_index counter for the scheduler.
wan/utils/fm_solvers_unipc.py:643
↓ 1 callersMethod_initialize_crossattn_cache
Initialize a Per-GPU cross-attention cache for the Wan model.
pipeline/causal_diffusion_inference.py:300
↓ 1 callersMethod_initialize_crossattn_cache
Initialize a Per-GPU cross-attention cache for the Wan model.
pipeline/causal_inference.py:300
↓ 1 callersMethod_initialize_crossattn_cache
Initialize a Per-GPU cross-attention cache for the Wan model.
pipeline/self_forcing_training.py:255
↓ 1 callersMethod_initialize_crossattn_cache
Initialize a Per-GPU cross-attention cache for the Wan model.
pipeline/reward_forcing_training.py:256
↓ 1 callersMethod_initialize_inference_pipeline
Lazy initialize the inference pipeline during the first backward simulation run. Here we encapsulate the inference code with a model-
model/base.py:205
↓ 1 callersMethod_initialize_inference_pipeline
Lazy initialize the inference pipeline during the first backward simulation run. Here we encapsulate the inference code with a model-
model/base.py:430
↓ 1 callersMethod_initialize_kv_cache
Initialize a Per-GPU KV cache for the Wan model.
pipeline/causal_diffusion_inference.py:270
↓ 1 callersMethod_initialize_kv_cache
Initialize a Per-GPU KV cache for the Wan model.
pipeline/causal_inference.py:278
↓ 1 callersMethod_initialize_kv_cache
Initialize a Per-GPU KV cache for the Wan model.
pipeline/self_forcing_training.py:239
↓ 1 callersMethod_initialize_kv_cache
Initialize a Per-GPU KV cache for the Wan model.
pipeline/reward_forcing_training.py:240
↓ 1 callersMethod_initialize_models
(self, args, device)
model/base.py:26
↓ 1 callersMethod_initialize_models
(self, args, device)
model/base.py:237
↓ 1 callersMethod_initialize_sample_scheduler
(self, noise)
pipeline/bidirectional_diffusion_inference.py:89
↓ 1 callersMethod_initialize_sample_scheduler
(self, noise)
pipeline/causal_diffusion_inference.py:321
↓ 1 callersFunction_insert_adapter_name_into_state_dict
Utility function to remap the state_dict keys to fit the PEFT model by inserting the adapter name.
videoalign/utils.py:136
↓ 1 callersMethod_install_module
(module: torch.nn.Module, **kwargs)
demo_utils/memory.py:15
↓ 1 callersMethod_norm
(self, reward)
videoalign/inference.py:71
↓ 1 callersMethod_norm
(self, reward)
videoalign/wan_inference.py:71
↓ 1 callersMethod_norm
(self, x)
wan/modules/model.py:85
↓ 1 callersMethod_prepare_blockwise_causal_attn_mask
we will divide the token sequence into the following format [1 latent frame] [1 latent frame] ... [1 latent frame] We use fle
wan/modules/causal_model.py:526
↓ 1 callersMethod_prepare_blockwise_causal_attn_mask_i2v
we will divide the token sequence into the following format [1 latent frame] [N latent frame] ... [N latent frame] The first
wan/modules/causal_model.py:672
↓ 1 callersMethod_prepare_generator_input
Given a tensor containing the whole ODE sampling trajectories, randomly choose an intermediate timestep and return the latent as well
model/ode_regression.py:57
↓ 1 callersMethod_prepare_input
Prepare `inputs` before feeding them to the model, converting them to tensors if they are not already and handling potential state.
videoalign/inference.py:96
↓ 1 callersMethod_prepare_input
Prepare `inputs` before feeding them to the model, converting them to tensors if they are not already and handling potential state.
videoalign/wan_inference.py:96
↓ 1 callersMethod_prepare_teacher_forcing_mask
we will divide the token sequence into the following format [1 latent frame] [1 latent frame] ... [1 latent frame] We use fle
wan/modules/causal_model.py:584
↓ 1 callersMethod_relative_position_bucket
(self, rel_pos)
wan/modules/t5.py:245
↓ 1 callersFunction_t5
(name, encoder_only=False, decoder_only=False, return_tokenizer=False, tokeniz
wan/modules/t5.py:415
↓ 1 callersMethod_uninstall_module
(module: torch.nn.Module)
demo_utils/memory.py:43
↓ 1 callersFunctionadd_idx
(example, idx)
videoalign/train_reward.py:145
↓ 1 callersMethodadding_cls_branch
(self, atten_dim=1536, num_class=4, time_embed_dim=0)
utils/wan_wrapper.py:149
↓ 1 callersMethodall_gather_dict
(self, target_dict)
trainer/gan.py:457
↓ 1 callersFunctioncanonicalize
(text, keep_punctuation_exact_string=None)
wan/modules/tokenizers.py:24
↓ 1 callersFunctionclip_xlm_roberta_vit_h_14
( pretrained=False, pretrained_name='open-clip-xlm-roberta-large-vit-huge-14', **kwarg
wan/modules/clip.py:471
↓ 1 callersMethodcompute_distribution_matching_loss
Compute the DMD loss (eq 7 in https://arxiv.org/abs/2311.18828). Input: - image_or_video: a tensor with shape [B, F, C, H
model/causvid.py:121
↓ 1 callersMethodcompute_distribution_matching_loss
Compute the DMD loss (eq 7 in https://arxiv.org/abs/2311.18828). Input: - image_or_video: a tensor with shape [B, F, C, H
model/sid.py:47
↓ 1 callersMethodcompute_distribution_matching_loss
Compute the DMD loss (eq 7 in https://arxiv.org/abs/2311.18828). Input: - image_or_video: a tensor with shape [B, F, C, H
model/dmd.py:128
↓ 1 callersMethodcompute_loss
( self, model, inputs, return_outputs=False, )
videoalign/trainer.py:425
↓ 1 callersMethodcompute_rewarded_distribution_matching_loss
Compute the DMD loss (eq 7 in https://arxiv.org/abs/2311.18828). Input: - image_or_video: a tensor with shape [B, F, C, H
model/re_dmd.py:121
↓ 1 callersFunctionconvert_GSB_csv_to_reward_data
Convert Good/Same/Bad csv data to reward data. Args: example (dict): A dataframe containing the GSB csv data. data_dir (str)
videoalign/data.py:31
↓ 1 callersMethodconvert_model_output
Convert the model output to the corresponding type the DPMSolver/DPMSolver++ algorithm needs. DPM-Solver is designed to discretize an
wan/utils/fm_solvers.py:341
↓ 1 callersMethodconvert_model_output
r""" Convert the model output to the corresponding type the UniPC algorithm needs. Args: model_output (`torch.Tensor`):
wan/utils/fm_solvers_unipc.py:279
↓ 1 callersMethoddecide_system_prompt
(self, tar_lang="ch")
wan/utils/prompt_extend.py:131
↓ 1 callersMethoddecode
(self, z, scale)
wan/modules/vae.py:545
↓ 1 callersMethoddpm_solver_first_order_update
One step for the first-order DPMSolver (equivalent to DDIM). Args: model_output (`torch.Tensor`): The dir
wan/utils/fm_solvers.py:415
↓ 1 callersMethodextend_with_img
(self, prompt, system_prompt, image=No
wan/utils/prompt_extend.py:119
↓ 1 callersFunctionextract_vision_info
(conversations: list[dict] | list[list[dict]])
videoalign/vision_process.py:366
↓ 1 callersFunctionextract_vision_info
( conversations: list[dict] | list[list[dict]])
wan/utils/qwen_vl_utils.py:328
↓ 1 callersFunctionfetch_video
(ele: dict, image_factor: int = IMAGE_FACTOR)
videoalign/vision_process.py:319
↓ 1 callersFunctionfetch_video
( ele: dict, image_factor: int = IMAGE_FACTOR)
wan/utils/qwen_vl_utils.py:274
↓ 1 callersFunctionfind_target_linear_names
Find the target linear modules for LoRA.
videoalign/train_reward.py:43
↓ 1 callersMethodforward
r""" Args: x(Tensor): Shape [B, L1, C] e(Tensor): Shape [B, C]
wan/modules/model.py:456
↓ 1 callersMethodgenerate_and_sync_list
(self, num_blocks, num_denoising_steps, device)
pipeline/self_forcing_training.py:41
↓ 1 callersMethodgenerate_and_sync_list
(self, num_blocks, num_denoising_steps, device)
pipeline/reward_forcing_training.py:42
↓ 1 callersFunctionget_peft_state_non_lora_maybe_zero_3
(named_params, require_grad_only=True)
videoalign/utils.py:127
↓ 1 callersFunctionget_video_reader_backend
()
videoalign/vision_process.py:282
↓ 1 callersFunctionget_video_reader_backend
()
wan/utils/qwen_vl_utils.py:261
↓ 1 callersMethodincremental_update
Args: new_k: [B, sink_size, num_heads, head_dim] new_v: [B, sink_size, num_heads, head_dim] current_sink
wan/modules/causal_model.py:88
↓ 1 callersFunctioninit_model
(device)
scripts/generate_ode_pairs.py:13
↓ 1 callersMethodinit_weights
r""" Initialize model parameters using Xavier initialization.
wan/modules/causal_model.py:1056
↓ 1 callersMethodinit_weights
r""" Initialize model parameters using Xavier initialization.
wan/modules/model.py:901
↓ 1 callersMethodinstall_model
(model: torch.nn.Module, **kwargs)
demo_utils/memory.py:49
↓ 1 callersFunctionis_decord_available
()
videoalign/vision_process.py:221
↓ 1 callersFunctionis_decord_available
()
wan/utils/qwen_vl_utils.py:215
↓ 1 callersFunctionis_hopper_gpu
()
wan/modules/attention.py:7
← previousnext →101–200 of 579, ranked by callers