mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-30 10:56:38 +08:00
FLUX: split small functions
This commit is contained in:
parent
a5f2bab070
commit
b0e017a16c
@ -157,7 +157,8 @@ def save_adapters(iteration, flux, args):
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def setup_arg_parser():
|
||||
"""Set up and return the argument parser."""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Finetune Flux to generate images with a specific subject"
|
||||
)
|
||||
@ -247,7 +248,11 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
parser.add_argument("dataset")
|
||||
return parser
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = setup_arg_parser()
|
||||
args = parser.parse_args()
|
||||
|
||||
# Load the model and set it up for LoRA training. We use the same random
|
||||
|
Loading…
Reference in New Issue
Block a user