Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JaydenLyh/Reward-Forcing
/ functions
Functions
579 in github.com/JaydenLyh/Reward-Forcing
⨍
Functions
579
◇
Types & classes
123
Method
__init__
(self, dim, num_heads, dropout=0.1, eps=1e-5)
wan/modules/xlm_roberta.py:12
Method
__init__
(self, dim, num_heads, post_norm, dropout=0.1, eps=1e-5)
wan/modules/xlm_roberta.py:51
Method
__init__
(self, dim, eps=1e-5)
wan/modules/model.py:72
Method
__init__
(self, dim, eps=1e-6, elementwise_affine=False)
wan/modules/model.py:91
Method
__init__
(self, dim, num_heads, window_size=(-1, -1),
wan/modules/model.py:104
Method
__init__
(self, dim, num_heads, window_size=(-1, -1),
wan/modules/model.py:226
Method
__init__
(self, cross_attn_type, dim, ffn_dim, num_
wan/modules/model.py:277
Method
__init__
(self, dim=1536, ffn_dim=8192, num_heads=12,
wan/modules/model.py:359
Method
__init__
(self, in_dim, out_dim)
wan/modules/model.py:471
Method
__init__
(self, num_registers: int, dim: int)
wan/modules/model.py:485
Method
__init__
r""" Initialize the diffusion model backbone. Args: model_type (`str`, *optional*, defaults to 't2v'): Mo
wan/modules/model.py:509
Method
__init__
Args: api_key: The API key for Dash Scope authentication and access to related services. model_name: Model name, 'qwe
wan/utils/prompt_extend.py:159
Method
__init__
Args: model_name: Use predefined model names such as 'QwenVL2.5_7B' and 'Qwen2.5_14B', which are specific version
wan/utils/prompt_extend.py:309
Method
__init__
( self, num_train_timesteps: int = 1000, solver_order: int = 2, prediction_typ
wan/utils/fm_solvers.py:129
Method
__init__
( self, num_train_timesteps: int = 1000, solver_order: int = 2,
wan/utils/fm_solvers_unipc.py:77
Method
__init__
Initialize the DMD (Distribution Matching Distillation) module. This class is self-contained and compute generator and fake score los
model/causvid.py:9
Method
__init__
(self, args, device)
model/base.py:98
Method
__init__
(self, args, device)
model/base.py:224
Method
__init__
(self, args, device)
model/base.py:313
Method
__init__
Initialize the Diffusion loss module.
model/diffusion.py:9
Method
__init__
Initialize the GAN module. This class is self-contained and compute generator and fake score losses in the forward pass.
model/gan.py:11
Method
__init__
Initialize the Re-DMD (Rewarded Distribution Matching Distillation) module. This class is self-contained and compute rewarded generat
model/re_dmd.py:9
Method
__init__
Initialize the DMD (Distribution Matching Distillation) module. This class is self-contained and compute generator and fake score los
model/sid.py:9
Method
__init__
Initialize the DMD (Distribution Matching Distillation) module. This class is self-contained and compute generator and fake score los
model/dmd.py:10
Method
__init__
Initialize the ODERegression module. This class is self-contained and compute generator losses in the forward pass given prec
model/ode_regression.py:10
Method
__init__
(self)
demo_utils/vae_block3.py:131
Method
__init__
(self, dim=96, z_dim=16, dim_mult=[1, 2, 4, 4],
demo_utils/vae_block3.py:188
Method
__init__
(self, loader, cache="calibration.cache", max_batches=10)
demo_utils/vae_torch2trt.py:140
Method
__init__
(self, in_dim, out_dim, dropout=0.0)
demo_utils/vae.py:15
Method
__init__
(self)
demo_utils/vae.py:152
Method
__init__
(self, dim=96, z_dim=16, dim_mult=[1, 2, 4, 4],
demo_utils/vae.py:200
Method
__init__
(self)
demo_utils/vae.py:319
Method
__init__
(self, n_in, n_out)
demo_utils/taehv.py:26
Method
__init__
(self, n_f, stride)
demo_utils/taehv.py:49
Method
__init__
Initialize pretrained TAEHV from the given checkpoint. Arg: checkpoint_path: path to weight file to load. taehv.pth for Hunyuan,
demo_utils/taehv.py:163
Method
__init__
(self, video_file_path)
demo_utils/taehv.py:248
Method
__init__
(self, video_file_path, width_height, fps=30)
demo_utils/taehv.py:264
Method
__init__
(self, config)
trainer/distillation.py:21
Method
__init__
(self, config)
trainer/diffusion.py:18
Method
__init__
(self, config)
trainer/ode.py:20
Method
__init__
(self, config)
trainer/gan.py:20
Method
__init__
(self, config)
trainer/rewarded_distillation.py:23
Method
__init__
( self, args, device, generator=None, text_encoder
pipeline/bidirectional_diffusion_inference.py:11
Method
__init__
( self, args, device, generator=None, text_encoder
pipeline/causal_diffusion_inference.py:11
Method
__init__
( self, args, device, generator=None, text_encoder
pipeline/causal_inference.py:10
Method
__init__
( self, args, device, generator=None, text_encoder
pipeline/bidirectional_inference.py:8
Method
__init__
(self, denoising_step_list: List[int], scheduler: SchedulerInterface,
pipeline/self_forcing_training.py:9
Method
__init__
(self, denoising_step_list: List[int], scheduler: SchedulerInterface,
pipeline/reward_forcing_training.py:10
Method
__iter__
(self)
demo_utils/taehv.py:253
Method
__len__
(self)
utils/dataset.py:24
Method
__len__
(self)
utils/dataset.py:45
Method
__len__
(self)
utils/dataset.py:96
Method
__len__
(self)
utils/dataset.py:182
Method
__len__
(self)
wan/utils/fm_solvers.py:856
Method
__len__
(self)
wan/utils/fm_solvers_unipc.py:799
Method
__next__
(self)
demo_utils/taehv.py:256
Method
__post_init__
(self)
videoalign/utils.py:47
Method
__post_init__
(self)
videoalign/utils.py:77
Method
_forward_classify
r""" Feature extraction through the diffusion model Args: x (List[Tensor]): List of input video tensors,
wan/modules/model.py:773
Method
_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:262
Method
_initialize_models
(self, args)
model/diffusion.py:34
Method
_initialize_models
(self, args)
model/ode_regression.py:46
Method
_pad_sequence
Pad the sequences to the maximum length.
videoalign/inference.py:80
Method
_pad_sequence
Pad the sequences to the maximum length.
videoalign/wan_inference.py:80
Function
_read_video_decord
read video using decord.VideoReader Args: ele (dict): a dict contains the configuration of video. support keys: - vid
videoalign/vision_process.py:227
Function
_read_video_decord
read video using decord.VideoReader Args: ele (dict): a dict contains the configuration of video. support keys: - vid
wan/utils/qwen_vl_utils.py:221
Function
_read_video_torchvision
read video using torchvision.io.read_video Args: ele (dict): a dict contains the configuration of video. support keys:
videoalign/vision_process.py:169
Function
_read_video_torchvision
read video using torchvision.io.read_video Args: ele (dict): a dict contains the configuration of video. support keys:
wan/utils/qwen_vl_utils.py:177
Method
_run_generator
Optionally simulate the generator's input from noise using backward simulation and then run the generator for one-step. Input
model/base.py:102
Method
_run_generator
Optionally simulate the generator's input from noise using backward simulation and then run the generator for one-step. Input
model/base.py:317
Method
_save
(self, output_dir: Optional[str] = None, state_dict=None)
videoalign/trainer.py:560
Method
_save_checkpoint
(self, model, trial, metrics=None)
videoalign/trainer.py:529
Method
_set_gradient_checkpointing
(self, module, value=False)
wan/modules/causal_model.py:522
Method
_set_gradient_checkpointing
(self, module, value=False)
wan/modules/model.py:623
Method
_sigma_to_t
(self, sigma)
wan/utils/fm_solvers.py:330
Method
_sigma_to_t
(self, sigma)
wan/utils/fm_solvers_unipc.py:269
Method
add_custom_field
(self, key: str, value)
wan/utils/prompt_extend.py:108
Method
add_noise
Diffusion forward corruption process. Input: - clean_latent: the clean latent with shape [B*T, C, H, W] - noi
utils/scheduler.py:159
Method
add_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, timesteps: torch.
wan/utils/fm_solvers.py:815
Method
add_noise
( self, original_samples: torch.Tensor, noise: torch.Tensor, timesteps: torch.
wan/utils/fm_solvers_unipc.py:758
Function
add_tensors_with_padding
(tensor1, tensor2)
demo_utils/utils.py:304
Method
attention_mask
(b, h, q_idx, kv_idx)
wan/modules/causal_model.py:555
Function
batch_mixture
(a, b=None, probability_a=0.5, mask_a=None)
demo_utils/utils.py:180
Method
begin_index
The index for the first timestep. It should be set from pipeline with `set_begin_index` method.
wan/utils/fm_solvers.py:209
Method
begin_index
The index for the first timestep. It should be set from pipeline with `set_begin_index` method.
wan/utils/fm_solvers_unipc.py:142
Function
blue_mark
(x)
demo_utils/utils.py:386
Function
cache_image
(tensor, save_file, nrow=8, normalize=True, va
wan/utils/utils.py:64
Function
cache_video
(tensor, save_file=None, fps=30, suffix='.mp4',
wan/utils/utils.py:23
Method
cached_decode
(self, z, scale)
wan/modules/vae.py:571
Function
cast_training_params
(m, dtype=torch.float32)
demo_utils/utils.py:126
Function
clamped_linear_interpolation
(x, x_min, y_min, x_max, y_max, sigma=1.0)
demo_utils/utils.py:440
Function
compute_multi_attr_accuracy
(eval_pred, metainfo_idxs=None, eval_dims=None, save_path=None)
videoalign/trainer.py:603
Method
convert_noise_to_x0
Convert the diffusion network's noise prediction to x0 predidction. noise: the predicted noise with shape [B, C, H, W] xt: th
utils/scheduler.py:52
Method
convert_velocity_to_x0
Convert the diffusion network's velocity prediction to x0 predidction. velocity: the predicted noise with shape [B, C, H, W]
utils/scheduler.py:77
Method
copy_to
(self, fsdp_module)
utils/distributed.py:119
Method
create_custom_forward
(module)
wan/modules/causal_model.py:827
Method
create_custom_forward
(module)
wan/modules/model.py:723
Method
create_optimizer
Setup the optimizer. We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the
videoalign/trainer.py:319
Method
critic_loss
Generate image/videos from noise and train the critic with generated samples. The noisy input to the generator is backward simulated.
model/causvid.py:296
Method
critic_loss
Generate image/videos from noise and train the critic with generated samples. The noisy input to the generator is backward simulated.
model/re_dmd.py:243
← previous
next →
301–400 of 579, ranked by callers