Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] DreamBooth Dataset #17

Merged
merged 1 commit into from
Aug 1, 2023
Merged

[BugFix] DreamBooth Dataset #17

merged 1 commit into from
Aug 1, 2023

Conversation

okotaku
Copy link
Owner

@okotaku okotaku commented Aug 1, 2023

Bug

DreamBooth Dataset should support PackInputs output format.

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/diffengine/.mim/tools/train.py", line 103, in <module>
    main()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/diffengine/.mim/tools/train.py", line 99, in main
    runner.train()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/mmengine/runner/runner.py", line 1735, in train
    model = self.train_loop.run()  # type: ignore
  File "/home/ubuntu/.local/lib/python3.8/site-packages/mmengine/runner/loops.py", line 277, in run
    data_batch = next(self.dataloader_iterator)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/mmengine/runner/loops.py", line 164, in __next__
    data = next(self._iterator)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 633, in __next__
    data = self._next_data()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1345, in _next_data
    return self._process_data(data)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
    data.reraise()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/_utils.py", line 644, in reraise
    raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/ubuntu/.local/lib/python3.8/site-packages/diffengine/datasets/hf_dreambooth_datasets.py", line 152, in __getitem__
    result['inputs']['result_class_image'] = result_class_image['inputs']
KeyError: 'inputs'

Checklist

Before PR:

  • Pre-commit or other linting tools are used to fix the potential lint issues.
  • Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
  • The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, like docstring or example tutorials.

@okotaku okotaku self-assigned this Aug 1, 2023
@okotaku okotaku merged commit f764041 into main Aug 1, 2023
@okotaku okotaku deleted the feat/bugfix_dreambooth branch August 1, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant