-
Notifications
You must be signed in to change notification settings - Fork 6k
update flax controlnet training script #2951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The documentation is not available anymore as the PR was closed or merged. |
LARGE_ENOUGH_NUMBER = 100 | ||
PngImagePlugin.MAX_TEXT_CHUNK = LARGE_ENOUGH_NUMBER * (1024**2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment for the users to know why this needs to be set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly does this change do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a comment there - to prevent an error I would get when working with coyo700m "Decompressed Data Too Large"
parser.add_argument( | ||
"--load_from_disk", | ||
action="store_true", | ||
help="If True, will load a dataset that was previously saved using [`save_to_disk`] from `--train_data_dir`", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide a link to the load_from_disk
documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the help
seems a bit unclear to me. How does the dataset need to be saved?
nit: I think we can just do save_to_disk
instead of [save_to_disk
].
controlnet.save_pretrained( | ||
f"{args.output_dir}/{global_step}", | ||
params=get_params_to_save(state.params), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes!
My comments are mostly nits but this should be 99% ready to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me!
* load_from_disk + checkpointing_steps * apply feedback
* load_from_disk + checkpointing_steps * apply feedback
* load_from_disk + checkpointing_steps * apply feedback
This PR makes a few modifications to the flax controlnet training script in order to run with larger dataset:
load_from_disk
ValueError: Decompressed Data Too Large
error that I got from torch dataloaderCenterCrop
to image transformation so that batching will work for images with different sizes and different width/ height