Skip to content

Commit 2dea4ea

Browse files
committed
unify code style and fix some issues
1 parent 46698f2 commit 2dea4ea

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

denoiser.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ struct DiscreteFlowDenoiser : public Denoiser {
382382

383383
float sigma_data = 1.0f;
384384

385-
DiscreteFlowDenoiser(float shift = 3.0f) : shift(shift) {
385+
DiscreteFlowDenoiser(float shift = 3.0f)
386+
: shift(shift) {
386387
set_parameters();
387388
}
388389

examples/cli/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ void print_params(SDParams params) {
172172
printf(" sample_params: %s\n", SAFE_STR(sample_params_str));
173173
printf(" high_noise_sample_params: %s\n", SAFE_STR(high_noise_sample_params_str));
174174
printf(" moe_boundary: %.3f\n", params.moe_boundary);
175+
printf(" flow_shift: %.2f\n", params.flow_shift);
175176
printf(" strength(img2img): %.2f\n", params.strength);
176177
printf(" rng: %s\n", sd_rng_type_name(params.rng_type));
177178
printf(" seed: %ld\n", params.seed);
@@ -281,7 +282,7 @@ void print_usage(int argc, const char* argv[]) {
281282
printf(" --fps fps (default: 24)\n");
282283
printf(" --moe-boundary BOUNDARY timestep boundary for Wan2.2 MoE model. (default: 0.875)\n");
283284
printf(" only enabled if `--high-noise-steps` is set to -1\n");
284-
printf(" --flow-shift SHIFT shift value for Flow models like SD3.x or WAN (default: auto)\n");
285+
printf(" --flow-shift SHIFT shift value for Flow models like SD3.x or WAN (default: auto)\n");
285286
printf(" -v, --verbose print extra info\n");
286287
}
287288

stable-diffusion.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ class StableDiffusionGGML {
682682
if (sd_version_is_sd3(version)) {
683683
LOG_INFO("running in FLOW mode");
684684
float shift = sd_ctx_params->flow_shift;
685-
if( shift == INFINITY){
685+
if (shift == INFINITY) {
686686
shift = 3.0;
687687
}
688688
denoiser = std::make_shared<DiscreteFlowDenoiser>(shift);
@@ -699,11 +699,8 @@ class StableDiffusionGGML {
699699
} else if (sd_version_is_wan(version)) {
700700
LOG_INFO("running in FLOW mode");
701701
float shift = sd_ctx_params->flow_shift;
702-
if(shift == INFINITY) {
702+
if (shift == INFINITY) {
703703
shift = 5.0;
704-
if (version == VERSION_WAN2){
705-
shift = 12.0;
706-
}
707704
}
708705
denoiser = std::make_shared<DiscreteFlowDenoiser>(shift);
709706
} else if (is_using_v_parameterization) {

0 commit comments

Comments
 (0)