mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-29 18:26:37 +08:00
fix missing --final-adapter-file crash in dreambooth.py
This commit is contained in:
parent
1727959a27
commit
f00ca80fdb
@ -149,6 +149,12 @@ def setup_arg_parser():
|
|||||||
"--output-dir", default="mlx_output", help="Folder to save the checkpoints in"
|
"--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")
|
parser.add_argument("dataset")
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@ -288,5 +294,5 @@ if __name__ == "__main__":
|
|||||||
losses = []
|
losses = []
|
||||||
tic = time.time()
|
tic = time.time()
|
||||||
|
|
||||||
save_adapters("final_adapters.safetensors", flux, args)
|
save_adapters(args.final_adapter_file, flux, args)
|
||||||
print(f"Training successful. Saved final weights to {args.adapter_file}.")
|
print(f"Training successful. Saved final weights to {args.final_adapter_file}.")
|
||||||
|
Loading…
Reference in New Issue
Block a user