From 2132bf9ca0400246c5dc63cd9ddd84582ba498a0 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:53:34 +0800 Subject: [PATCH] added img sampler aliases --- koboldcpp.py | 2 +- otherarch/sdcpp/sdtype_adapter.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/koboldcpp.py b/koboldcpp.py index 9ece4b9cf..a8f392662 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -510,7 +510,7 @@ def sd_generate(genparams): width = genparams.get("width", 512) height = genparams.get("height", 512) seed = genparams.get("seed", -1) - sample_method = genparams.get("sampler_name", "euler a") + sample_method = genparams.get("sampler_name", "k_euler_a") #clean vars width = width - (width%64) diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index 7a8e815c8..e66182e40 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -271,27 +271,27 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) fflush(stdout); std::string sampler = inputs.sample_method; - if(sampler=="euler a") //all lowercase + if(sampler=="euler a"||sampler=="k_euler_a"||sampler=="euler_a") //all lowercase { sd_params->sample_method = sample_method_t::EULER_A; } - else if(sampler=="euler") + else if(sampler=="euler"||sampler=="k_euler") { sd_params->sample_method = sample_method_t::EULER; } - else if(sampler=="heun") + else if(sampler=="heun"||sampler=="k_heun") { sd_params->sample_method = sample_method_t::HEUN; } - else if(sampler=="dpm2") + else if(sampler=="dpm2"||sampler=="k_dpm_2") { sd_params->sample_method = sample_method_t::DPM2; } - else if(sampler=="lcm") + else if(sampler=="lcm"||sampler=="k_lcm") { sd_params->sample_method = sample_method_t::LCM; } - else if(sampler=="dpm++ 2m karras" || sampler=="dpm++ 2m") + else if(sampler=="dpm++ 2m karras" || sampler=="dpm++ 2m" || sampler=="k_dpmpp_2m") { sd_params->sample_method = sample_method_t::DPMPP2M; }