Skip to content

Commit

Permalink
Disable SDXL watermarker by default to ensure the most accurate valid…
Browse files Browse the repository at this point in the history
…ation results
  • Loading branch information
bghira committed Sep 21, 2023
1 parent 53f1a55 commit 234393e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions helpers/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,18 @@ def parse_args(input_args=None):
" Default: ddim"
),
)
parser.add_argument(
"--enable_watermark",
type=bool,
default=False,
action="store_true",
help=(
"The SDXL 0.9 and 1.0 licenses both require a watermark be used to identify any images created to be shared."
" Since the images created during validation typically are not shared, and we want the most accurate results,"
" this watermarker is disabled by default. If you are sharing the validation images, it is up to you"
" to ensure that you are complying with the license, whether that is through this watermarker, or another."
)
)
parser.add_argument(
"--mixed_precision",
type=str,
Expand Down
1 change: 1 addition & 0 deletions helpers/legacy/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def log_validations(
vae=vae,
revision=args.revision,
torch_dtype=weight_dtype,
add_watermarker=args.enable_watermark
)
pipeline.scheduler = SCHEDULER_NAME_MAP[
args.validation_noise_scheduler
Expand Down
1 change: 1 addition & 0 deletions train_sdxl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,7 @@ def collate_fn(batch):
vae=vae,
unet=unet,
revision=args.revision,
add_watermarker=args.enable_watermark
)
pipeline.set_progress_bar_config(disable=True)
pipeline.scheduler = SCHEDULER_NAME_MAP[
Expand Down

0 comments on commit 234393e

Please sign in to comment.