From a6aa21bd07dfe98279b8a6f8dedfbb57808602fa Mon Sep 17 00:00:00 2001 From: Wei Zhou <69577934+JerryZhou54@users.noreply.github.com> Date: Mon, 9 Jun 2025 23:50:21 -0700 Subject: [PATCH] [bugfix][Cli Inference] Resolve runtime errors when running fastvideo generate (#495) --- fastvideo/v1/fastvideo_args.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fastvideo/v1/fastvideo_args.py b/fastvideo/v1/fastvideo_args.py index 3c2c14dcb..9625ac559 100644 --- a/fastvideo/v1/fastvideo_args.py +++ b/fastvideo/v1/fastvideo_args.py @@ -387,9 +387,8 @@ class FastVideoArgs: # Use getattr with default value from the dataclass for potentially missing attributes else: default_value = getattr(cls, attr, None) - attr = getattr(args, attr, default_value) # type: ignore - if attr is not None: - kwargs[attr] = attr + if getattr(args, attr, default_value) is not None: + kwargs[attr] = getattr(args, attr, default_value) return cls(**kwargs)