Skip to content

Commit ba8347d

Browse files
committed
fixes
1 parent 28ff59d commit ba8347d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/dreambooth/train_dreambooth_lora_flux_kontext.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,10 @@ def __init__(
795795
column_names = dataset["train"].column_names
796796

797797
# 6. Get the column names for input/target.
798-
if args.cond_image_column is not None and not args.cond_image_column in column_names:
799-
raise ValueError(f"`--cond_image_column` value '{args.cond_image_column}' not found in dataset columns. Dataset columns are: {', '.join(column_names)}")
798+
if args.cond_image_column is not None and args.cond_image_column not in column_names:
799+
raise ValueError(
800+
f"`--cond_image_column` value '{args.cond_image_column}' not found in dataset columns. Dataset columns are: {', '.join(column_names)}"
801+
)
800802
if args.image_column is None:
801803
image_column = column_names[0]
802804
logger.info(f"image column defaulting to {image_column}")

0 commit comments

Comments
 (0)