Nodes/comfyui-jk-easy-nodes/JK Multi Model Sampler Unpatcher
ComfyUI Node

JK Multi Model Sampler Unpatcher

Strip sampler-function overrides off up to six models at once

By kostenickj·Created 2 years ago·Updated 2 years ago· 8
JK Multi Model Sampler Unpatcher
  • model1
  • model2
  • model3
  • model4
  • model5
  • model6
  • model1
  • model2
  • model3
  • model4
  • model5
  • model6

Some nodes don't just pass a MODEL through unchanged - they patch it. A dynamic-thresholding node, a CFG-rescale node, a PAG (perturbed-attention guidance) node: these work by wrapping the model's internal sampling function so that every sampler that uses that model downstream inherits the patched behavior, whether it wants it or not. That's usually exactly what you want - until it isn't. If you take that patched model into a second pass (a detailer, a hi-res fix, a refiner) that shouldn't get the same CFG rescaling or thresholding, the patch follows the model there too, silently.

This node's job, in the author's own words, is to be a "helper to remove sampler function overrides from a model (e.g dynamic thresholding)." It gives you a clean point in your graph where you can strip those overrides back off before the model heads somewhere that shouldn't have them.

The inputs and outputs that matter

Six optional model slots - model1 through model6 - each with a matching numbered output. There's no required input at all: wire in as many or as few models as you actually have at that point in your graph. Each output is the corresponding input, minus any sampler-function patches that had been applied to it.

The "six at once" design is clearly meant for graphs juggling several patched models simultaneously - a base model, a refiner, maybe a LoRA'd variant - where you want to unpatch all of them in one node instead of running each through a separate unpatch step.

When you'd reach for this

Anywhere a downstream sampling pass needs the unmodified sampling behavior of a model you've already patched upstream for a different purpose. A common shape: apply dynamic thresholding or a CFG rescale for your main generation pass, then run this node before handing the model to JKEasyDetailer or a hi-res fix pass, so the detail/upscale pass samples normally instead of inheriting the main pass's patched behavior.

Installing it

Part of kostenickj/jk-comfyui-helpers - already on comfy.icu, or cd ComfyUI/custom_nodes && git clone https://github.com/kostenickj/jk-comfyui-helpers.git and restart if self-hosting. This is pure model-object manipulation - no models to download, no extra dependency, and nothing it needs beyond the pack itself. As with the rest of this pack, it's a small personal toolkit with essentially no public discussion around it, so the node's own description (thin as it is) is genuinely your best reference here.

Common issues

  • Unpatching doesn't seem to change anything. If the model wasn't actually patched by anything upstream, there's nothing for this node to remove - it's a no-op on a clean model, not an error.
  • You still see the old behavior downstream. Make sure the unpatched output of this node is what's actually wired into your next sampler - it's easy to accidentally keep using the original patched model reference elsewhere in the graph if you copied/pasted nodes rather than rewiring cleanly.
  • Not sure if you need this at all. If your graph only ever applies a patch once and never reuses that model for anything that shouldn't have it, you don't need this node - it only matters when the same MODEL object is reused across passes with different requirements.
CategoryJK Comfy Helpers/Util

Inputs (6)

NameTypeDefaultDescription
model1optMODEL
model2optMODEL
model3optMODEL
model4optMODEL
model5optMODEL
model6optMODEL

Outputs (6)

NameTypeDescription
model1MODEL
model2MODEL
model3MODEL
model4MODEL
model5MODEL
model6MODEL