Unverified Commit f7822ae4 authored by Doug J's avatar Doug J Committed by GitHub
Browse files

Update train_text_to_image_sdxl.py (#8830)



Enable VAE hash to be able to change with args change. If not, train_dataset_with_embeddiings may have row number inconsistency with train_dataset_with_vae.
Co-authored-by: default avatarLinoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
parent d81cc6f1
...@@ -919,7 +919,7 @@ def main(args): ...@@ -919,7 +919,7 @@ def main(args):
# fingerprint used by the cache for the other processes to load the result # fingerprint used by the cache for the other processes to load the result
# details: https://github.com/huggingface/diffusers/pull/4038#discussion_r1266078401 # details: https://github.com/huggingface/diffusers/pull/4038#discussion_r1266078401
new_fingerprint = Hasher.hash(args) new_fingerprint = Hasher.hash(args)
new_fingerprint_for_vae = Hasher.hash(vae_path) new_fingerprint_for_vae = Hasher.hash((vae_path, args))
train_dataset_with_embeddings = train_dataset.map( train_dataset_with_embeddings = train_dataset.map(
compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment