Skip to content

Commit 0a32269

Browse files
committed
update
1 parent 1b9f29e commit 0a32269

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/dreambooth/train_dreambooth_lora_sdxl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ def parse_args(input_args=None):
673673
"--image_interpolation_mode",
674674
type=str,
675675
default="lanczos",
676+
choices=[
677+
f.lower() for f in dir(transforms.InterpolationMode) if not f.startswith("__") and not f.endswith("__")
678+
],
676679
help="The image interpolation method to use for resizing images.",
677680
)
678681

@@ -800,7 +803,7 @@ def __init__(
800803

801804
interpolation = getattr(transforms.InterpolationMode, args.image_interpolation_mode.upper(), None)
802805
if interpolation is None:
803-
raise ValueError(f"Unsupported interpolation mode.")
806+
raise ValueError(f"Unsupported interpolation mode {interpolation=}.")
804807
train_resize = transforms.Resize(size, interpolation=interpolation)
805808

806809
train_crop = transforms.CenterCrop(size) if center_crop else transforms.RandomCrop(size)

0 commit comments

Comments
 (0)