From c576f806397f7bca1085518616f8aaebfa2e98b4 Mon Sep 17 00:00:00 2001 From: Kohya S Date: Thu, 25 Jan 2024 18:43:07 +0900 Subject: [PATCH 1/6] Fix ControlNetLLLite training issue #1069 --- library/train_util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/library/train_util.py b/library/train_util.py index 4ac6728b0..ba428e508 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -1774,6 +1774,7 @@ def __init__( tokenizer, max_token_length, resolution, + network_multiplier, enable_bucket, min_bucket_reso, max_bucket_reso, From 322ee52c7775bf09ff32913f2e0d14d85605680a Mon Sep 17 00:00:00 2001 From: feffy380 <114889020+feffy380@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:15:53 +0100 Subject: [PATCH 2/6] Update requirements.txt Update safetensors to fix a crash when using `--fp8_base --save_state` --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8517d95ac..c09e62b7f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ einops==0.6.1 pytorch-lightning==1.9.0 # bitsandbytes==0.39.1 tensorboard==2.10.1 -safetensors==0.3.1 +safetensors==0.4.2 # gradio==3.16.2 altair==4.2.2 easygui==0.98.3 From 85bc371ebc3ab311b2e6b75a98bdf9fb310516f7 Mon Sep 17 00:00:00 2001 From: DukeG Date: Fri, 26 Jan 2024 18:58:47 +0800 Subject: [PATCH 3/6] test --- train_network.py | 1 + 1 file changed, 1 insertion(+) diff --git a/train_network.py b/train_network.py index 8b6c395c5..2e06262f7 100644 --- a/train_network.py +++ b/train_network.py @@ -774,6 +774,7 @@ def remove_model(old_ckpt_name): else: raise NotImplementedError("multipliers for each sample is not supported yet") # print(f"set multiplier: {multipliers}") + print(network) network.set_multiplier(multipliers) with torch.set_grad_enabled(train_text_encoder), accelerator.autocast(): From 50f631c768eb3db578c98224106236cf3abc03f9 Mon Sep 17 00:00:00 2001 From: DukeG Date: Fri, 26 Jan 2024 20:02:48 +0800 Subject: [PATCH 4/6] test --- train_network.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/train_network.py b/train_network.py index 2e06262f7..d64d7a1bc 100644 --- a/train_network.py +++ b/train_network.py @@ -774,7 +774,8 @@ def remove_model(old_ckpt_name): else: raise NotImplementedError("multipliers for each sample is not supported yet") # print(f"set multiplier: {multipliers}") - print(network) + print(type(network)) + network.set_multiplier(multipliers) with torch.set_grad_enabled(train_text_encoder), accelerator.autocast(): From 4e67fb8444b54deb0d867cc3d622f694a62b5c2b Mon Sep 17 00:00:00 2001 From: DukeG Date: Fri, 26 Jan 2024 20:22:49 +0800 Subject: [PATCH 5/6] test --- train_network.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/train_network.py b/train_network.py index d64d7a1bc..8d102ae8f 100644 --- a/train_network.py +++ b/train_network.py @@ -774,9 +774,7 @@ def remove_model(old_ckpt_name): else: raise NotImplementedError("multipliers for each sample is not supported yet") # print(f"set multiplier: {multipliers}") - print(type(network)) - - network.set_multiplier(multipliers) + accelerator.unwrap_model(network).set_multiplier(multipliers) with torch.set_grad_enabled(train_text_encoder), accelerator.autocast(): # Get the text embedding for conditioning From 736365bdd5033697e925c5ece377ef5fe7f6f902 Mon Sep 17 00:00:00 2001 From: Kohya S Date: Sat, 27 Jan 2024 18:31:01 +0900 Subject: [PATCH 6/6] update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 0de787b8f..e2c606708 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,18 @@ ControlNet-LLLite, a novel method for ControlNet with SDXL, is added. See [docum ## Change History +### Jan 27, 2024 / 2024/1/27: v0.8.3 + +- Fixed a bug that the training crashes when `--fp8_base` is specified with `--save_state`. PR [#1079](https://github.com/kohya-ss/sd-scripts/pull/1079) Thanks to feffy380! + - `safetensors` is updated. Please see [Upgrade](#upgrade) and update the library. +- Fixed a bug that the training crashes when `network_multiplier` is specified with multi-GPU training. PR [#1084](https://github.com/kohya-ss/sd-scripts/pull/1084) Thanks to fireicewolf! +- Fixed a bug that the training crashes when training ControlNet-LLLite. + +- `--fp8_base` 指定時に `--save_state` での保存がエラーになる不具合が修正されました。 PR [#1079](https://github.com/kohya-ss/sd-scripts/pull/1079) feffy380 氏に感謝します。 + - `safetensors` がバージョンアップされていますので、[Upgrade](#upgrade) を参照し更新をお願いします。 +- 複数 GPU での学習時に `network_multiplier` を指定するとクラッシュする不具合が修正されました。 PR [#1084](https://github.com/kohya-ss/sd-scripts/pull/1084) fireicewolf 氏に感謝します。 +- ControlNet-LLLite の学習がエラーになる不具合を修正しました。 + ### Jan 23, 2024 / 2024/1/23: v0.8.2 - [Experimental] The `--fp8_base` option is added to the training scripts for LoRA etc. The base model (U-Net, and Text Encoder when training modules for Text Encoder) can be trained with fp8. PR [#1057](https://github.com/kohya-ss/sd-scripts/pull/1057) Thanks to KohakuBlueleaf!