Fix --model-list-batch to actually work

The --model-list-batch option was added but wasn't being handled properly.
Now it correctly exits after printing the batch output, and is also
added to the list of options that don't require --prompt.
parent 4c421b4f
...@@ -7850,8 +7850,9 @@ def main(args): ...@@ -7850,8 +7850,9 @@ def main(args):
sys.exit(0) sys.exit(0)
# Handle model list # Handle model list
if args.model_list: if args.model_list or args.model_list_batch:
print_model_list(args) print_model_list(args)
sys.exit(0)
# Handle show-model # Handle show-model
if args.show_model: if args.show_model:
...@@ -7940,7 +7941,7 @@ def main(args): ...@@ -7940,7 +7941,7 @@ def main(args):
character_ops = ['list_characters', 'show_character', 'create_character', 'train_lora'] character_ops = ['list_characters', 'show_character', 'create_character', 'train_lora']
has_character_op = any(getattr(args, op, None) for op in character_ops) has_character_op = any(getattr(args, op, None) for op in character_ops)
if not getattr(args, 'auto', False) and not args.model_list and not args.tts_list and not args.search_models and not args.add_model and not args.validate_model and not has_character_op and not args.prompt: if not getattr(args, 'auto', False) and not args.model_list and not args.model_list_batch and not args.tts_list and not args.search_models and not args.add_model and not args.validate_model and not has_character_op and not args.prompt:
parser.error("the following arguments are required: --prompt") parser.error("the following arguments are required: --prompt")
# Handle auto mode with retry support # Handle auto mode with retry support
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment