fix: preserve server sigma defaults for WebUI requests (#2172)

This commit is contained in:
Crystal Sight authored and GitHub committed 2026-10-20 23:07:19 +08:00
1 parent 20050815ac
commit 269045e92c
1 file changed
+2 -1
+2 -1
View File
@@ -2218,7 +2218,8 @@ bool SDGenerationParams::from_json_str(
} }
if (target_custom_sigmas != nullptr && if (target_custom_sigmas != nullptr &&
sample_json.contains("custom_sigmas") && sample_json.contains("custom_sigmas") &&
sample_json["custom_sigmas"].is_array()) { sample_json["custom_sigmas"].is_array() &&
!sample_json["custom_sigmas"].empty()) { // empty [] = "not specified", keep server/CLI default
*target_custom_sigmas = sample_json["custom_sigmas"].get<std::vector<float>>(); *target_custom_sigmas = sample_json["custom_sigmas"].get<std::vector<float>>();
} }
if (sample_json.contains("sample_method") && sample_json["sample_method"].is_string()) { if (sample_json.contains("sample_method") && sample_json["sample_method"].is_string()) {