From 20363dc6e79943184c6da4f6876600e2e1dfdeab Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sun, 7 Dec 2025 16:24:26 +0800 Subject: [PATCH] z image limit cfg scale to 3.0 max --- embd_res/kcpp_docs.embd | 9 +++++++-- otherarch/sdcpp/sdtype_adapter.cpp | 11 +++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/embd_res/kcpp_docs.embd b/embd_res/kcpp_docs.embd index 600914f87..343b45b30 100644 --- a/embd_res/kcpp_docs.embd +++ b/embd_res/kcpp_docs.embd @@ -244,6 +244,11 @@ "minimum": 0, "type": "number" }, + "dry_penalty_last_n": { + "description": "KoboldCpp ONLY. DRY last n tokens penalized value.", + "minimum": 0, + "type": "number" + }, "dry_sequence_breakers": { "description": "An array of string sequence breakers for DRY.", "items": { @@ -2304,7 +2309,7 @@ "height": 512, "seed": -1, "clip_skip": -1, - "sampler_name": "Euler a" + "sampler_name": "Euler" }, "schema": { "properties": { @@ -2399,7 +2404,7 @@ "height": 512, "seed": -1, "clip_skip": -1, - "sampler_name": "Euler a", + "sampler_name": "Euler", "denoising_strength": 0.6, "init_images":[], "mask":"", diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index ec9bc3084..86aca5dcc 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -784,6 +784,17 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) } } + if(loadedsdver == SDVersion::VERSION_Z_IMAGE) + { + if(sd_params->cfg_scale > 3.0f) + { + if (!sd_is_quiet && sddebugmode) { + printf("Z-Image: clamping CFG Scale to 3.0 to preserve quality\n"); + } + sd_params->cfg_scale = 3.0f; + } + } + if(is_wan && extra_image_data.size()==0 && is_img2img) { extra_image_data.push_back(img2img_data);