added img sampler aliases

This commit is contained in:
Concedo
2024-03-08 18:53:34 +08:00
parent 5174f9de7b
commit 2132bf9ca0
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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)
+6 -6
View File
@@ -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;
}