Skip to content

Commit 97d2990

Browse files
committed
chore: format code
1 parent 16304cc commit 97d2990

6 files changed

Lines changed: 17 additions & 19 deletions

File tree

examples/common/common.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,14 +1556,12 @@ ArgOptions SDGenerationParams::get_options() {
15561556
};
15571557

15581558
std::string sample_methods = sample_method_to_str[0];
1559-
for (int i = 1; i < SAMPLE_METHOD_COUNT; i++)
1560-
{
1559+
for (int i = 1; i < SAMPLE_METHOD_COUNT; i++) {
15611560
sample_methods += ", " + std::string(sample_method_to_str[i]);
15621561
}
15631562

15641563
std::string schedulers = scheduler_to_str[0];
1565-
for (int i = 1; i < SCHEDULER_COUNT; i++)
1566-
{
1564+
for (int i = 1; i < SCHEDULER_COUNT; i++) {
15671565
schedulers += ", " + std::string(scheduler_to_str[i]);
15681566
}
15691567

@@ -1575,17 +1573,17 @@ ArgOptions SDGenerationParams::get_options() {
15751573
{"",
15761574
"--sampling-method",
15771575
"sampling method, one of [" + sample_methods + "], "
1578-
"default: euler for Flux/SD3/Wan, euler_a otherwise",
1576+
"default: euler for Flux/SD3/Wan, euler_a otherwise",
15791577
on_sample_method_arg},
15801578
{"",
15811579
"--high-noise-sampling-method",
15821580
"(high noise) sampling method, one of [" + sample_methods + "], "
1583-
"default: euler for Flux/SD3/Wan, euler_a otherwise",
1581+
"default: euler for Flux/SD3/Wan, euler_a otherwise",
15841582
on_high_noise_sample_method_arg},
15851583
{"",
15861584
"--scheduler",
15871585
"denoiser sigma scheduler, one of [" + schedulers + "], "
1588-
"alias: normal=discrete, default: model-specific",
1586+
"alias: normal=discrete, default: model-specific",
15891587
on_scheduler_arg},
15901588
{"",
15911589
"--sigmas",

scripts/merge_safetensors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
# Configuration
2424
# -----------------------------------------------------------------------------
2525

26-
OUTPUT_PATH = Path(r"..\models\diffusion_models\minimax_h3_ref2va_pruned_bf16.safetensors")
26+
OUTPUT_PATH = Path(r".minimax_h3_fl2va_pruned_bf16.safetensors")
2727

2828
SOURCE_RULES = [
2929
{
30-
"path": Path(r"..\models\diffusion_models\minimax_h3_ref2va_bf16.safetensors"),
30+
"path": Path(r".minimax_h3_fl2va_bf16.safetensors"),
3131
"include": [r".*"],
3232
"exclude": [r".*adaln_proj\.linear.*", r"time_embedder.*"],
3333
},
3434
{
35-
"path": Path(r"..\models\diffusion_models\minimax_h3_ref2va_pruned_int8_convrot.safetensors"),
35+
"path": Path(r".minimax_h3_fl2va_pruned_int8_convrot.safetensors"),
3636
"include": [r"^.*adaln_proj\.linear.*", "adaln_t_table"],
3737
"exclude": [],
3838
},

src/core/ggml_graph_cut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ namespace sd::ggml_graph_cut {
454454
return false;
455455
}
456456
return starts_with(tensor->name, GGML_RUNNER_CUT_PREFIX) &&
457-
ends_with(tensor->name, GGML_RUNNER_CUT_SUFFIX);
457+
ends_with(tensor->name, GGML_RUNNER_CUT_SUFFIX);
458458
}
459459

460460
std::string make_graph_cut_name(const std::string& group, const std::string& output) {

src/model/vae/tae.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ class TinyVideoDecoder : public UnaryBlock {
427427
int channels[num_layers + 1] = {256, 128, 64, 64};
428428
int patch_size = 1;
429429
bool is_wide = false;
430-
430+
431431
public:
432-
int t_upscale = 1;
432+
int t_upscale = 1;
433433
TinyVideoDecoder(int z_channels = 4, int patch_size = 1, std::vector<bool> time_upscale = {false, true, true}, bool is_wide = false)
434434
: z_channels(z_channels), patch_size(patch_size), is_wide(is_wide) {
435435
t_upscale = 1;
@@ -663,7 +663,7 @@ class TAEHV : public GGMLBlock {
663663
if (sd_version_is_minimax_h3(version)) {
664664
return encode_h3(ctx, x);
665665
}
666-
666+
667667
auto encoder = std::dynamic_pointer_cast<TinyVideoEncoder>(blocks["encoder"]);
668668

669669
int64_t num_frames = x->ne[3];

src/runtime/denoiser.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,7 +2586,7 @@ static sd::Tensor<float> sample_lms(denoise_cb_t model,
25862586
// modified with "history shift" value, which seemingly needs less steps
25872587
int divisions = 1000;
25882588
int max_order = 4;
2589-
int shift = 1; // 4, 0 - original; 4, 1 - PR #1843; 3, 1 - smoother image
2589+
int shift = 1; // 4, 0 - original; 4, 1 - PR #1843; 3, 1 - smoother image
25902590
for (const auto& [key, value] : extra_sample_args) {
25912591
int parsed = 0;
25922592
if (key == "lms_max_order") {
@@ -2624,7 +2624,7 @@ static sd::Tensor<float> sample_lms(denoise_cb_t model,
26242624
auto linear_multistep_coeff = [=](const int order, const int m, const int j) -> float {
26252625
if (!divisions)
26262626
return sigmas[m + 1] - sigmas[m]; // delta / 0 * 0
2627-
#define LMS_PRECISION float // when divisions > 30 millions, the double precision fixes noise
2627+
#define LMS_PRECISION float // when divisions > 30 millions, the double precision fixes noise
26282628
const LMS_PRECISION a = sigmas[m], dx = (sigmas[m + 1] - a) / divisions, s = sigmas[m - j];
26292629
const LMS_PRECISION b0 = a + 0.5f * dx; // using Riemann middle integral
26302630
LMS_PRECISION sum = 0.0f;
@@ -2672,8 +2672,8 @@ static sd::Tensor<float> sample_lms(denoise_cb_t model,
26722672
int hist_max = hist.size() - 1;
26732673
for (int c = 2; c <= order; c++)
26742674
x += hist[std::min(hist_max, hist_size_p1 - c + shift)] * lms_coeff[c - 1];
2675-
// max_order == 4 => hist[] index = 2, 1, 0
2676-
// shift == 1 => hist[] index = 2, 2, 1
2675+
// max_order == 4 => hist[] index = 2, 1, 0
2676+
// shift == 1 => hist[] index = 2, 2, 1
26772677
}
26782678
if (hist_size_p1 == max_order) {
26792679
hist.erase(hist.begin());

src/stable-diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,7 @@ class StableDiffusionGGML {
23152315
return;
23162316
}
23172317
} else if (channels == 24) {
2318-
if(sd_version_is_minimax_h3(version)){
2318+
if (sd_version_is_minimax_h3(version)) {
23192319
latent_rgb_proj = minimax_latent_rgb_proj;
23202320
latent_rgb_bias = minimax_latent_rgb_bias;
23212321
} else {

0 commit comments

Comments
 (0)