Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/dreambooth/train_dreambooth_lora_flux2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1005,8 +1005,7 @@ def __init__(self, dataset: DreamBoothDataset, batch_size: int, drop_last: bool
self.sampler_len += 1 # Count the number of batches

def __iter__(self):
# Shuffle the order of the batches each epoch
random.shuffle(self.batches)
# Keep the precomputed batch order stable so step-indexed caches stay aligned.
for batch in self.batches:
yield batch
Comment thread
azolotenkov marked this conversation as resolved.

Expand Down
3 changes: 1 addition & 2 deletions examples/dreambooth/train_dreambooth_lora_flux2_img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,7 @@ def __init__(self, dataset: DreamBoothDataset, batch_size: int, drop_last: bool
self.sampler_len += 1 # Count the number of batches

Comment thread
azolotenkov marked this conversation as resolved.
def __iter__(self):
# Shuffle the order of the batches each epoch
random.shuffle(self.batches)
# Keep the precomputed batch order stable so step-indexed caches stay aligned.
for batch in self.batches:
yield batch

Expand Down
3 changes: 1 addition & 2 deletions examples/dreambooth/train_dreambooth_lora_flux2_klein.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,8 +1000,7 @@ def __init__(self, dataset: DreamBoothDataset, batch_size: int, drop_last: bool
self.sampler_len += 1 # Count the number of batches

Comment thread
azolotenkov marked this conversation as resolved.
def __iter__(self):
# Shuffle the order of the batches each epoch
random.shuffle(self.batches)
# Keep the precomputed batch order stable so step-indexed caches stay aligned.
for batch in self.batches:
yield batch

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,7 @@ def __init__(self, dataset: DreamBoothDataset, batch_size: int, drop_last: bool
self.sampler_len += 1 # Count the number of batches

Comment thread
azolotenkov marked this conversation as resolved.
def __iter__(self):
# Shuffle the order of the batches each epoch
random.shuffle(self.batches)
# Keep the precomputed batch order stable so step-indexed caches stay aligned.
for batch in self.batches:
yield batch

Expand Down
3 changes: 1 addition & 2 deletions examples/dreambooth/train_dreambooth_lora_z_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,7 @@ def __init__(self, dataset: DreamBoothDataset, batch_size: int, drop_last: bool
self.sampler_len += 1 # Count the number of batches

def __iter__(self):
# Shuffle the order of the batches each epoch
random.shuffle(self.batches)
# Keep the precomputed batch order stable so step-indexed caches stay aligned.
for batch in self.batches:
yield batch
Comment thread
azolotenkov marked this conversation as resolved.

Expand Down
Loading