From 80c68837295f92c0b267e8a18da57369cc9feb48 Mon Sep 17 00:00:00 2001 From: Victor Hall Date: Sat, 18 Feb 2023 15:17:08 -0500 Subject: [PATCH] default to 2perc zero freq noise --- Train_Colab.ipynb | 28 ++++++++++++++-------------- train.json | 2 +- train.py | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Train_Colab.ipynb b/Train_Colab.ipynb index c5f4a30..6b47819 100644 --- a/Train_Colab.ipynb +++ b/Train_Colab.ipynb @@ -3,8 +3,8 @@ { "cell_type": "markdown", "metadata": { - "id": "view-in-github", - "colab_type": "text" + "colab_type": "text", + "id": "view-in-github" }, "source": [ "\"Open" @@ -256,8 +256,8 @@ "cell_type": "code", "execution_count": null, "metadata": { - "id": "j9pEI69WXS9w", - "cellView": "form" + "cellView": "form", + "id": "j9pEI69WXS9w" }, "outputs": [], "source": [ @@ -337,14 +337,14 @@ "shuffle_tags = False #@param{type:\"boolean\"}\n", "#@markdown * You can turn off the text encoder training (generally not suggested)\n", "Disable_text_Encoder= False #@param{type:\"boolean\"}\n", - "#@markdown * Skip the nth last layer of CLIP.\n", - "Clip_skip = 1 #@param {type:\"slider\", min:0, max:4, step:1}\n", - "#@markdown * ratio of captions dropped from training data.\n", + "#@markdown * Skip the nth last layer of CLIP. 0 is default for SD1.x, 2 recommended for SD2.x models.\n", + "Clip_skip = 0 #@param {type:\"slider\", min:0, max:4, step:1}\n", + "#@markdown * Ratio of training on empty caption. Improves unconditional guidance.\n", "Conditional_DropOut = 0.04 #@param {type:\"slider\", min:0, max:0.3, step:0.01}\n", - "#@markdown * Ratio of images randomly to flip horizontally.\n", - "Picture_flip = 0.15 #@param {type:\"slider\", min:0, max:0.5, step:0.05}\n", - "#@markdown * This can improve contrast in light and dark scenes, Use a ratio between 0-10% for Best results.\n", - "zero_frequency_noise = 0.1 #@param {type:\"slider\", min:0, max:0.25, step:0.01}\n", + "#@markdown * Ratio of images randomly to flip horizontally. Use for small data sets. May negtively affect likeness of subjects with asymmetric features.\n", + "Picture_flip = 0.0 #@param {type:\"slider\", min:0, max:0.5, step:0.05}\n", + "#@markdown * This can improve contrast in light and dark scenes, Use a ratio between 0-10% for Best results. 0\n", + "zero_frequency_noise = 0.05 #@param {type:\"slider\", min:0, max:0.25, step:0.01}\n", "\n", "#@markdown * Weights and Biases logging token. \n", "# #@markdown Paste your token here if you have an account so you can use it to track your training progress. If you don't have an account, you can create one for free at https://wandb.ai/site. Log will use your project name from above. This is a free online logging utility.\n", @@ -480,8 +480,8 @@ "metadata": { "accelerator": "GPU", "colab": { - "provenance": [], - "include_colab_link": true + "include_colab_link": true, + "provenance": [] }, "gpuClass": "standard", "kernelspec": { @@ -491,7 +491,7 @@ }, "language_info": { "name": "python", - "version": "3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]" + "version": "3.10.5" }, "vscode": { "interpreter": { diff --git a/train.json b/train.json index ebd1998..0dbc73a 100644 --- a/train.json +++ b/train.json @@ -39,5 +39,5 @@ "write_schedule": false, "rated_dataset": false, "rated_dataset_target_dropout_percent": 50, - "zero_frequency_noise_ratio": 0.0 + "zero_frequency_noise_ratio": 0.02 } diff --git a/train.py b/train.py index 08a82ca..023ecbe 100644 --- a/train.py +++ b/train.py @@ -936,7 +936,7 @@ if __name__ == "__main__": argparser.add_argument("--write_schedule", action="store_true", default=False, help="write schedule of images and their batches to file (def: False)") argparser.add_argument("--rated_dataset", action="store_true", default=False, help="enable rated image set training, to less often train on lower rated images through the epochs") argparser.add_argument("--rated_dataset_target_dropout_percent", type=int, default=50, help="how many images (in percent) should be included in the last epoch (Default 50)") - argparser.add_argument("--zero_frequency_noise_ratio", type=float, default=0.0, help="adds zero frequency noise, for improving contrast (def: 0.0) use 0.0 to 0.15") + argparser.add_argument("--zero_frequency_noise_ratio", type=float, default=0.02, help="adds zero frequency noise, for improving contrast (def: 0.0) use 0.0 to 0.15") # load CLI args to overwrite existing config args args = argparser.parse_args(args=argv, namespace=args)