From f00ca80fdb154bb91339f5582dba600194d417ce Mon Sep 17 00:00:00 2001 From: Peter Sibley Date: Fri, 6 Dec 2024 22:23:55 -0500 Subject: [PATCH] fix missing --final-adapter-file crash in dreambooth.py --- flux/dreambooth.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/flux/dreambooth.py b/flux/dreambooth.py index ffdb02d7..441659c2 100644 --- a/flux/dreambooth.py +++ b/flux/dreambooth.py @@ -149,6 +149,12 @@ def setup_arg_parser(): "--output-dir", default="mlx_output", help="Folder to save the checkpoints in" ) + parser.add_argument( + "--final-adapter-file", + default="final_adapters.safetensors", + help="The file name in the output-dir of the final adapter including the extension .safetensors", + ) + parser.add_argument("dataset") return parser @@ -288,5 +294,5 @@ if __name__ == "__main__": losses = [] tic = time.time() - save_adapters("final_adapters.safetensors", flux, args) - print(f"Training successful. Saved final weights to {args.adapter_file}.") + save_adapters(args.final_adapter_file, flux, args) + print(f"Training successful. Saved final weights to {args.final_adapter_file}.")