diff options
| author | Volpeon <git@volpeon.ink> | 2022-12-24 09:35:57 +0100 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2022-12-24 09:35:57 +0100 |
| commit | dfc51d6d74410acefab86d2938a2b864be603668 (patch) | |
| tree | bed57fcd481bc243324950f93e890294703533f6 /train_ti.py | |
| parent | Fix (diff) | |
| download | textual-inversion-diff-dfc51d6d74410acefab86d2938a2b864be603668.tar.gz textual-inversion-diff-dfc51d6d74410acefab86d2938a2b864be603668.tar.bz2 textual-inversion-diff-dfc51d6d74410acefab86d2938a2b864be603668.zip | |
Update
Diffstat (limited to 'train_ti.py')
| -rw-r--r-- | train_ti.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/train_ti.py b/train_ti.py index cc208f0..52bd675 100644 --- a/train_ti.py +++ b/train_ti.py | |||
| @@ -87,6 +87,12 @@ def parse_args(): | |||
| 87 | help="How many class images to generate." | 87 | help="How many class images to generate." |
| 88 | ) | 88 | ) |
| 89 | parser.add_argument( | 89 | parser.add_argument( |
| 90 | "--class_image_dir", | ||
| 91 | type=str, | ||
| 92 | default="cls", | ||
| 93 | help="The directory where class images will be saved.", | ||
| 94 | ) | ||
| 95 | parser.add_argument( | ||
| 90 | "--repeats", | 96 | "--repeats", |
| 91 | type=int, | 97 | type=int, |
| 92 | default=1, | 98 | default=1, |
| @@ -586,7 +592,7 @@ def main(): | |||
| 586 | data_file=args.train_data_file, | 592 | data_file=args.train_data_file, |
| 587 | batch_size=args.train_batch_size, | 593 | batch_size=args.train_batch_size, |
| 588 | prompt_processor=prompt_processor, | 594 | prompt_processor=prompt_processor, |
| 589 | class_subdir="cls", | 595 | class_subdir=args.class_image_dir, |
| 590 | num_class_images=args.num_class_images, | 596 | num_class_images=args.num_class_images, |
| 591 | size=args.resolution, | 597 | size=args.resolution, |
| 592 | repeats=args.repeats, | 598 | repeats=args.repeats, |
| @@ -630,6 +636,8 @@ def main(): | |||
| 630 | images = pipeline( | 636 | images = pipeline( |
| 631 | prompt=prompt, | 637 | prompt=prompt, |
| 632 | negative_prompt=nprompt, | 638 | negative_prompt=nprompt, |
| 639 | height=args.sample_image_size, | ||
| 640 | width=args.sample_image_size, | ||
| 633 | num_inference_steps=args.sample_steps | 641 | num_inference_steps=args.sample_steps |
| 634 | ).images | 642 | ).images |
| 635 | 643 | ||
