Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sd3: revert enforcement of sd35 flow_matching_loss values #1115

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions helpers/configuration/cmd_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ def get_argument_parser():
"--sd3_clip_uncond_behaviour",
type=str,
choices=["empty_string", "zero"],
default='empty_string',
default="empty_string",
help=(
"SD3 can be trained using zeroed prompt embeds during unconditional dropout,"
" or an encoded empty string may be used instead (the default). Changing this value may stabilise or"
" destabilise training. The default is 'empty_string'."
)
),
)
parser.add_argument(
"--sd3_t5_uncond_behaviour",
Expand All @@ -291,7 +291,7 @@ def get_argument_parser():
help=(
"Override the value of unconditional prompts from T5 embeds."
" The default is to follow the value of --sd3_clip_uncond_behaviour."
)
),
)
parser.add_argument(
"--lora_type",
Expand Down Expand Up @@ -2106,12 +2106,10 @@ def parse_cmdline_args(input_args=None):
args.aspect_bucket_alignment = 64
if args.sd3_t5_uncond_behaviour is None:
args.sd3_t5_uncond_behaviour = args.sd3_clip_uncond_behaviour
info_log(f"SD3 embeds for unconditional captions: t5={args.sd3_t5_uncond_behaviour}, clip={args.sd3_clip_uncond_behaviour}")
if args.flow_matching_loss != "sd35":
warning_log(
"SD3 requires the use of the 'sd35' flow matching loss. Overriding the value of --flow_matching_loss."
)
args.flow_matching_loss = "sd35"
info_log(
f"SD3 embeds for unconditional captions: t5={args.sd3_t5_uncond_behaviour}, clip={args.sd3_clip_uncond_behaviour}"
)

elif "deepfloyd" in args.model_type:
deepfloyd_pixel_alignment = 8
if args.aspect_bucket_alignment != deepfloyd_pixel_alignment:
Expand Down
Loading