mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-31 02:32:57 +08:00
Merge pull request #2661 from Melanpan/master
Raise an assertion error if no training images have been found.
This commit is contained in:
commit
5207cba56f
@ -83,6 +83,7 @@ class PersonalizedBase(Dataset):
|
|||||||
|
|
||||||
self.dataset.append(entry)
|
self.dataset.append(entry)
|
||||||
|
|
||||||
|
assert len(self.dataset) > 1, "No images have been found in the dataset."
|
||||||
self.length = len(self.dataset) * repeats // batch_size
|
self.length = len(self.dataset) * repeats // batch_size
|
||||||
|
|
||||||
self.initial_indexes = np.arange(len(self.dataset))
|
self.initial_indexes = np.arange(len(self.dataset))
|
||||||
|
Loading…
Reference in New Issue
Block a user