ComfyUI-LatentClamp
A node for ComfyUI that modifies the values in the samples input that fall outside of a min and max range using a multiplier.
Additional controls are available for experimental purposes.
In img2img operations, latent clamping has been observed to improve prompt adherence. Issues with image fidelity resulting from the clamp can be rectified with a quick second diffusion pass.
Inputs
min: Values insamplesbelow this value will be multiplied byoutside_multiplier.max: Values insamplesabove this value will be multiplied byoutside_multiplier.inside_multiplier: Values insamplesbetweenminandmaxwill be multiplied by this value.outside_multiplier: Values insamplesoutside ofminandmaxwill be multiplied by this value.extra_noise: Add compensatory noise to the values insamples.



