Skip to content

Commit

Permalink
raise error when both noise offset and multires
Browse files Browse the repository at this point in the history
  • Loading branch information
kohya-ss committed May 3, 2023
1 parent b9085fc commit 60bbe64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion library/train_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,7 @@ def add_training_arguments(parser: argparse.ArgumentParser, support_dreambooth:
"--multires_noise_iterations",
type=int,
default=None,
help="enable multires noise with this number of iterations (if enabled, around 6-10 is recommended) / Multires noiseを有効にしてこのイテレーション数を設定する(有効にする場合は6-10程度を推奨)"
help="enable multires noise with this number of iterations (if enabled, around 6-10 is recommended) / Multires noiseを有効にしてこのイテレーション数を設定する(有効にする場合は6-10程度を推奨)",
)
parser.add_argument(
"--multires_noise_discount",
Expand Down Expand Up @@ -2205,6 +2205,11 @@ def verify_training_args(args: argparse.Namespace):
"cache_latents_to_disk is enabled, so cache_latents is also enabled / cache_latents_to_diskが有効なため、cache_latentsを有効にします"
)

if args.noise_offset is not None and args.multires_noise_iterations is not None:
raise ValueError(
"noise_offset and multires_noise_iterations cannot be enabled at the same time / noise_offsetとmultires_noise_iterationsを同時に有効にすることはできません"
)


def add_dataset_arguments(
parser: argparse.ArgumentParser, support_dreambooth: bool, support_caption: bool, support_caption_dropout: bool
Expand Down

0 comments on commit 60bbe64

Please sign in to comment.