MCPcopy Create free account

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

Functions579 in github.com/JaydenLyh/Reward-Forcing

↓ 32 callersMethodupdate
(self, fsdp_module)
utils/distributed.py:105
↓ 21 callersMethodadd_noise
Diffusion forward corruption process. Input: - clean_latent: the clean latent with shape [B, C, H, W] - noise
utils/scheduler.py:12
↓ 21 callersMethoddevice
(self)
utils/wan_wrapper.py:34
↓ 15 callersFunctionfsdp_wrap
(module, sharding_strategy="full", mixed_precision=False, wrap_strategy="size", min_num_params=int(5e7), trans
utils/distributed.py:23
↓ 15 callersMethodload_state_dict
(self, sd)
utils/distributed.py:116
↓ 15 callersMethodstep
(self, model_output, timestep, sample, to_final=False)
utils/scheduler.py:143
↓ 14 callersMethod_get_timestep
Randomly generate a timestep tensor based on the generator's task type. It uniformly samples a timestep from the range [min_timestep,
model/base.py:47
↓ 13 callersFunctionconv
(n_in, n_out, **kwargs)
demo_utils/taehv.py:16
↓ 13 callersMethodenable_gradient_checkpointing
(self)
utils/wan_wrapper.py:146
↓ 11 callersMethoddecode_to_pixel
(self, latent: torch.Tensor, use_cache: bool = False)
utils/wan_wrapper.py:90
↓ 11 callersMethodencode
videos: A list of videos each with shape [C, T, H, W].
wan/modules/vae.py:667
↓ 11 callersMethodstate_dict
(self)
utils/distributed.py:113
↓ 10 callersMethod_run_generator
Optionally simulate the generator's input from noise using backward simulation and then run the generator for one-step. Input
model/causvid.py:184
↓ 10 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
wan/utils/fm_solvers.py:333
↓ 10 callersMethodsave
(self)
trainer/ode.py:118
↓ 9 callersMethod__init__
(self, dim, out_dim, patch_size, eps=1e-6)
wan/modules/model.py:441
↓ 8 callersMethod__init__
(self, vocab_size, dim, dim_attn, dim_ffn,
wan/modules/t5.py:374
↓ 8 callersMethod__init__
(self, z_dim=16, vae_pth='cache/vae_step_411000.pth', dtype
wan/modules/vae.py:641
↓ 8 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
wan/utils/fm_solvers_unipc.py:272
↓ 8 callersFunctionbuild_prompt
(prompt, dimension, template_type)
videoalign/prompt_template.py:99
↓ 8 callersMethodencode_to_latent
(self, pixel: torch.Tensor)
utils/wan_wrapper.py:74
↓ 8 callersMethodextend
(self, prompt, system_prompt, seed=-1, *args, **kwargs)
wan/utils/prompt_extend.py:128
↓ 8 callersFunctionflash_attention
q: [B, Lq, Nq, C1]. k: [B, Lk, Nk, C1]. v: [B, Lk, Nk, C2]. Nq must be divisible by Nk. q_lens
wan/modules/attention.py:32
↓ 8 callersFunctionfsdp_state_dict
(model)
utils/distributed.py:11
↓ 7 callersFunctionset_seed
Helper function for reproducible behavior to set the seed in `random`, `numpy`, `torch`. Args: seed (`int`): The seed to
utils/misc.py:6
↓ 7 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
wan/utils/fm_solvers.py:226
↓ 6 callersMethod__init__
(self, dim, mid_dim)
wan/modules/clip.py:96
↓ 6 callersMethodclear_cache
(self)
wan/modules/vae.py:602
↓ 6 callersFunctionhalf
(x)
wan/modules/attention.py:67
↓ 6 callersFunctionlaunch_distributed_job
(backend: str = "nccl")
utils/distributed.py:75
↓ 6 callersFunctionmerge_dict_list
(dict_list)
utils/misc.py:25
↓ 6 callersFunctionrope_params
(max_seq_len, dim, theta=10000)
wan/modules/model.py:29
↓ 6 callersFunctionsinusoidal_embedding_1d
(dim, position)
wan/modules/model.py:15
↓ 5 callersMethod_convert_x0_to_flow_pred
Convert x0 prediction to flow matching's prediction. x0_pred: the x0 prediction with shape [B, C, H, W] xt: the input noisy d
utils/wan_wrapper.py:198
↓ 5 callersFunctioncycle
(dl)
utils/dataset.py:217
↓ 5 callersMethoddecode
(self, zs)
wan/modules/vae.py:677
↓ 5 callersFunctionfp16_clamp
(x)
wan/modules/t5.py:20
↓ 5 callersMethodgenerator_loss
Generate image/videos from noise and compute the DMD loss. The noisy input to the generator is backward simulated. This remov
model/gan.py:90
↓ 5 callersFunctionget_cuda_free_memory_gb
(device=None)
demo_utils/memory.py:72
↓ 5 callersMethodget_scheduler
Update the current scheduler with the interface's static method
utils/wan_wrapper.py:293
↓ 5 callersMethodinference
Perform inference on the given noise and text prompts. Inputs: noise (torch.Tensor): The input noise tensor of shape
pipeline/causal_inference.py:47
↓ 4 callersFunctioncausal_rope_apply
(x, grid_sizes, freqs, start_frame=0)
wan/modules/causal_model.py:29
↓ 4 callersFunctionceil_by_factor
Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'.
videoalign/vision_process.py:45
↓ 4 callersFunctionceil_by_factor
Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'.
wan/utils/qwen_vl_utils.py:44
↓ 4 callersMethodconvert_x0_to_noise
Convert the diffusion network's x0 prediction to noise predidction. x0: the predicted clean data with shape [B, C, H, W] xt:
utils/scheduler.py:26
↓ 4 callersFunctionget_sampling_sigmas
(sampling_steps, shift)
wan/utils/fm_solvers.py:22
↓ 4 callersFunctionprocess_vision_info
( conversations: list[dict] | list[list[dict]], )
videoalign/vision_process.py:384
↓ 4 callersFunctionretrieve_row_from_lmdb
Retrieve a specific row from a specific array in the LMDB.
utils/lmdb.py:56
↓ 4 callersFunctionretrieve_timesteps
( scheduler, num_inference_steps=None, device=None, timesteps=None, sigmas=None, **kwa
wan/utils/fm_solvers.py:29
↓ 4 callersFunctionround_by_factor
Returns the closest integer to 'number' that is divisible by 'factor'.
videoalign/vision_process.py:40
↓ 4 callersFunctionround_by_factor
Returns the closest integer to 'number' that is divisible by 'factor'.
wan/utils/qwen_vl_utils.py:39
↓ 4 callersFunctionset_requires_grad
(parameters, requires_grad)
videoalign/train_reward.py:65
↓ 4 callersFunctionsmart_resize
Rescales the image so that the following conditions are met: 1. Both dimensions (height and width) are divisible by 'factor'. 2. The to
videoalign/vision_process.py:55
↓ 4 callersFunctionsmart_resize
Rescales the image so that the following conditions are met: 1. Both dimensions (height and width) are divisible by 'factor'. 2. The to
wan/utils/qwen_vl_utils.py:54
↓ 4 callersMethodvisual
(self, videos)
wan/modules/clip.py:527
↓ 3 callersMethod__init__
(self, dim, out_dim, patch_size, eps=1e-6)
wan/modules/causal_model.py:360
↓ 3 callersMethod__init__
(self, args, device)
model/base.py:13
↓ 3 callersMethod__init__
(self, dim, mode)
demo_utils/vae.py:53
↓ 3 callersMethod__init__
(self, n_f, stride)
demo_utils/taehv.py:38
↓ 3 callersMethod_prepare_inputs
Prepare `inputs` before feeding them to the model, converting them to tensors if they are not already and handling potential state.
videoalign/inference.py:116
↓ 3 callersFunctionbasic_clean
(text)
wan/modules/tokenizers.py:12
↓ 3 callersFunctioncreate_model_and_processor
( model_config, peft_lora_config, training_args, cache_dir=None, )
videoalign/train_reward.py:69
↓ 3 callersMethodcritic_loss
Generate image/videos from noise and train the critic with generated samples. The noisy input to the generator is backward simulated.
model/gan.py:174
↓ 3 callersFunctionexpand_to_dims
(x, target_dims)
demo_utils/utils.py:447
↓ 3 callersFunctionfloor_by_factor
Returns the largest integer less than or equal to 'number' that is divisible by 'factor'.
videoalign/vision_process.py:50
↓ 3 callersFunctionfloor_by_factor
Returns the largest integer less than or equal to 'number' that is divisible by 'factor'.
wan/utils/qwen_vl_utils.py:49
↓ 3 callersFunctionhalf
(x)
wan/distributed/xdit_context_parallel.py:158
↓ 3 callersFunctionload_model_from_checkpoint
( model, checkpoint_dir, checkpoint_step )
videoalign/utils.py:163
↓ 3 callersFunctionqkv_fn
(x)
wan/distributed/xdit_context_parallel.py:162
↓ 3 callersMethodset_timesteps
(self, num_inference_steps=100, denoising_strength=1.0, training=False)
utils/scheduler.py:118
↓ 3 callersMethodtrain
(self)
trainer/ode.py:225
↓ 3 callersMethodunpatchify
r""" Reconstruct video tensors from patch embeddings. Args: x (List[Tensor]): List of patchified features
wan/modules/model.py:876
↓ 2 callersMethod__init__
(self, config, output_dim=4, reward_token="last", special_token_ids=None)
videoalign/trainer.py:60
↓ 2 callersMethod__init__
(self, checkpoint_path)
utils/wan_wrapper.py:55
↓ 2 callersMethod__init__
(self, vocab_size=250002, max_seq_len=514, type_size=1,
wan/modules/xlm_roberta.py:81
↓ 2 callersMethod__init__
(self, model_name, is_vl=False, device=0, **kwargs)
wan/utils/prompt_extend.py:114
↓ 2 callersMethod__init__
(self, dim, mode)
demo_utils/vae_block3.py:11
↓ 2 callersMethod_clean_message
remove unnecessary keys from message(very very necessary)
videoalign/data.py:142
↓ 2 callersMethod_pad_sequence
Pad the sequences to the maximum length.
videoalign/data.py:171
↓ 2 callersMethod_prepare_inputs
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:116
↓ 2 callersMethod_run_cls_pred_branch
Run the classifier prediction branch on the generated image or video. Input: - image_or_video: a tensor with
model/gan.py:69
↓ 2 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
wan/utils/fm_solvers.py:292
↓ 2 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
wan/utils/fm_solvers_unipc.py:230
↓ 2 callersFunction_video_vae
Autoencoder3d adapted from Stable Diffusion 1.x, 2.x and XL.
wan/modules/vae.py:612
↓ 2 callersFunctionapply_model_with_memblocks
Apply a sequential model with memblocks to the given input. Args: - model: nn.Sequential of blocks to apply - x: input data, of dimen
demo_utils/taehv.py:60
↓ 2 callersFunctionattention
( q, k, v, q_lens=None, k_lens=None, dropout_p=0., softmax_scale=None, q_scale
wan/modules/attention.py:139
↓ 2 callersFunctionbarrier
()
utils/distributed.py:70
↓ 2 callersFunctioncount_conv3d
(model)
wan/modules/vae.py:475
↓ 2 callersFunctioncreate_dataset
(data_config, meta_file=None)
videoalign/train_reward.py:141
↓ 2 callersMethoddecode_video
Decode a sequence of frames. Args: x: input NTCHW latent (C=12) tensor with ~Gaussian values. parallel: if True, all
demo_utils/taehv.py:222
↓ 2 callersMethodencode
(self, x, scale)
wan/modules/vae.py:517
↓ 2 callersMethodencode_video
Encode a sequence of frames. Args: x: input NTCHW RGB (C=3) tensor with values in [0, 1]. parallel: if True, all fram
demo_utils/taehv.py:210
↓ 2 callersFunctionfetch_image
(ele: dict[str, str | Image.Image], size_factor: int = IMAGE_FACTOR)
videoalign/vision_process.py:84
↓ 2 callersFunctionfetch_image
(ele: dict[str, str | Image.Image], size_factor: int = IMAGE_FACTOR)
wan/utils/qwen_vl_utils.py:85
↓ 2 callersMethodforward
(self, x)
wan/modules/clip.py:106
↓ 2 callersMethodforward
(self, x)
wan/modules/vae.py:511
↓ 2 callersMethodfwdbwd_one_step
(self, batch, train_generator)
trainer/distillation.py:216
↓ 2 callersMethodfwdbwd_one_step
(self, batch, train_generator)
trainer/gan.py:235
↓ 2 callersMethodfwdbwd_one_step
(self, batch, train_generator)
trainer/rewarded_distillation.py:218
↓ 2 callersMethodgenerate
r""" Generates video frames from text prompt using diffusion process. Args: input_prompt (`str`): Text pr
wan/text2video.py:110
next →1–100 of 579, ranked by callers