d8ahazard / sd_dreambooth_extension

Other
1.86k stars 283 forks source link

[Bug]: "ValueError: 'C:\\Users\\canbu\\OneDrive\\Bilder\\N\\Screenshot_20230627_160320_Gallery.jpg' is not in list" #1291

Closed Treeseeker closed 1 year ago

Treeseeker commented 1 year ago

Is there an existing issue for this?

What happened?

Im trying to train my pics on dreambooth / stable diffusion, however every time I start training by clicking "train", it returns the error "ValueError: 'C:\Users\canbu\OneDrive\Bilder\N\Screenshot_20230627_160320_Gallery.jpg' is not in list". I have already tried fixing that problem by updating the extensions as well as restarting stable diffusion but it didnt change anything.

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

Commit and libraries

Starting at Initializing Dreambooth and ending several lines below at [+] bitsandbytes version 0.35.4 installed..

Command Line Arguments

No

Console logs

File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\ui_functions.py", line 729, in start_training
    result = main(class_gen_method=class_gen_method)
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1548, in main
    return inner_loop()
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\memory.py", line 119, in decorator
    return function(batch_size, grad_size, prof, *args, **kwargs)
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1212, in inner_loop
    for step, batch in enumerate(train_dataloader):
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\accelerate\data_loader.py", line 378, in __iter__
    current_batch = next(dataloader_iter)
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\utils\data\dataloader.py", line 634, in __next__
    data = self._next_data()
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\utils\data\dataloader.py", line 677, in _next_data
    index = self._next_index()  # may raise StopIteration
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\utils\data\dataloader.py", line 624, in _next_index
    return next(self._sampler_iter)  # may raise StopIteration
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\dataset\bucket_sampler.py", line 23, in __iter__
    batch = self.fill_batch()
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\dataset\bucket_sampler.py", line 77, in fill_batch
    img_index, img_repeats = self.dataset.get_example(current_res)
  File "C:\Users\canbu\Desktop\SD 2.0\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\dataset\db_dataset.py", line 329, in get_example
    image_index = self.sample_indices.index(image_path)
ValueError: 'C:\\Users\\canbu\\OneDrive\\Bilder\\N\\Screenshot_20230627_160320_Gallery.jpg' is not in list
Steps:   0%|                                                                                  | 0/1050 [00:00<?, ?it/s]
Restored system models.
Duration: 00:00:04

Additional information

No response

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days