Skip to content

Version 0.7.0

Compare
Choose a tag to compare
@kohya-ss kohya-ss released this 05 Nov 10:30
· 338 commits to main since this release
2a23713

SDXL training is now available.

Oct 11, 2023 / 2023/10/11

  • Fix to work make_captions_by_git.py with the latest version of transformers.

  • Improve gen_img_diffusers.py and sdxl_gen_img.py. Both scripts now support the following options:

    • --network_merge_n_models option can be used to merge some of the models. The remaining models aren't merged, so the multiplier can be changed, and the regional LoRA also works.
    • --network_regional_mask_max_color_codes is added. Now you can use up to 7 regions.
      • When this option is specified, the mask of the regional LoRA is the color code based instead of the channel based. The value is the maximum number of the color codes (up to 7).
      • You can specify the mask for each LoRA by colors: 0x0000ff, 0x00ff00, 0x00ffff, 0xff0000, 0xff00ff, 0xffff00, 0xffffff.
  • make_captions_by_git.py が最新の transformers で動作するように修正しました。

  • gen_img_diffusers.pysdxl_gen_img.py を更新し、以下のオプションを追加しました。

    • --network_merge_n_models オプションで一部のモデルのみマージできます。残りのモデルはマージされないため、重みを変更したり、領域別LoRAを使用したりできます。
    • --network_regional_mask_max_color_codes を追加しました。最大7つの領域を使用できます。
      • このオプションを指定すると、領域別LoRAのマスクはチャンネルベースではなくカラーコードベースになります。値はカラーコードの最大数(最大7)です。
      • 各LoRAに対してマスクをカラーで指定できます:0x0000ff、0x00ff00、0x00ffff、0xff0000、0xff00ff、0xffff00、0xffffff。

Oct 9. 2023 / 2023/10/9

  • tag_images_by_wd_14_tagger.py now supports Onnx. If you use Onnx, TensorFlow is not required anymore. #864 Thanks to Isotr0py!

    • --onnx option is added. If you use Onnx, specify --onnx option.
    • Please install Onnx and other required packages.
      1. Uninstall TensorFlow.
      2. pip install tensorboard==2.14.1 This is required for the specified version of protobuf.
      3. pip install protobuf==3.20.3 This is required for Onnx.
      4. pip install onnx==1.14.1
      5. pip install onnxruntime-gpu==1.16.0 or pip install onnxruntime==1.16.0
  • --append_tags option is added to tag_images_by_wd_14_tagger.py. This option appends the tags to the existing tags, instead of replacing them. #858 Thanks to a-l-e-x-d-s-9!

  • OFT is now supported.

    • You can use networks.oft for the network module in sdxl_train_network.py. The usage is the same as networks.lora. Some options are not supported.
    • sdxl_gen_img.py also supports OFT as --network_module.
    • OFT only supports SDXL currently. Because current OFT tweaks Q/K/V and O in the transformer, and SD1/2 have extremely fewer transformers than SDXL.
    • The implementation is heavily based on laksjdjf's OFT implementation. Thanks to laksjdjf!
  • Other bug fixes and improvements.

  • tag_images_by_wd_14_tagger.py が Onnx をサポートしました。Onnx を使用する場合は TensorFlow は不要です。#864 Isotr0py氏に感謝します。

    • Onnxを使用する場合は、--onnx オプションを指定してください。
    • Onnx とその他の必要なパッケージをインストールしてください。
      1. TensorFlow をアンインストールしてください。
      2. pip install tensorboard==2.14.1 protobufの指定バージョンにこれが必要。
      3. pip install protobuf==3.20.3 Onnxのために必要。
      4. pip install onnx==1.14.1
      5. pip install onnxruntime-gpu==1.16.0 または pip install onnxruntime==1.16.0
  • tag_images_by_wd_14_tagger.py--append_tags オプションが追加されました。このオプションを指定すると、既存のタグに上書きするのではなく、新しいタグのみが既存のタグに追加されます。 #858 a-l-e-x-d-s-9氏に感謝します。

  • OFT をサポートしました。

    • sdxl_train_network.py--network_modulenetworks.oft を指定してください。使用方法は networks.lora と同様ですが一部のオプションは未サポートです。
    • sdxl_gen_img.py でも同様に OFT を指定できます。
    • OFT は現在 SDXL のみサポートしています。OFT は現在 transformer の Q/K/V と O を変更しますが、SD1/2 は transformer の数が SDXL よりも極端に少ないためです。
    • 実装は laksjdjf 氏の OFT実装 を多くの部分で参考にしています。laksjdjf 氏に感謝します。
  • その他のバグ修正と改善。

Oct 1. 2023 / 2023/10/1

  • SDXL training is now available in the main branch. The sdxl branch is merged into the main branch.

  • SAI Model Spec metadata is now supported partially. hash_sha256 is not supported yet.

    • The main items are set automatically.
    • You can set title, author, description, license and tags with --metadata_xxx options in each training script.
    • Merging scripts also support minimum SAI Model Spec metadata. See the help message for the usage.
    • Metadata editor will be available soon.
  • bitsandbytes is now optional. Please install it if you want to use it. The insructions are in the later section.

  • albumentations is not required anymore.

  • --v_pred_like_loss ratio option is added. This option adds the loss like v-prediction loss in SDXL training. 0.1 means that the loss is added 10% of the v-prediction loss. The default value is None (disabled).

    • In v-prediction, the loss is higher in the early timesteps (near the noise). This option can be used to increase the loss in the early timesteps.
  • Arbitrary options can be used for Diffusers' schedulers. For example --lr_scheduler_args "lr_end=1e-8".

  • LoRA-FA is added experimentally. Specify --network_module networks.lora_fa option instead of --network_module networks.lora. The trained model can be used as a normal LoRA model.

  • JPEG XL is supported. #786

  • Input perturbation noise is added. See #798 for details.

  • Dataset subset now has caption_prefix and caption_suffix options. The strings are added to the beginning and the end of the captions before shuffling. You can specify the options in .toml.

  • Intel ARC support with IPEX is added. #825

  • Other bug fixes and improvements.