Skip to content

Commit f7822ae

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: Linoy Tsaban <[email protected]>
1 parent d81cc6f commit f7822ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/text_to_image/train_text_to_image_sdxl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def preprocess_train(examples):
919919
# fingerprint used by the cache for the other processes to load the result
920920
# details: https://github.com/huggingface/diffusers/pull/4038#discussion_r1266078401
921921
new_fingerprint = Hasher.hash(args)
922-
new_fingerprint_for_vae = Hasher.hash(vae_path)
922+
new_fingerprint_for_vae = Hasher.hash((vae_path, args))
923923
train_dataset_with_embeddings = train_dataset.map(
924924
compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint
925925
)

0 commit comments

Comments
 (0)