Skip to content

Fix empty Model Default selections in training configs - #3310

Merged
bghira merged 1 commit into
mainfrom
fix/model-default-select-args
Nov 3, 2026
Merged

bghira merged 1 commit into
mainfrom
fix/model-default-select-args

Conversation

@bghira

@bghira bghira commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Saving a WebUI config with Auto-detect or Model Default selected can write empty strings for prediction_type, validation_noise_scheduler and distillation_method. Launching then emits flags such as --prediction_type=, which argparse rejects.

Omit blank CLI values when a select offers a null choice and no explicit empty-string choice, allowing the parser to apply the model default. Preserve valid selections, intentionally empty negative prompts, and explicit empty resume choices. Existing saved configs work without manual editing.

Regression coverage includes prefixed/unprefixed keys, null/blank/whitespace values, explicit overrides, and repeated MOSS form normalization, save, JSON reload and real argparse parsing.

Validation: 85 configuration and training-service tests passed with Python 3.13:

.venv/bin/python -m unittest -v -f tests.test_allow_empty_fields tests.test_config_templates tests.test_parser_type_override tests.test_text_json_field tests.test_training_service tests.test_loader_boolean_handling tests.test_config_store_flatten

@bghira
bghira merged commit 3ae3ac8 into main Nov 3, 2026
2 checks passed
@bghira
bghira deleted the fix/model-default-select-args branch November 3, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant