diff --git a/src/llamafactory/webui/components/top.py b/src/llamafactory/webui/components/top.py index 2515a83d..09d43ac8 100644 --- a/src/llamafactory/webui/components/top.py +++ b/src/llamafactory/webui/components/top.py @@ -50,9 +50,13 @@ def create_top() -> Dict[str, "Component"]: visual_inputs = gr.Checkbox(scale=1) model_name.change(get_model_info, [model_name], [model_path, template, visual_inputs], queue=False) - model_name.input(save_config, inputs=[lang, model_name], queue=False) + model_name.input(save_config, inputs=[lang, model_name], queue=False).then( + list_checkpoints, [model_name, finetuning_type], [checkpoint_path], queue=False + ) model_path.input(save_config, inputs=[lang, model_name, model_path], queue=False) - finetuning_type.change(can_quantize, [finetuning_type], [quantization_bit], queue=False) + finetuning_type.change(can_quantize, [finetuning_type], [quantization_bit], queue=False).then( + list_checkpoints, [model_name, finetuning_type], [checkpoint_path], queue=False + ) checkpoint_path.focus(list_checkpoints, [model_name, finetuning_type], [checkpoint_path], queue=False) return dict(