From f7822ae4bf653ae3ae328f61b280c9a09d169118 Mon Sep 17 00:00:00 2001 From: Doug J Date: Thu, 2 Jan 2025 12:41:18 -0800 Subject: [PATCH] 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: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com> --- examples/text_to_image/train_text_to_image_sdxl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/text_to_image/train_text_to_image_sdxl.py b/examples/text_to_image/train_text_to_image_sdxl.py index 7e1eee2e63..1ddbf93e4b 100644 --- a/examples/text_to_image/train_text_to_image_sdxl.py +++ b/examples/text_to_image/train_text_to_image_sdxl.py @@ -919,7 +919,7 @@ def main(args): # fingerprint used by the cache for the other processes to load the result # details: https://github.com/huggingface/diffusers/pull/4038#discussion_r1266078401 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( compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint )