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)