Skip to content

fix: --save_video and --dump_blend CLI flags are always enabled due to conflicting argparse defaults #12

@octo-patch

Description

@octo-patch

Bug Description

Two CLI flags use action='store_true' combined with default=True, which makes them permanently enabled regardless of whether the flag is passed. Users cannot disable these behaviors.

batch_infer.py--save_video

parser.add_argument("--save_video", action='store_true', default=True,
                    help="Merge rendered images into a video at video.mp4.")

action='store_true' already sets the default to False and flips it to True when the flag is present. Adding default=True overrides this, so args.save_video is always True — the flag cannot be disabled. As a result, video generation runs unconditionally on every batch inference run, which may be undesirable (e.g., when processing large datasets or when only images are needed).

scene_processor/to_blend.py--dump_blend

parser.add_argument('--dump_blend', default=True, action='store_true',
                    help='Save Blender file after rendering')

Same issue: --dump_blend is always True. In contrast, --save_img on the very next line correctly uses only action='store_true' without default=True, confirming this is unintentional.

Expected Behavior

  • --save_video should be opt-in (default: False), enabled only when explicitly passed.
  • --dump_blend should be opt-in (default: False), consistent with the behavior of --save_img.

Proposed Fix

Remove default=True from both argument definitions:

# batch_infer.py
parser.add_argument("--save_video", action='store_true',
                    help="Merge rendered images into a video at video.mp4.")

# scene_processor/to_blend.py
parser.add_argument('--dump_blend', action='store_true',
                    help='Save Blender file after rendering')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions