mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
Merge branch 'dev' into masked-loss
This commit is contained in:
2
.github/workflows/typos.yml
vendored
2
.github/workflows/typos.yml
vendored
@@ -18,4 +18,4 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: typos-action
|
- name: typos-action
|
||||||
uses: crate-ci/typos@v1.16.26
|
uses: crate-ci/typos@v1.17.2
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ ControlNet dataset is used to specify the mask. The mask images should be the RG
|
|||||||
|
|
||||||
### Working in progress
|
### Working in progress
|
||||||
|
|
||||||
|
- Colab seems to stop with log output. Try specifying `--console_log_simple` option in the training script to disable rich logging.
|
||||||
- `train_network.py` and `sdxl_train_network.py` are modified to record some dataset settings in the metadata of the trained model (`caption_prefix`, `caption_suffix`, `keep_tokens_separator`, `secondary_separator`, `enable_wildcard`).
|
- `train_network.py` and `sdxl_train_network.py` are modified to record some dataset settings in the metadata of the trained model (`caption_prefix`, `caption_suffix`, `keep_tokens_separator`, `secondary_separator`, `enable_wildcard`).
|
||||||
- Some features are added to the dataset subset settings.
|
- Some features are added to the dataset subset settings.
|
||||||
- `secondary_separator` is added to specify the tag separator that is not the target of shuffling or dropping.
|
- `secondary_separator` is added to specify the tag separator that is not the target of shuffling or dropping.
|
||||||
@@ -269,6 +270,8 @@ ControlNet dataset is used to specify the mask. The mask images should be the RG
|
|||||||
- The existing features `caption_prefix` and `caption_suffix` can be used together. `caption_prefix` and `caption_suffix` are processed first, and then `enable_wildcard`, `keep_tokens_separator`, shuffling and dropping, and `secondary_separator` are processed in order.
|
- The existing features `caption_prefix` and `caption_suffix` can be used together. `caption_prefix` and `caption_suffix` are processed first, and then `enable_wildcard`, `keep_tokens_separator`, shuffling and dropping, and `secondary_separator` are processed in order.
|
||||||
- The examples are [shown below](#example-of-dataset-settings--データセット設定の記述例).
|
- The examples are [shown below](#example-of-dataset-settings--データセット設定の記述例).
|
||||||
|
|
||||||
|
|
||||||
|
- Colab での動作時、ログ出力で停止してしまうようです。学習スクリプトに `--console_log_simple` オプションを指定し、rich のロギングを無効してお試しください。
|
||||||
- `train_network.py` および `sdxl_train_network.py` で、学習したモデルのメタデータに一部のデータセット設定が記録されるよう修正しました(`caption_prefix`、`caption_suffix`、`keep_tokens_separator`、`secondary_separator`、`enable_wildcard`)。
|
- `train_network.py` および `sdxl_train_network.py` で、学習したモデルのメタデータに一部のデータセット設定が記録されるよう修正しました(`caption_prefix`、`caption_suffix`、`keep_tokens_separator`、`secondary_separator`、`enable_wildcard`)。
|
||||||
- データセットのサブセット設定にいくつかの機能を追加しました。
|
- データセットのサブセット設定にいくつかの機能を追加しました。
|
||||||
- シャッフルの対象とならないタグ分割識別子の指定 `secondary_separator` を追加しました。`secondary_separator=";;;"` のように指定します。`secondary_separator` で区切ることで、その部分はシャッフル、drop 時にまとめて扱われます。詳しくは記述例をご覧ください。
|
- シャッフルの対象とならないタグ分割識別子の指定 `secondary_separator` を追加しました。`secondary_separator=";;;"` のように指定します。`secondary_separator` で区切ることで、その部分はシャッフル、drop 時にまとめて扱われます。詳しくは記述例をご覧ください。
|
||||||
|
|||||||
@@ -3,11 +3,6 @@ import gc
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from .utils import setup_logging
|
|
||||||
setup_logging()
|
|
||||||
import logging
|
|
||||||
logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
HAS_CUDA = torch.cuda.is_available()
|
HAS_CUDA = torch.cuda.is_available()
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -64,7 +59,7 @@ def get_preferred_device() -> torch.device:
|
|||||||
device = torch.device("mps")
|
device = torch.device("mps")
|
||||||
else:
|
else:
|
||||||
device = torch.device("cpu")
|
device = torch.device("cpu")
|
||||||
logger.info(f"get_preferred_device() -> {device}")
|
print(f"get_preferred_device() -> {device}")
|
||||||
return device
|
return device
|
||||||
|
|
||||||
|
|
||||||
@@ -82,8 +77,8 @@ def init_ipex():
|
|||||||
|
|
||||||
is_initialized, error_message = ipex_init()
|
is_initialized, error_message = ipex_init()
|
||||||
if not is_initialized:
|
if not is_initialized:
|
||||||
logger.error("failed to initialize ipex: {error_message}")
|
print("failed to initialize ipex:", error_message)
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("failed to initialize ipex: {e}")
|
print("failed to initialize ipex:", e)
|
||||||
|
|||||||
Reference in New Issue
Block a user