Skip to content

Commit 3beb06f

Browse files
committed
Fixed if
1 parent d94671f commit 3beb06f

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

stable-diffusion.cpp

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ class StableDiffusionGGML {
521521
} else {
522522
// check is_using_v_parameterization_for_sd2
523523
bool is_using_v_parameterization = false;
524-
if (version == VERSION_2_x) {
524+
if (version == VERSION_SD2) {
525525
if (is_using_v_parameterization_for_sd2(ctx)) {
526526
is_using_v_parameterization = true;
527527
}
@@ -530,21 +530,22 @@ class StableDiffusionGGML {
530530
is_using_v_parameterization = true;
531531
}
532532

533-
if (version == VERSION_SD3_2B) {
534-
LOG_INFO("running in FLOW mode");
535-
denoiser = std::make_shared<DiscreteFlowDenoiser>();
536-
} else if (version == VERSION_FLUX_DEV || version == VERSION_FLUX_SCHNELL) {
537-
LOG_INFO("running in Flux FLOW mode");
538-
float shift = 1.15f;
539-
if (version == VERSION_FLUX_SCHNELL) {
540-
shift = 1.0f; // TODO: validate
533+
if (version == VERSION_SD3_2B) {
534+
LOG_INFO("running in FLOW mode");
535+
denoiser = std::make_shared<DiscreteFlowDenoiser>();
536+
} else if (version == VERSION_FLUX_DEV || version == VERSION_FLUX_SCHNELL) {
537+
LOG_INFO("running in Flux FLOW mode");
538+
float shift = 1.15f;
539+
if (version == VERSION_FLUX_SCHNELL) {
540+
shift = 1.0f; // TODO: validate
541+
}
542+
denoiser = std::make_shared<FluxFlowDenoiser>(shift);
543+
} else if (is_using_v_parameterization) {
544+
LOG_INFO("running in v-prediction mode");
545+
denoiser = std::make_shared<CompVisVDenoiser>();
546+
} else {
547+
LOG_INFO("running in eps-prediction mode");
541548
}
542-
denoiser = std::make_shared<FluxFlowDenoiser>(shift);
543-
} else if (is_using_v_parameterization) {
544-
LOG_INFO("running in v-prediction mode");
545-
denoiser = std::make_shared<CompVisVDenoiser>();
546-
} else {
547-
LOG_INFO("running in eps-prediction mode");
548549
}
549550

550551
if (schedule != DEFAULT) {

0 commit comments

Comments
 (0)