Nodes/ComfyUI-AharaNodes/Patch Repeat Sampler Config (Model)
ComfyUI Node

Patch Repeat Sampler Config (Model)

Swap the checkpoint on a shared sampler recipe for a fair A/B test

By chris-arsenault·Created 2 years ago·Updated 2 years ago· 0
Patch Repeat Sampler Config (Model)
  • model
  • config
  • SAMPLER_CONFIG

Patch Repeat Sampler Config (Model) is the sampling-side sibling of the latent patch: feed it a SAMPLER_CONFIG and a MODEL, and it returns the same config with config.model replaced. That's the whole mechanism - one assignment, no sampling of its own.

Its purpose is the fair comparison. A config carries seed, steps, cfg, sampler and scheduler alongside the model. If you A/B two checkpoints by copying a KSampler, you almost always drift a setting between copies - this branch is on 20 steps, that one on 24, and suddenly you're comparing apples and oranges. Build one config, then use this node to swap in checkpoint B while the seed and every other dial stay identical. Same input, same settings, different weights. That's the controlled experiment you want before you conclude one model is better than another.

The in-place caveat from the latent patch applies identically: the node mutates the shared config object and returns it, so a model swap on one branch changes the object everywhere it flows in that run. Sequential use is fine; parallel branches sharing one config is where it bites. If you only need a different model for a single call, RepeatSampler's optional model input is the non-mutating route.

Install

Pack-wide, same as every node here - ComfyUI Manager → search "ComfyUI-AharaNodes" → Install, or clone by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/chris-arsenault/ComfyUI-AharaNodes
# then restart ComfyUI

No requirements.txt, no model files. Registered with the Comfy Registry.

Troubleshooting

Mostly the shared-object gotcha above: if a branch is sampling with a model you didn't mean it to, check whether a config object is shared and got patched elsewhere. And if all six nodes fail to appear, the pack's frame_segmenter.py imports oauthlib and sympy at load time without using them - pip install oauthlib sympy into ComfyUI's Python fixes it.

CategoryAharaNodes/sampling

Inputs (2)

NameTypeDefaultDescription
modelMODELThe model used for denoising the input latent.
configSAMPLER_CONFIG

Outputs (1)

NameTypeDescription
SAMPLER_CONFIGSAMPLER_CONFIG