Skip to content

Version 0.6.1

Compare
Choose a tag to compare
@kohya-ss kohya-ss released this 13 Apr 12:45
· 923 commits to main since this release
5050971

Updates at 8 Apr. 2023, 2023/4/8:

  • Added support for training with weighted captions. Thanks to AI-Casanova for the great contribution!

    • Please refer to the PR for details: PR #336
    • Specify the --weighted_captions option. It is available for all training scripts except Textual Inversion and XTI.
    • This option is also applicable to token strings of the DreamBooth method.
    • The syntax for weighted captions is almost the same as the Web UI, and you can use things like (abc), [abc], and (abc:1.23). Nesting is also possible.
    • If you include a comma in the parentheses, the parentheses will not be properly matched in the prompt shuffle/dropout, so do not include a comma in the parentheses.
  • 重みづけキャプションによる学習に対応しました。 AI-Casanova 氏の素晴らしい貢献に感謝します。

    • 詳細はこちらをご確認ください。PR #336
    • --weighted_captions オプションを指定してください。Textual InversionおよびXTIを除く学習スクリプトで使用可能です。
    • キャプションだけでなく DreamBooth 手法の token string でも有効です。
    • 重みづけキャプションの記法はWeb UIとほぼ同じで、(abc)[abc](abc:1.23)などが使用できます。入れ子も可能です。
    • 括弧内にカンマを含めるとプロンプトのshuffle/dropoutで括弧の対応付けがおかしくなるため、括弧内にはカンマを含めないでください。

Updates at 6 Apr. 2023, 2023/4/6:

  • Added a feature to upload model and state to HuggingFace. Thanks to ddPn08 for the contribution! PR #348

    • When --huggingface_repo_id is specified, the model is uploaded to HuggingFace at the same time as saving the model.
    • Please note that the access token is handled with caution. Please refer to the HuggingFace documentation.
    • For example, specify other arguments as follows.
      • --huggingface_repo_id "your-hf-name/your-model" --huggingface_path_in_repo "path" --huggingface_repo_type model --huggingface_repo_visibility private --huggingface_token hf_YourAccessTokenHere
    • If public is specified for --huggingface_repo_visibility, the repository will be public. If the option is omitted or private (or anything other than public) is specified, it will be private.
    • If you specify --save_state and --save_state_to_huggingface, the state will also be uploaded.
    • If you specify --resume and --resume_from_huggingface, the state will be downloaded from HuggingFace and resumed.
      • In this case, the --resume option is --resume {repo_id}/{path_in_repo}:{revision}:{repo_type}. For example: --resume_from_huggingface --resume your-hf-name/your-model/path/test-000002-state:main:model
    • If you specify --async_upload, the upload will be done asynchronously.
  • Added the documentation for applying LoRA to generate with the standard pipeline of Diffusers. training LoRA (Japanese only)

  • Support for Attention Couple and regional LoRA in gen_img_diffusers.py.

    • If you use AND to separate the prompts, each sub-prompt is sequentially applied to LoRA. --mask_path is treated as a mask image. The number of sub-prompts and the number of LoRA must match.
  • モデルおよびstateをHuggingFaceにアップロードする機能を各スクリプトに追加しました。 PR #348 ddPn08 氏の貢献に感謝します。

    • --huggingface_repo_idが指定されているとモデル保存時に同時にHuggingFaceにアップロードします。
    • アクセストークンの取り扱いに注意してください。HuggingFaceのドキュメントを参照してください。
    • 他の引数をたとえば以下のように指定してください。
      • --huggingface_repo_id "your-hf-name/your-model" --huggingface_path_in_repo "path" --huggingface_repo_type model --huggingface_repo_visibility private --huggingface_token hf_YourAccessTokenHere
    • --huggingface_repo_visibilitypublicを指定するとリポジトリが公開されます。省略時またはprivate(などpublic以外)を指定すると非公開になります。
    • --save_stateオプション指定時に--save_state_to_huggingfaceを指定するとstateもアップロードします。
    • --resumeオプション指定時に--resume_from_huggingfaceを指定するとHuggingFaceからstateをダウンロードして再開します。
      • その時の --resumeオプションは --resume {repo_id}/{path_in_repo}:{revision}:{repo_type}になります。例: --resume_from_huggingface --resume your-hf-name/your-model/path/test-000002-state:main:model
    • --async_uploadオプションを指定するとアップロードを非同期で行います。
  • LoRAの文書に、LoRAを適用してDiffusersの標準的なパイプラインで生成する方法を追記しました。

  • gen_img_diffusers.py で Attention Couple および領域別LoRAに対応しました。

    • プロンプトをANDで区切ると各サブプロンプトが順にLoRAに適用されます。--mask_path がマスク画像として扱われます。サブプロンプトの数とLoRAの数は一致している必要があります。