d8ahazard / sd_dreambooth_extension

Other
1.86k stars 281 forks source link

[Bug]: bucket Error when training a new model based SD1.5 Version 'multiprocessing_context' #1354

Closed dugemkakek closed 10 months ago

dugemkakek commented 11 months ago

Is there an existing issue for this?

What happened?

tried Training normaly with dreambooth for a sd 1.5 model with 200 image and 100 class image, but gon an error

Steps to reproduce the problem

do training like usual with the setting downbelow.

Commit and libraries

Initializing Dreambooth Dreambooth revision: cf086c536b141fc522ff11f6cffc8b7b12da04b9 Successfully installed fastapi-0.94.1

[+] xformers version 0.0.20 installed. [+] torch version 2.0.1+cu118 installed. [+] torchvision version 0.15.2+cu118 installed. [+] accelerate version 0.21.0 installed. [+] diffusers version 0.19.3 installed. [+] transformers version 4.30.2 installed. [+] bitsandbytes version 0.35.4 installed.

Command Line Arguments

--xformers --api

Console logs

Initializing dreambooth training...
Pre-processing images: PNG: : 235it [00:00, 2973.99it/s]
Nothing to generate.s: PNG: : 0it [00:00, ?it/s]                                                                                                   | 0/340 [00:00<?, ?it/s]
                                                                                                                                                                           Enabling xformers memory efficient attention for unet                                                                                               | 0/340 [00:00<?, ?it/s]
Enabling xformers memory efficient attention for unet
                                                                                                                                                                           Found 0 reg images. 0%|                                                                                                                             | 0/340 [00:00<?, ?it/s]
Preparing dataset...
Init dataset!
Preparing Dataset (With Caching)
                                                                                                                                                                           Loading cached latents...|                                                                                                                          | 0/235 [00:00<?, ?it/s]
Bucket 0 (512, 512, 0) - Instance Images: 235 | Class Images: 0 | Max Examples/batch: 235
                                                                                                                                                                           Saving cache!nts...: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 235/235 [00:21<00:00, 11.58it/s]
Total Buckets 1 - Instance Images: 235 | Class Images: 0 | Max Examples/batch: 235

Total images / batch: 235, total examples: 235███████████████████████████████████████████████████████████████████████████████████████████| 235/235 [00:21<00:00, 11.58it/s]
                                                                                                                                                                           Total dataset length (steps): 235
                  Initializing bucket counter!
0it [00:00, ?it/s]Traceback (most recent call last):
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\extensions\sd_dreambooth_extension\dreambooth\ui_functions.py", line 729, in start_training
    result = main(class_gen_method=class_gen_method)
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1552, in main
    return inner_loop()
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\extensions\sd_dreambooth_extension\dreambooth\memory.py", line 119, in decorator
    return function(batch_size, grad_size, prof, *args, **kwargs)
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 640, in inner_loop
    ) = accelerator.prepare(
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\venv\lib\site-packages\accelerate\accelerator.py", line 1202, in prepare
    result = tuple(
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\venv\lib\site-packages\accelerate\accelerator.py", line 1203, in <genexpr>
    self._prepare_one(obj, first_pass=True, device_placement=d) for obj, d in zip(args, device_placement)
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\venv\lib\site-packages\accelerate\accelerator.py", line 1028, in _prepare_one
    return self.prepare_data_loader(obj, device_placement=device_placement)
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\venv\lib\site-packages\accelerate\accelerator.py", line 1737, in prepare_data_loader
    prepared_data_loader = prepare_data_loader(
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\venv\lib\site-packages\accelerate\data_loader.py", line 802, in prepare_data_loader
    dataloader = DataLoaderShard(
  File "F:\Programs\Stable-Diffuser\stable-diffusion-webui-master\SDCleanSep2023\venv\lib\site-packages\accelerate\data_loader.py", line 370, in __init__
    super().__init__(dataset, **kwargs)
TypeError: intercept_args() got an unexpected keyword argument 'multiprocessing_context'
Duration: 00:00:58
0it [00:23, ?it/s]
Restored system models.
Duration: 00:01:00

Additional information

db3 db2 db4 db5 db1

feitgemel commented 11 months ago

Same error . Did you find any solution ?

dugemkakek commented 11 months ago

Same error . Did you find any solution ?

nope, still confused as hell

edit :

eventually i can make it work just by disabling other all Extensions and only enabling Dreambooth

github-actions[bot] commented 11 months 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