Skip to content

Commit fe3ae56

Browse files
committed
limit step count to 100
1 parent 332aab7 commit fe3ae56

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/server/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,9 @@ int main(int argc, const char** argv) {
420420
return;
421421
}
422422

423+
if (gen_params.sample_params.sample_steps > 100)
424+
gen_params.sample_params.sample_steps = 100;
425+
423426
if (!gen_params.process_and_check(IMG_GEN, "")) {
424427
res.status = 400;
425428
res.set_content(R"({"error":"invalid params"})", "application/json");
@@ -598,6 +601,9 @@ int main(int argc, const char** argv) {
598601
return;
599602
}
600603

604+
if (gen_params.sample_params.sample_steps > 100)
605+
gen_params.sample_params.sample_steps = 100;
606+
601607
if (!gen_params.process_and_check(IMG_GEN, "")) {
602608
res.status = 400;
603609
res.set_content(R"({"error":"invalid params"})", "application/json");

0 commit comments

Comments
 (0)