Skip to content

Commit 24c784b

Browse files
committed
Fixed if
1 parent 8aefaa3 commit 24c784b

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
@@ -511,7 +511,7 @@ class StableDiffusionGGML {
511511
} else {
512512
// check is_using_v_parameterization_for_sd2
513513
bool is_using_v_parameterization = false;
514-
if (version == VERSION_2_x) {
514+
if (version == VERSION_SD2) {
515515
if (is_using_v_parameterization_for_sd2(ctx)) {
516516
is_using_v_parameterization = true;
517517
}
@@ -520,21 +520,22 @@ class StableDiffusionGGML {
520520
is_using_v_parameterization = true;
521521
}
522522

523-
if (version == VERSION_SD3_2B) {
524-
LOG_INFO("running in FLOW mode");
525-
denoiser = std::make_shared<DiscreteFlowDenoiser>();
526-
} else if (version == VERSION_FLUX_DEV || version == VERSION_FLUX_SCHNELL) {
527-
LOG_INFO("running in Flux FLOW mode");
528-
float shift = 1.15f;
529-
if (version == VERSION_FLUX_SCHNELL) {
530-
shift = 1.0f; // TODO: validate
523+
if (version == VERSION_SD3_2B) {
524+
LOG_INFO("running in FLOW mode");
525+
denoiser = std::make_shared<DiscreteFlowDenoiser>();
526+
} else if (version == VERSION_FLUX_DEV || version == VERSION_FLUX_SCHNELL) {
527+
LOG_INFO("running in Flux FLOW mode");
528+
float shift = 1.15f;
529+
if (version == VERSION_FLUX_SCHNELL) {
530+
shift = 1.0f; // TODO: validate
531+
}
532+
denoiser = std::make_shared<FluxFlowDenoiser>(shift);
533+
} else if (is_using_v_parameterization) {
534+
LOG_INFO("running in v-prediction mode");
535+
denoiser = std::make_shared<CompVisVDenoiser>();
536+
} else {
537+
LOG_INFO("running in eps-prediction mode");
531538
}
532-
denoiser = std::make_shared<FluxFlowDenoiser>(shift);
533-
} else if (is_using_v_parameterization) {
534-
LOG_INFO("running in v-prediction mode");
535-
denoiser = std::make_shared<CompVisVDenoiser>();
536-
} else {
537-
LOG_INFO("running in eps-prediction mode");
538539
}
539540

540541
if (schedule != DEFAULT) {

0 commit comments

Comments
 (0)