Spaces:
Runtime error
Training fails due "OSError: image file is truncated (52 bytes not processed)"
When trying to start a training with some samples I always get this error while training.
"
Resolving data files: 100%|ββββββββββ| 108/108 [00:00<00:00, 227173.94it/s]
Generating train split: 0 examples [00:00, ? examples/s]
Generating train split: 107 examples [00:00, 6256.32 examples/s]
Traceback (most recent call last):
File "/tmp/model/trainer.py", line 2104, in
main(args)
File "/tmp/model/trainer.py", line 1491, in main
train_dataset = DreamBoothDataset(
File "/tmp/model/trainer.py", line 872, in init
instance_images = dataset["train"][image_column]
File "/app/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2800, in getitem
return self._getitem(key)
File "/app/env/lib/python3.10/site-packages/datasets/arrow_dataset.py", line 2785, in _getitem
formatted_output = format_table(
File "/app/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 629, in format_table
return formatter(pa_table, query_type=query_type)
File "/app/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 398, in call
return self.format_column(pa_table)
File "/app/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 442, in format_column
column = self.python_features_decoder.decode_column(column, pa_table.column_names[0])
File "/app/env/lib/python3.10/site-packages/datasets/formatting/formatting.py", line 218, in decode_column
return self.features.decode_column(column, column_name) if self.features else column
File "/app/env/lib/python3.10/site-packages/datasets/features/features.py", line 1951, in decode_column
[decode_nested_example(self[column_name], value) if value is not None else None for value in column]
File "/app/env/lib/python3.10/site-packages/datasets/features/features.py", line 1951, in
[decode_nested_example(self[column_name], value) if value is not None else None for value in column]
File "/app/env/lib/python3.10/site-packages/datasets/features/features.py", line 1339, in decode_nested_example
return schema.decode_example(obj, token_per_repo_id=token_per_repo_id)
File "/app/env/lib/python3.10/site-packages/datasets/features/image.py", line 185, in decode_example
image.load() # to avoid "Too many open files" errors
File "/app/env/lib/python3.10/site-packages/PIL/ImageFile.py", line 266, in load
raise OSError(msg)
OSError: image file is truncated (52 bytes not processed)
Traceback (most recent call last):
File "/tmp/model/script.py", line 129, in
main()
File "/tmp/model/script.py", line 123, in main
do_train(script_args)
File "/tmp/model/script.py", line 26, in do_train
raise Exception("Training failed.")
"