The arguments of FastVideo Inference.
Module Contents
API
-
class fastvideo.fastvideo_args.ExecutionMode[source]
Bases: str
, enum.Enum
Enumeration for different pipeline modes.
Inherits from str to allow string comparison for backward compatibility.
Initialization
Initialize self. See help(type(self)) for accurate signature.
-
DISTILLATION[source]
βdistillationβ
-
FINETUNING[source]
βfinetuningβ
-
INFERENCE[source]
βinferenceβ
-
PREPROCESS[source]
βpreprocessβ
-
classmethod choices() → list[str][source]
Get all available choices as strings for argparse.
-
classmethod from_string(value: str) → fastvideo.fastvideo_args.ExecutionMode[source]
Convert string to ExecutionMode enum.
-
class fastvideo.fastvideo_args.FastVideoArgs[source]
-
STA_mode: fastvideo.configs.pipelines.base.STA_Mode[source]
None
-
VSA_sparsity: float[source]
0.0
-
static add_cli_args(parser: fastvideo.utils.FlexibleArgumentParser) → fastvideo.utils.FlexibleArgumentParser[source]
-
boundary_ratio: float | None[source]
None
-
cache_strategy: str[source]
βnoneβ
-
check_fastvideo_args() → None[source]
Validate inference arguments for consistency
-
disable_autocast: bool[source]
False
-
dist_timeout: int | None[source]
None
-
distributed_executor_backend: str[source]
βmpβ
-
dit_cpu_offload: bool[source]
True
-
enable_stage_verification: bool[source]
True
-
enable_torch_compile: bool[source]
False
-
classmethod from_cli_args(args: argparse.Namespace) → fastvideo.fastvideo_args.FastVideoArgs[source]
-
classmethod from_kwargs(**kwargs: Any) → fastvideo.fastvideo_args.FastVideoArgs[source]
-
hsdp_replicate_dim: int[source]
1
-
hsdp_shard_dim: int[source]
None
-
image_encoder_cpu_offload: bool[source]
True
-
inference_mode: bool[source]
True
-
lora_nickname: str[source]
βdefaultβ
-
lora_path: str | None[source]
None
-
lora_target_modules: list[str] | None[source]
None
-
mask_strategy_file_path: str | None[source]
None
-
master_port: int | None[source]
None
-
moba_config: dict[str, Any][source]
βfield(β¦)β
-
moba_config_path: str | None[source]
None
-
mode: fastvideo.fastvideo_args.ExecutionMode[source]
None
-
model_loaded: dict[str, bool][source]
βfield(β¦)β
-
model_path: str[source]
None
-
model_paths: dict[str, str][source]
βfield(β¦)β
-
num_gpus: int[source]
1
-
output_type: str[source]
βpilβ
-
override_transformer_cls_name: str | None[source]
None
-
pin_cpu_memory: bool[source]
True
-
pipeline_config: fastvideo.configs.pipelines.base.PipelineConfig[source]
βfield(β¦)β
-
preprocess_config: fastvideo.configs.configs.PreprocessConfig | None[source]
None
-
prompt_txt: str | None[source]
None
-
revision: str | None[source]
None
-
skip_time_steps: int[source]
15
-
sp_size: int[source]
None
-
text_encoder_cpu_offload: bool[source]
True
-
tp_size: int[source]
None
-
property training_mode: bool[source]
-
trust_remote_code: bool[source]
False
-
use_fsdp_inference: bool[source]
True
-
vae_cpu_offload: bool[source]
True
-
workload_type: fastvideo.fastvideo_args.WorkloadType[source]
None
-
class fastvideo.fastvideo_args.TrainingArgs[source]
Bases: fastvideo.fastvideo_args.FastVideoArgs
Training arguments. Inherits from FastVideoArgs and adds training-specific
arguments. If there are any conflicts, the training arguments will take
precedence.
-
VSA_decay_interval_steps: int[source]
1
-
VSA_decay_rate: float[source]
0.01
-
static add_cli_args(parser: fastvideo.utils.FlexibleArgumentParser) → fastvideo.utils.FlexibleArgumentParser[source]
-
betas: str[source]
β0.9,0.999β
-
checkpointing_steps: int[source]
0
-
checkpoints_total_limit: int[source]
0
-
context_noise: int[source]
0
-
data_path: str = <Multiline-String>[source]
-
dataloader_num_workers: int[source]
0
-
dfake_gen_update_ratio: int[source]
5
-
distill_cfg: float[source]
0.0
-
dit_model_name_or_path: str = <Multiline-String>[source]
-
ema_decay: float[source]
0.0
-
ema_start_step: int[source]
0
-
enable_gradient_checkpointing_type: str | None[source]
None
-
enable_gradient_masking: bool[source]
True
-
fake_score_betas: str[source]
β0.9,0.999β
-
fake_score_learning_rate: float[source]
0.0
-
fake_score_lr_scheduler: str[source]
βconstantβ
-
fake_score_model_path: str = <Multiline-String>[source]
-
classmethod from_cli_args(args: argparse.Namespace) → fastvideo.fastvideo_args.TrainingArgs[source]
-
fsdp_sharding_startegy: str = <Multiline-String>[source]
-
generator_model_path: str = <Multiline-String>[source]
-
generator_update_interval: int[source]
5
-
gradient_accumulation_steps: int[source]
0
-
gradient_mask_last_n_frames: int[source]
21
-
group_frame: bool[source]
False
-
group_resolution: bool[source]
False
-
hunyuan_teacher_disable_cfg: bool[source]
False
-
independent_first_frame: bool[source]
False
-
init_weights_from_safetensors: str = <Multiline-String>[source]
-
last_step_only: bool[source]
False
-
learning_rate: float[source]
0.0
-
linear_quadratic_threshold: float[source]
0.0
-
linear_range: float[source]
0.0
-
log_validation: bool[source]
False
-
log_visualization: bool[source]
False
-
logit_mean: float[source]
0.0
-
logit_std: float[source]
1.0
-
lora_alpha: int | None[source]
None
-
lora_rank: int | None[source]
None
-
lora_training: bool[source]
False
-
lr_num_cycles: int[source]
0
-
lr_power: float[source]
0.0
-
lr_scheduler: str[source]
βconstantβ
-
lr_warmup_steps: int[source]
0
-
master_weight_type: str = <Multiline-String>[source]
-
max_grad_norm: float[source]
0.0
-
max_timestep_ratio: float[source]
0.98
-
max_train_steps: int[source]
0
-
min_lr_ratio: float[source]
0.5
-
min_timestep_ratio: float[source]
0.2
-
mixed_precision: str = <Multiline-String>[source]
-
mode_scale: float[source]
0.0
-
multi_phased_distill_schedule: str = <Multiline-String>[source]
-
not_apply_cfg_solver: bool[source]
False
-
num_euler_timesteps: int[source]
0
-
num_frame_per_block: int[source]
3
-
num_frames: int[source]
0
-
num_height: int[source]
0
-
num_latent_t: int[source]
0
-
num_train_epochs: int[source]
0
-
num_width: int[source]
0
-
output_dir: str = <Multiline-String>[source]
-
precondition_outputs: bool[source]
False
-
pred_decay_type: str = <Multiline-String>[source]
-
pred_decay_weight: float[source]
0.0
-
pretrained_model_name_or_path: str = <Multiline-String>[source]
-
real_score_guidance_scale: float[source]
3.5
-
real_score_model_path: str = <Multiline-String>[source]
-
resume_from_checkpoint: str = <Multiline-String>[source]
-
same_step_across_blocks: bool[source]
False
-
scale_lr: bool[source]
False
-
scheduler_type: str = <Multiline-String>[source]
-
seed: int | None[source]
None
-
selective_checkpointing: float[source]
0.0
-
simulate_generator_forward: bool[source]
False
-
tracker_project_name: str = <Multiline-String>[source]
-
train_batch_size: int[source]
0
-
train_sp_batch_size: int[source]
0
-
training_cfg_rate: float[source]
0.0
-
training_state_checkpointing_steps: int[source]
0
-
use_ema: bool[source]
False
-
validate_cache_structure: bool[source]
False
-
validation_dataset_file: str = <Multiline-String>[source]
-
validation_guidance_scale: str = <Multiline-String>[source]
-
validation_preprocessed_path: str = <Multiline-String>[source]
-
validation_sampling_steps: str = <Multiline-String>[source]
-
validation_steps: float[source]
0.0
-
wandb_run_name: str = <Multiline-String>[source]
-
warp_denoising_step: bool[source]
False
-
weight_decay: float[source]
0.0
-
weight_only_checkpointing_steps: int[source]
0
-
weighting_scheme: str = <Multiline-String>[source]
-
class fastvideo.fastvideo_args.WorkloadType[source]
Bases: str
, enum.Enum
Enumeration for different workload types.
Inherits from str to allow string comparison for backward compatibility.
Initialization
Initialize self. See help(type(self)) for accurate signature.
-
I2I[source]
βi2iβ
-
I2V[source]
βi2vβ
-
T2I[source]
βt2iβ
-
T2V[source]
βt2vβ
-
classmethod choices() → list[str][source]
Get all available choices as strings for argparse.
-
classmethod from_string(value: str) → fastvideo.fastvideo_args.WorkloadType[source]
Convert string to WorkloadType enum.
-
fastvideo.fastvideo_args.get_current_fastvideo_args() → fastvideo.fastvideo_args.FastVideoArgs[source]
-
fastvideo.fastvideo_args.logger[source]
βinit_logger(β¦)β
-
fastvideo.fastvideo_args.parse_int_list(value: str) → list[int][source]
-
fastvideo.fastvideo_args.prepare_fastvideo_args(argv: list[str]) → fastvideo.fastvideo_args.FastVideoArgs[source]
Prepare the inference arguments from the command line arguments.
- Parameters:
argv β The command line arguments. Typically, it should be sys.argv[1:]
to ensure compatibility with parse_args
when no arguments are passed.
- Returns:
The inference arguments.
-
fastvideo.fastvideo_args.set_current_fastvideo_args(fastvideo_args: fastvideo.fastvideo_args.FastVideoArgs)[source]
Temporarily set the current fastvideo config.
Used during model initialization.
We save the current fastvideo config in a global variable,
so that all modules can access it, e.g. custom ops
can access the fastvideo config to determine how to dispatch.