Skip to content

Commit 91812be

Browse files
authored
Update train_text_to_image_sdxl.py
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.
1 parent a785992 commit 91812be

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
@@ -917,7 +917,7 @@ def preprocess_train(examples):
917917
# fingerprint used by the cache for the other processes to load the result
918918
# details: https://github.com/huggingface/diffusers/pull/4038#discussion_r1266078401
919919
new_fingerprint = Hasher.hash(args)
920-
new_fingerprint_for_vae = Hasher.hash(vae_path)
920+
new_fingerprint_for_vae = Hasher.hash((vae_path, args))
921921
train_dataset_with_embeddings = train_dataset.map(
922922
compute_embeddings_fn, batched=True, new_fingerprint=new_fingerprint
923923
)

0 commit comments

Comments
 (0)