The arguments of FastVideo Inference.
Module Contents
API
-
class fastvideo.v1.fastvideo_args.FastVideoArgs[source]
-
DEFAULT_TEXT_ENCODER_PRECISIONS[source]
(βfp16β, βfp16β)
-
static add_cli_args(parser: fastvideo.v1.utils.FlexibleArgumentParser) → fastvideo.v1.utils.FlexibleArgumentParser[source]
-
cache_strategy: str[source]
βnoneβ
-
check_fastvideo_args() → None[source]
Validate inference arguments for consistency
-
device[source]
None
-
device_str: Optional[str][source]
None
-
disable_autocast: bool[source]
False
-
dist_timeout: Optional[int][source]
None
-
distributed_executor_backend: str[source]
βmpβ
-
dit_config: fastvideo.v1.configs.models.DiTConfig[source]
βfield(β¦)β
-
embedded_cfg_scale: float[source]
6.0
-
enable_torch_compile: bool[source]
False
-
flow_shift: Optional[float][source]
None
-
classmethod from_cli_args(args: argparse.Namespace) → fastvideo.v1.fastvideo_args.FastVideoArgs[source]
-
image_encoder_config: fastvideo.v1.configs.models.EncoderConfig[source]
βfield(β¦)β
-
image_encoder_precision: str[source]
βfp32β
-
inference_mode: bool[source]
True
-
log_level: str[source]
βinfoβ
-
mask_strategy_file_path: Optional[str][source]
None
-
model_path: str[source]
None
-
neg_magic: Optional[str][source]
None
-
num_gpus: int[source]
1
-
output_type: str[source]
βpilβ
-
pos_magic: Optional[str][source]
None
-
postprocess_text_funcs: Tuple[Callable[[Any], Any], ...][source]
βfield(β¦)β
-
precision: str[source]
βbf16β
-
preprocess_text_funcs: Tuple[Callable[[str], str], ...][source]
βfield(β¦)β
-
revision: Optional[str][source]
None
-
sp_size: Optional[int][source]
None
-
text_encoder_configs: Tuple[fastvideo.v1.configs.models.EncoderConfig, ...][source]
βfield(β¦)β
-
text_encoder_precisions: Tuple[str, ...][source]
βfield(β¦)β
-
timesteps_scale: Optional[bool][source]
None
-
tp_size: Optional[int][source]
None
-
property training_mode: bool[source]
-
trust_remote_code: bool[source]
False
-
use_cpu_offload: bool[source]
False
-
vae_config: fastvideo.v1.configs.models.VAEConfig[source]
βfield(β¦)β
-
vae_precision: str[source]
βfp16β
-
vae_sp: bool[source]
False
-
vae_tiling: bool[source]
True
-
class fastvideo.v1.fastvideo_args.TrainingArgs[source]
Bases: fastvideo.v1.fastvideo_args.FastVideoArgs
Training arguments. Inherits from FastVideoArgs and adds training-specific
arguments. If there are any conflicts, the training arguments will take
precedence.
-
static add_cli_args(parser: fastvideo.v1.utils.FlexibleArgumentParser) → fastvideo.v1.utils.FlexibleArgumentParser[source]
-
allow_tf32: bool[source]
False
-
cache_dir: str = <Multiline-String>[source]
-
cfg: float[source]
0.0
-
checkpointing_steps: int[source]
0
-
checkpoints_total_limit: int[source]
0
-
data_path: str = <Multiline-String>[source]
-
dataloader_num_workers: int[source]
0
-
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
-
classmethod from_cli_args(args: argparse.Namespace) → fastvideo.v1.fastvideo_args.TrainingArgs[source]
-
fsdp_sharding_startegy: str = <Multiline-String>[source]
-
gradient_accumulation_steps: int[source]
0
-
gradient_checkpointing: bool[source]
False
-
group_frame: bool[source]
False
-
group_resolution: bool[source]
False
-
hunyuan_teacher_disable_cfg: 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
-
logging_dir: str = <Multiline-String>[source]
-
logit_mean: float[source]
0.0
-
logit_std: float[source]
1.0
-
lr_num_cycles: int[source]
0
-
lr_power: float[source]
0.0
-
lr_scheduler: str = <Multiline-String>[source]
-
lr_warmup_steps: int[source]
0
-
master_weight_type: str = <Multiline-String>[source]
-
max_grad_norm: float[source]
0.0
-
max_train_steps: int[source]
0
-
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_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]
-
resume_from_checkpoint: bool[source]
False
-
scale_lr: bool[source]
False
-
scheduler_type: str = <Multiline-String>[source]
-
seed: Optional[int][source]
None
-
selective_checkpointing: float[source]
0.0
-
tracker_project_name: str = <Multiline-String>[source]
-
train_batch_size: int[source]
0
-
train_sp_batch_size: int[source]
0
-
use_ema: bool[source]
False
-
validation_guidance_scale: str = <Multiline-String>[source]
-
validation_prompt_dir: str = <Multiline-String>[source]
-
validation_sampling_steps: str = <Multiline-String>[source]
-
validation_steps: float[source]
0.0
-
weight_decay: float[source]
0.0
-
weighting_scheme: str = <Multiline-String>[source]
-
fastvideo.v1.fastvideo_args.get_current_fastvideo_args() → fastvideo.v1.fastvideo_args.FastVideoArgs[source]
-
fastvideo.v1.fastvideo_args.logger[source]
βinit_logger(β¦)β
-
fastvideo.v1.fastvideo_args.postprocess_text(output: Any) → Any[source]
-
fastvideo.v1.fastvideo_args.prepare_fastvideo_args(argv: List[str]) → fastvideo.v1.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.v1.fastvideo_args.preprocess_text(prompt: str) → str[source]
-
fastvideo.v1.fastvideo_args.set_current_fastvideo_args(fastvideo_args: fastvideo.v1.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.