summaryrefslogtreecommitdiffstats
path: root/train_ti.py
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-01-07 15:05:39 +0100
committerVolpeon <git@volpeon.ink>2023-01-07 15:05:39 +0100
commit6970adaff742ac89adb3d85c803689210dc030e2 (patch)
tree042eec1c77b800c3b64eff4b8cc40f0a7b153e4d /train_ti.py
parentAdded progressive aspect ratio bucketing (diff)
downloadtextual-inversion-diff-6970adaff742ac89adb3d85c803689210dc030e2.tar.gz
textual-inversion-diff-6970adaff742ac89adb3d85c803689210dc030e2.tar.bz2
textual-inversion-diff-6970adaff742ac89adb3d85c803689210dc030e2.zip
Made aspect ratio bucketing configurable
Diffstat (limited to 'train_ti.py')
-rw-r--r--train_ti.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/train_ti.py b/train_ti.py
index 89c6672..38c9755 100644
--- a/train_ti.py
+++ b/train_ti.py
@@ -146,6 +146,17 @@ def parse_args():
146 ), 146 ),
147 ) 147 )
148 parser.add_argument( 148 parser.add_argument(
149 "--num_aspect_ratio_buckets",
150 type=int,
151 default=4,
152 help="Number of buckets in either direction (adds 64 pixels per step).",
153 )
154 parser.add_argument(
155 "--progressive_aspect_ratio_buckets",
156 action="store_true",
157 help="Include images in smaller buckets as well.",
158 )
159 parser.add_argument(
149 "--tag_dropout", 160 "--tag_dropout",
150 type=float, 161 type=float,
151 default=0.1, 162 default=0.1,
@@ -710,6 +721,8 @@ def main():
710 class_subdir=args.class_image_dir, 721 class_subdir=args.class_image_dir,
711 num_class_images=args.num_class_images, 722 num_class_images=args.num_class_images,
712 size=args.resolution, 723 size=args.resolution,
724 num_aspect_ratio_buckets=args.num_aspect_ratio_buckets,
725 progressive_aspect_ratio_buckets=args.progressive_aspect_ratio_buckets,
713 repeats=args.repeats, 726 repeats=args.repeats,
714 dropout=args.tag_dropout, 727 dropout=args.tag_dropout,
715 template_key=args.train_data_template, 728 template_key=args.train_data_template,