[X] I have searched the existing issues and checked the recent builds/commits of both this extension and the webui
What happened?
After completing all the steps of the training, at the moment of saving the model, it throws out "Exception training model: ''AttnProcessor2_0' object has no attribute 'state_dict''.".
Steps to reproduce the problem
Go to ....
Press ....
... at the moment of saving the model
Commit and libraries
Starting at Initializing Dreambooth and ending several lines below at [+] bitsandbytes version 0.35.4 installed..
[!] xformers version 0.0.20 installed.
[+] torch version 2.0.1+cu118 installed.
[+] torchvision version 0.15.2+cu118 installed.
[+] accelerate version 0.23.0 installed.
[+] diffusers version 0.21.4 installed.
[+] transformers version 4.32.1 installed.
[+] bitsandbytes version 0.41.1 installed.
Command Line Arguments
set COMMANDLINE_ARGS=--force-enable-xformers --xformers --no-half --theme dark
Console logs
Python 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing requirements
If submitting an issue on github, please provide the full startup log for debugging purposes.
Initializing Dreambooth
Dreambooth revision: 1a1d1621086a4725fda1200256f319c845dc7a8a
Successfully installed accelerate-0.23.0 fastapi-0.94.1 transformers-4.32.1
[!] xformers version 0.0.20 installed.
[+] torch version 2.0.1+cu118 installed.
[+] torchvision version 0.15.2+cu118 installed.
[+] accelerate version 0.23.0 installed.
[+] diffusers version 0.21.4 installed.
[+] transformers version 4.32.1 installed.
[+] bitsandbytes version 0.41.1 installed.
Launching Web UI with arguments: --force-enable-xformers --xformers --no-half --theme dark
Loading weights [6ce0161689] from C:\AI\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\scripts\main.py:301: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
with gr.Row().style(equal_height=False):
CUDA SETUP: Loading binary C:\AI\stable-diffusion-webui\venv\Lib\site-packages\bitsandbytes\libbitsandbytes_cudaall.dll...
Creating model from config: C:\AI\stable-diffusion-webui\configs\v1-inference.yaml
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 24.8s (prepare environment: 19.6s, import torch: 1.9s, import gradio: 0.7s, setup paths: 0.5s, initialize shared: 0.1s, other imports: 0.5s, load scripts: 0.7s, create ui: 0.6s, gradio launch: 0.1s).
Applying attention optimization: xformers... done.
Model loaded in 3.6s (load weights from disk: 0.3s, create model: 0.3s, apply weights to model: 1.5s, load textual inversion embeddings: 0.8s, calculate empty prompt: 0.7s).
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:02<00:00, 7.81it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:01<00:00, 15.88it/s]
Initializing dreambooth training...████████████████████████████████████████████████████| 20/20 [00:01<00:00, 17.71it/s]
Traceback (most recent call last): | 0/1 [00:00<?, ?it/s]
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils\_errors.py", line 261, in hf_raise_for_status
response.raise_for_status()
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/real_skin.safetensors
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\ui_functions.py", line 730, in start_training
result = main(class_gen_method=class_gen_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1809, in main
return inner_loop()
^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\memory.py", line 126, in decorator
return function(batch_size, grad_size, prof, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 543, in inner_loop
lora_state_dict, network_alphas = LoraLoaderMixin.lora_state_dict(args.lora_model_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\diffusers\loaders.py", line 1239, in lora_state_dict
weight_name = cls._best_guess_weight_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\diffusers\loaders.py", line 1288, in _best_guess_weight_name files_in_repo = model_info(pretrained_model_name_or_path_or_dict).siblings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 1698, in model_info
hf_raise_for_status(r)
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils\_errors.py", line 293, in hf_raise_for_status
raise RepositoryNotFoundError(message, response) from e
huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-651c1f81-712e1245027b691e54fe820f;a8193408-65f6-4aad-af39-623db703dd12)
Repository Not Found for url: https://huggingface.co/api/models/real_skin.safetensors.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.
Loading LoRA...: 0%| | 0/1 [00:00<?, ?it/s]
Duration: 00:00:05
Duration: 00:00:06
Initializing dreambooth training...
Traceback (most recent call last): | 0/1 [00:00<?, ?it/s]
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils\_errors.py", line 261, in hf_raise_for_status
response.raise_for_status()
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/real_skin.safetensors
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\ui_functions.py", line 730, in start_training
result = main(class_gen_method=class_gen_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1809, in main
return inner_loop()
^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\memory.py", line 126, in decorator
return function(batch_size, grad_size, prof, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 543, in inner_loop
lora_state_dict, network_alphas = LoraLoaderMixin.lora_state_dict(args.lora_model_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\diffusers\loaders.py", line 1239, in lora_state_dict
weight_name = cls._best_guess_weight_name(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\diffusers\loaders.py", line 1288, in _best_guess_weight_name files_in_repo = model_info(pretrained_model_name_or_path_or_dict).siblings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils\_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 1698, in model_info
hf_raise_for_status(r)
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\huggingface_hub\utils\_errors.py", line 293, in hf_raise_for_status
raise RepositoryNotFoundError(message, response) from e
huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-651c1f9a-2961a0bd2885b6a43e51cede;e43c790a-57ec-4cd6-8f33-eddd64773cd1)
Repository Not Found for url: https://huggingface.co/api/models/real_skin.safetensors.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.
Loading LoRA...: 0%| | 0/1 [00:00<?, ?it/s]
Duration: 00:00:05
Duration: 00:00:06
Initializing dreambooth training...
WARNING:dreambooth.optimization:Exception importing 8bit AdamW: function 'cadam32bit_grad_fp32' not found:00, 3.92it/s]
Traceback (most recent call last):
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\optimization.py", line 594, in get_optimizer
from bitsandbytes.optim import AdamW8bit
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\bitsandbytes\optim\__init__.py", line 8, in <module>
from .adagrad import Adagrad, Adagrad8bit, Adagrad32bit
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\bitsandbytes\optim\adagrad.py", line 5, in <module>
from bitsandbytes.optim.optimizer import Optimizer1State
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\bitsandbytes\optim\optimizer.py", line 12, in <module>
import bitsandbytes.functional as F
File "C:\AI\stable-diffusion-webui\venv\Lib\site-packages\bitsandbytes\functional.py", line 31, in <module>
str2optimizer32bit["adam"] = (lib.cadam32bit_grad_fp32, lib.cadam32bit_grad_fp16, lib.cadam32bit_grad_bf16)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\ctypes\__init__.py", line 389, in __getattr__
func = self.__getitem__(name)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\ctypes\__init__.py", line 394, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: function 'cadam32bit_grad_fp32' not found
function 'cadam32bit_grad_fp32' not found
WARNING: Using default optimizer (AdamW from Torch)
Init dataset!set: 0%| | 0/5 [00:00<?, ?it/s]
Preparing Dataset (With Caching)
Loading latent cache...h Caching): 0%| | 0/5 [00:00<?, ?it/s]
Bucket 0 (512, 512, 0) - Instance Images: 14 | Class Images: 0 | Max Examples/batch: 14
Total Buckets 1 - Instance Images: 14 | Class Images: 0 | Max Examples/batch: 14
Total images / batch: 14, total examples: 14█████████████████████████████████████████| 14/14 [00:00<00:00, 6998.00it/s]
Initializing bucket counter!
Steps: 24%|████████▊ | 70/294 [00:20<00:59, 3.77it/s, loss=0.00307, lr=2.96e-7, vram=12.5]C:\AI\stable-diffusion-webui\venv\Lib\site-packages\transformers\models\clip\feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.
warnings.warn(
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:00<00:00, 9.94it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:01<00:00, 3.96it/s]
Saving diffusion model: 100%|████████████████████████████████████████████████████████████| 1/1 [00:01<00:00, 1.92s/it]Model name: xcxcles: 33%|█████████████████████▎ | 1/3 [00:06<00:13, 6.87s/it]
C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\helpers\log_parser.py:324: FutureWarning: DataFrame.fillna with 'method' is deprecated and will raise in a future version. Use obj.ffill() or obj.bfill() instead.
all_df_loss = all_df_loss.fillna(method="ffill")
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\loss_plot_3010.png
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\ram_plot_3010.png
Cleanup log parse.
Steps: 48%|█████████████████▏ | 140/294 [00:52<00:39, 3.93it/s, loss=0.00204, lr=5.96e-7, vram=12.5]C:\AI\stable-diffusion-webui\venv\Lib\site-packages\transformers\models\clip\feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.
warnings.warn(
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:00<00:00, 11.00it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:01<00:00, 4.00it/s]
Saving diffusion model: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.18s/it]Model name: xcxcles: 33%|█████████████████████▎ | 1/3 [00:06<00:12, 6.01s/it]
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696333078.WIN-R92QLG4UU0E.6968.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696333215.WIN-R92QLG4UU0E.6968.1
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696336325.WIN-R92QLG4UU0E.4232.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339654.WIN-R92QLG4UU0E.2520.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339810.WIN-R92QLG4UU0E.4836.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339847.WIN-R92QLG4UU0E.4836.1
Log file updated, re-parsing: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696341947.WIN-R92QLG4UU0E.6924.0
C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\helpers\log_parser.py:324: FutureWarning: DataFrame.fillna with 'method' is deprecated and will raise in a future version. Use obj.ffill() or obj.bfill() instead.
all_df_loss = all_df_loss.fillna(method="ffill")
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\loss_plot_3080.png
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\ram_plot_3080.png
Cleanup log parse.
Steps: 71%|███████████████████████████▏ | 210/294 [01:23<00:21, 3.92it/s, loss=0.095, lr=8.96e-7, vram=12.5]C:\AI\stable-diffusion-webui\venv\Lib\site-packages\transformers\models\clip\feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.
warnings.warn(
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:00<00:00, 11.18it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:01<00:00, 3.94it/s]
Saving diffusion model: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.12s/it]Model name: xcxcles: 33%|█████████████████████▎ | 1/3 [00:06<00:12, 6.10s/it]
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696333078.WIN-R92QLG4UU0E.6968.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696333215.WIN-R92QLG4UU0E.6968.1
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696336325.WIN-R92QLG4UU0E.4232.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339654.WIN-R92QLG4UU0E.2520.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339810.WIN-R92QLG4UU0E.4836.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339847.WIN-R92QLG4UU0E.4836.1
Log file updated, re-parsing: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696341947.WIN-R92QLG4UU0E.6924.0
C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\helpers\log_parser.py:324: FutureWarning: DataFrame.fillna with 'method' is deprecated and will raise in a future version. Use obj.ffill() or obj.bfill() instead.
all_df_loss = all_df_loss.fillna(method="ffill")
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\loss_plot_3150.png
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\ram_plot_3150.png
Cleanup log parse.
Steps: 95%|████████████████████████████████████▏ | 280/294 [01:55<00:03, 3.92it/s, loss=0.0111, lr=1.2e-6, vram=12.5]C:\AI\stable-diffusion-webui\venv\Lib\site-packages\transformers\models\clip\feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.
warnings.warn(
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:00<00:00, 11.27it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:01<00:00, 3.97it/s]
Saving diffusion model: 100%|████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.24s/it]Model name: xcxcles: 33%|█████████████████████▎ | 1/3 [00:05<00:11, 5.97s/it]
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696333078.WIN-R92QLG4UU0E.6968.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696333215.WIN-R92QLG4UU0E.6968.1
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696336325.WIN-R92QLG4UU0E.4232.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339654.WIN-R92QLG4UU0E.2520.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339810.WIN-R92QLG4UU0E.4836.0
Log file unchanged, nothing to do: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696339847.WIN-R92QLG4UU0E.4836.1
Log file updated, re-parsing: C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\dreambooth\events.out.tfevents.1696341947.WIN-R92QLG4UU0E.6924.0
C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\helpers\log_parser.py:324: FutureWarning: DataFrame.fillna with 'method' is deprecated and will raise in a future version. Use obj.ffill() or obj.bfill() instead.
all_df_loss = all_df_loss.fillna(method="ffill")
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\loss_plot_3220.png
Saving C:\AI\stable-diffusion-webui\models\dreambooth\xcxc\logging\ram_plot_3220.png
Cleanup log parse.
Steps: 100%|█████████████████████████████████████| 294/294 [02:11<00:00, 3.41it/s, loss=0.0746, lr=1.26e-6, vram=12.5]C:\AI\stable-diffusion-webui\venv\Lib\site-packages\transformers\models\clip\feature_extraction_clip.py:28: FutureWarning: The class CLIPFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use CLIPImageProcessor instead.
warnings.warn(
Loading pipeline components...: 100%|████████████████████████████████████████████████████| 7/7 [00:00<00:00, 11.22it/s]
Traceback (most recent call last): | 0/1 [00:00<?, ?it/s]
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\ui_functions.py", line 730, in start_training
result = main(class_gen_method=class_gen_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1809, in main
return inner_loop()
^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\memory.py", line 126, in decorator
return function(batch_size, grad_size, prof, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1766, in inner_loop
check_save(True)
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 976, in check_save
save_weights(
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\train_dreambooth.py", line 1100, in save_weights
unet_lora_layers_to_save = unet_attn_processors_state_dict(unet)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\utils\model_utils.py", line 242, in unet_attn_processors_state_dict
for parameter_key, parameter in attn_processor.state_dict().items():
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AttnProcessor2_0' object has no attribute 'state_dict'
Steps: 100%|█████████████████████████████████████| 294/294 [02:13<00:00, 2.20it/s, loss=0.0746, lr=1.26e-6, vram=12.5]
Duration: 00:02:18
Saving Lora Weights...: 0%| | 0/1 [00:00<?, ?it/s]
Duration: 00:02:19
Is there an existing issue for this?
What happened?
After completing all the steps of the training, at the moment of saving the model, it throws out "Exception training model: ''AttnProcessor2_0' object has no attribute 'state_dict''.".
Steps to reproduce the problem
Commit and libraries
Starting at
Initializing Dreambooth
and ending several lines below at[+] bitsandbytes version 0.35.4 installed.
.Initializing Dreambooth Dreambooth revision: 1a1d1621086a4725fda1200256f319c845dc7a8a Successfully installed accelerate-0.23.0 fastapi-0.94.1 transformers-4.32.1
[!] xformers version 0.0.20 installed. [+] torch version 2.0.1+cu118 installed. [+] torchvision version 0.15.2+cu118 installed. [+] accelerate version 0.23.0 installed. [+] diffusers version 0.21.4 installed. [+] transformers version 4.32.1 installed. [+] bitsandbytes version 0.41.1 installed.
Command Line Arguments
Console logs
Additional information
No response