
Dynamic Thresholding (DT) fixes SDXL color blowout at high CFG by clamping latent spread each sampling step — copy-paste settings for ComfyUI and A1111/Forge across four use cases (portrait, landscape, product, extreme CFG), plus a bonus Flux hack.
mimic_target — what the latents would look like at mimic_scale (the safe reference CFG)cfg_target — what the latents look like at your actual high CFGMEAN mode) or keep them at zero (ZERO mode)mimic_centered and cfg_centered using absolute deviation (AD) or standard deviation (STD); clamp cfg_centered so its spread doesn't exceed mimic_centered, then rescale to matchcfg_target according to interpolate_phi
mimic_scale=7 + percentile tuning rescues the output from neon blowout. 1mcmonkeyprojects/sd-dynamic-thresholding. The node appears under advanced/mcmonkey as DynamicThresholdingFull. 6Load Checkpoint (MODEL output) and KSampler (model input). The node hooks into the model's forward pass and intercepts latents after each denoising step — the KSampler drives steps normally and never knows DT is running.
DynamicThresholdingFull node wired between checkpoint and KSampler. Default values shown. 7| Parameter | Default | What it controls |
|---|---|---|
mimic_scale | 7.0 | The "safe" reference CFG. Keep latents within the spread you'd get at this value. |
threshold_percentile | 1.0 (= 100%) | How aggressively to clamp. 1.0 = no clamp on positive values. 0.95 cuts the top 5% of outliers. |
mimic_mode | Constant | How mimic_scale evolves across steps. Half Cosine Up ramps smoothly from low to high. |
cfg_mode | Constant | How your actual CFG scale evolves across steps. |
mimic_scale_min | 0.0 | Floor for the mimic_mode scheduler. Set to 3–4 when using any non-Constant mode. |
interpolate_phi | 1.0 | Mix ratio: 1.0 = full DT result, 0.0 = original high-CFG result. |
separate_feature_channels | enable | Whether each latent channel is clamped independently. Leave enabled. |
variability_measure | AD | AD uses percentile / max absolute deviation (robust to outliers); STD uses standard deviation. |
scaling_startpoint | MEAN | MEAN is conservative; ZERO is more aggressive. |
cfg_scale in your KSampler equals mimic_scale exactly, DT disables itself — there's nothing to correct. 8https://github.com/mcmonkeyprojects/sd-dynamic-thresholding. Restart WebUI. The panel appears as an accordion labeled "Dynamic Thresholding (CFG Scale Fix)" in txt2img and img2img. 9mimic_scale (1.0–30.0, default 7.0)threshold_percentile (90–100%, default 100%) — note: A1111 uses percentage form, ComfyUI uses 0–1 decimalmimic_modecfg_mode| Use case | CFG | mimic_scale | threshold_percentile | mimic_mode / cfg_mode | mimic_scale_min |
|---|---|---|---|---|---|
| Portrait (safe, natural tones) | 10 | 7 | 0.999 (A1111: 99.9%) | Half Cosine Up / Half Cosine Up | 3.5 |
| Landscape / concept art (punchy detail) | 12 | 7 | 0.999 | Half Cosine Up / Half Cosine Up | 3.5 |
| Product shot (crisp, controlled) | 10 | 7 | 1.0 (A1111: 100%) | Constant / Constant | 0 |
| Extreme high CFG (structure lock at 30) | 30 | 30 | 1.0 | Cosine Down / Constant | 7 |
Half Cosine Up — mcmonkey's official recommendation as "the best scheduler mode for most usages." 5 The minimum of 3.5 prevents the scheduler from bottoming out near zero at early steps.mimic_scale equal to CFG (both 30), use a Down scheduler to ramp the mimic correction from high to low across steps, and set a minimum of 7 so the correction never fully releases. The result is a CFG-30 composition with CFG-7 color behavior. 10 Reddit user darkeagle03 found that mimic_scale=30 still burned on some checkpoints and that dropping to 12–15 worked better — the effective value is model-dependent. 10
mimic_mode: Half Cosine Up
cfg_mode: Half Cosine Up
variability_measure: AD
scaling_startpoint: MEAN
interpolate_phi: 0.7interpolate_phi=0.7 rather than 1.0 is the key difference from the SDXL workflow — on Flux, a 30% blend back toward the original high-CFG result produces better saturation balance. Adjust this value if the output looks washed out or over-contrasty. 14mimic_scale sets the target color behavior; the scheduler (Half Cosine Up for most uses) controls how aggressively that target applies across steps; and threshold_percentile sets the ceiling on how much latent spread you'll tolerate at all. Start with mimic=7, Half Cosine Up, min=3.5, run at CFG 10–12, and tighten from there.github.com
raw.githubusercontent.com
raw.githubusercontent.com
stability.ai
huggingface.co
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.