mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-08-06 10:10:40 -05:00
feat: add sd-server API support for steps, sampler and scheduler (#1173)
This commit is contained in:
@@ -420,6 +420,9 @@ int main(int argc, const char** argv) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gen_params.sample_params.sample_steps > 100)
|
||||
gen_params.sample_params.sample_steps = 100;
|
||||
|
||||
if (!gen_params.process_and_check(IMG_GEN, "")) {
|
||||
res.status = 400;
|
||||
res.set_content(R"({"error":"invalid params"})", "application/json");
|
||||
@@ -598,6 +601,9 @@ int main(int argc, const char** argv) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gen_params.sample_params.sample_steps > 100)
|
||||
gen_params.sample_params.sample_steps = 100;
|
||||
|
||||
if (!gen_params.process_and_check(IMG_GEN, "")) {
|
||||
res.status = 400;
|
||||
res.set_content(R"({"error":"invalid params"})", "application/json");
|
||||
|
||||
Reference in New Issue
Block a user