d8ahazard / sd_dreambooth_extension

Other
1.86k stars 281 forks source link

[Bug]: color noise #1321

Closed povarnikolay closed 1 year ago

povarnikolay commented 1 year ago

Is there an existing issue for this?

What happened?

dreambooth generates color noise idk what the problem is, txt2img works fine https://imgur.com/6kH6KeF

Steps to reproduce the problem

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

Commit and libraries

Initializing Dreambooth Dreambooth revision: c2a5617c587b812b5a408143ddfb18fc49234edf Successfully installed accelerate-0.19.0 fastapi-0.94.1 gitpython-3.1.32 transformers-4.30.2

Does your project take forever to startup? Repetitive dependency installation may be the reason. Automatic1111's base project sets strict requirements on outdated dependencies. If an extension is using a newer version, the dependency is uninstalled and reinstalled twice every startup.

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

Command Line Arguments

--xformers

Console logs

Already up to date.
venv "C:\work\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a
Installing xformers
Collecting xformers==0.0.20
  Using cached xformers-0.0.20-cp310-cp310-win_amd64.whl (97.6 MB)
Installing collected packages: xformers
Successfully installed xformers-0.0.20

[notice] A new release of pip available: 22.2.1 -> 23.2.1
[notice] To update, run: C:\work\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip
Launching Web UI with arguments: --xformers
Loading weights [6ce0161689] from C:\work\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 18.5s (launcher: 7.7s, import torch: 4.3s, import gradio: 1.2s, setup paths: 1.0s, other imports: 1.2s, setup codeformer: 0.1s, load scripts: 1.7s, create ui: 0.9s, gradio launch: 0.3s).
Creating model from config: C:\work\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying attention optimization: xformers... done.
Model loaded in 5.0s (load weights from disk: 1.3s, create model: 0.6s, apply weights to model: 1.3s, apply half(): 0.9s, move model to device: 0.7s, calculate empty prompt: 0.1s).
If submitting an issue on github, please provide the full startup log for debugging purposes.

Initializing Dreambooth
Dreambooth revision: c2a5617c587b812b5a408143ddfb18fc49234edf
Successfully installed accelerate-0.19.0 bitsandbytes-0.35.4 dadaptation-3.1 diffusers-0.16.1 discord-webhook-1.1.0 fastapi-0.94.1 gitpython-3.1.32 lion-pytorch-0.1.2 tensorboard-2.13.0 tqdm-4.65.0 transformers-4.30.2

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

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a
Installing requirements
If submitting an issue on github, please provide the full startup log for debugging purposes.

Initializing Dreambooth
Dreambooth revision: c2a5617c587b812b5a408143ddfb18fc49234edf
Successfully installed accelerate-0.19.0 fastapi-0.94.1 gitpython-3.1.32 transformers-4.30.2

Does your project take forever to startup?
Repetitive dependency installation may be the reason.
Automatic1111's base project sets strict requirements on outdated dependencies.
If an extension is using a newer version, the dependency is uninstalled and reinstalled twice every startup.

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

Launching Web UI with arguments: --xformers
Loading weights [6ce0161689] from C:\work\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: C:\work\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Model loaded in 5.3s (load weights from disk: 0.2s, create model: 0.5s, apply weights to model: 1.2s, apply half(): 0.8s, move model to device: 0.8s, load textual inversion embeddings: 1.3s, calculate empty prompt: 0.4s).
Applying attention optimization: xformers... done.
CUDA SETUP: Loading binary C:\work\stable-diffusion-webui\venv\lib\site-packages\bitsandbytes\libbitsandbytes_cudaall.dll...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 82.0s (launcher: 63.9s, import torch: 5.4s, import gradio: 1.4s, setup paths: 1.0s, other imports: 1.0s, load scripts: 8.3s, create ui: 0.8s, gradio launch: 0.2s).
Loading model from checkpoint.
Loading safetensors...
Pred and size are epsilon and 512, using config: C:\work\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\..\configs\v1-training-default.yaml
v1 model loaded.
Trying to load: C:\work\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\..\configs\v1-training-default.yaml
Converting unet...
Converting vae...
Converting text encoder...
Saving text_encoder
Saving tokenizer
Checkpoint successfully extracted to C:\work\stable-diffusion-webui\models\dreambooth\bchan\working
Restored system models.
Duration: 00:00:15
Updating scheduler name to: DDIM
Total images: 0
Total VRAM: 11
Total images: 0
Total VRAM: 11
Total images: 0
Total VRAM: 11
Wizard results:<br>Num Epochs: 150<br>Num instance images per class image: 5
Preprocessing [Image 18/19]: 100%|█████████████████████████████████████████████████████| 19/19 [00:01<00:00, 16.68it/s]
Initializing dreambooth training...
Pre-processing images: illustration style: : 1040it [00:13, 74.59it/s]
Nothing to generate./1:   0%|                                                       | 1/1021 [00:13<3:56:59, 13.94s/it]
                                                                                                                       Enabling xformers memory efficient attention for unet                                          | 0/1021 [00:00<?, ?it/s]
Enabling xformers memory efficient attention for unet
                                                                                                                       Found 95 reg images.0%|                                                                        | 0/1021 [00:00<?, ?it/s]
Preparing dataset...
Init dataset!
Preparing Dataset (With Caching)
Bucket 0 (512, 512, 0) - Instance Images: 19 | Class Images: 95 | Max Examples/batch:  38
                                                                                                                       Saving cache!nts...: 100%|████████████████████████████████████████████████████████████| 114/114 [00:32<00:00,  3.69it/s]
Total Buckets 1 - Instance Images: 19 | Class Images: 95 | Max Examples/batch:  38

Total images / batch: 38, total examples: 38█████████████████████████████████████████| 114/114 [00:32<00:00,  3.69it/s]
                                                                                                                       Total dataset length (steps): 38
                  Initializing bucket counter!
Steps:   1%|         | 38/5700 [00:56<1:29:49,  1.05it/s, inst_loss=0, loss=0.151, lr=0.0001, prior_loss=0.201, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:30<01:00, 30.03s/it]
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   1%|       | 76/5700 [02:24<1:17:38,  1.21it/s, inst_loss=0, loss=0.0137, lr=0.0001, prior_loss=0.0183, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:19<00:39, 19.85s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   2%|▏       | 114/5700 [03:40<1:21:13,  1.15it/s, inst_loss=0, loss=0.194, lr=0.0001, prior_loss=0.259, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:20<00:41, 20.77s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   3%|▏       | 152/5700 [04:58<1:23:04,  1.11it/s, inst_loss=0, loss=0.305, lr=0.0001, prior_loss=0.407, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:20<00:41, 20.69s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   3%|▎       | 190/5700 [06:19<1:28:21,  1.04it/s, inst_loss=0, loss=0.245, lr=0.0001, prior_loss=0.326, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:20<00:41, 20.80s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   4%|▎        | 228/5700 [07:39<1:22:12,  1.11it/s, inst_loss=0, loss=0.34, lr=0.0001, prior_loss=0.453, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:20<00:41, 20.79s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   5%|▎       | 266/5700 [09:00<1:19:25,  1.14it/s, inst_loss=0, loss=0.304, lr=0.0001, prior_loss=0.405, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:20<00:40, 20.27s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   5%|▍       | 304/5700 [10:19<1:24:53,  1.06it/s, inst_loss=0, loss=0.199, lr=0.0001, prior_loss=0.265, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:20<00:41, 20.57s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_0.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_0.png
Cleanup log parse.
Steps:   6%|▎    | 314/5700 [11:15<2:14:21,  1.50s/it, inst_loss=0, loss=0.00315, lr=0.0001, prior_loss=0.0042, vram=7]Model name: bchanes:  33%|█████████████████████▎                                          | 1/3 [00:21<00:42, 21.06s/it]
Log file updated, re-parsing: C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\dreambooth\events.out.tfevents.1691871605.DESKTOP-QLDINT6.13628.0
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\loss_plot_314.png
Saving C:\work\stable-diffusion-webui\models\dreambooth\bchan\logging\ram_plot_314.png
Cleanup log parse.
                                                                                                                       Cleanup completed.                                                                                | 0/3 [00:00<?, ?it/s]
Steps:   6%|▎    | 314/5700 [12:02<3:26:24,  2.30s/it, inst_loss=0, loss=0.00315, lr=0.0001, prior_loss=0.0042, vram=7]
Restored system models.
Duration: 00:12:57

Additional information

No response