support masked loss in sdxl_train ref #589

This commit is contained in:
Kohya S
2024-02-27 21:43:55 +09:00
parent 4a5546d40e
commit a9b64ffba8
2 changed files with 22 additions and 2 deletions

View File

@@ -251,7 +251,9 @@ ControlNet-LLLite, a novel method for ControlNet with SDXL, is added. See [docum
### Masked loss
`train_network.py` and `sdxl_train_network.py` now support the masked loss. `--masked_loss` option is added.
`train_network.py`, `sdxl_train_network.py` and `sdxl_train.py` now support the masked loss. `--masked_loss` option is added.
NOTE: `train_network.py` and `sdxl_train.py` are not tested yet.
ControlNet dataset is used to specify the mask. The mask images should be the RGB images. The pixel value 255 in R channel is treated as the mask (the loss is calculated only for the pixels with the mask), and 0 is treated as the non-mask. See details for the dataset specification in the [LLLite documentation](./docs/train_lllite_README.md#preparing-the-dataset).