2.9 KiB
2.9 KiB
Scale-Locked Residual KSampler
All-in-one sampler node for large-resolution generation where the model's native-resolution generations are much better than its direct high-resolution generations.
Core idea
A native / low-resolution planner branch is sampled first. Its denoised trajectory is cached. The final high-resolution branch then uses a custom guider that keeps the base model's high-frequency residual detail but continuously pulls the low-frequency denoised structure back toward the planner trajectory.
Inputs
model,positive,negative,latent_image: standard Comfy sampler inputsseed,steps,cfg,sampler_name,scheduler,denoise: standard sampler controlstarget_megapixels: planner resolution in pixel-space MPlock_strength: overall lock multiplierlock_strength_start: early low-band lock amountlock_strength_end: late low-band lock amountlock_schedule: low-band schedule shape, evaluated against normalized log-sigma position when planner sigmas are available, with raw step-index fallback otherwise;flatkeeps the start value for the whole run and ignores the end valuelock_schedule_hold: hold region beforehold_then_dropreleaseslock_schedule_power: curvature control for power-based schedulescoarse_cutoff: strongest coarse-band resolution fractionmid_band_cutoff: second, looser mid-band resolution fractionmid_band_strength: overall mid-band lock multipliermid_band_strength_start/mid_band_strength_end: independent mid-band envelope whenmid_band_scheduleis notlinked; it multiplies the basemid_band_strengthmid_band_schedule:linkedfor legacy behavior, or an independent curve modemid_band_schedule_hold/mid_band_schedule_power: shape controls for the independent mid-band schedulenested_noise_strength: amount of extra high-frequency detail noisepin_anchors: pinned-memory staging for planner anchors when possiblesampler_guard: warn / error / off handling for samplers outside the conservative safe setlock_mask(optional): spatial mask to focus the lock on anatomy-critical regions
Outputs
output: final high-res latentlowres_planner: final low-res planner latentdenoised_output: final denoised x0 high-res latent when available
Notes
- Lower
coarse_cutoff= stronger global structure control. - Lower
mid_band_cutoffand highermid_band_strength= tighter control over medium-scale body/shape structure. hold_then_dropwith alock_schedule_holdaround0.30to0.45gives a stronger early anchor with a later release knee.- Use
mid_band_schedule = linkedto preserve the legacy shared curve, or switch it off to let medium structure release earlier than the coarse band. - Higher
nested_noise_strength= more detail freedom, but also more chance of drift. - A
lock_maskis recommended for body-heavy and anatomy-sensitive generations.