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

Patch Repeat Sampler Config (Latent)

Repoint a saved sampler recipe at a different latent

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

Patch Repeat Sampler Config (Latent) is a two-wire tweak: in goes a SAMPLER_CONFIG and a latent_image, out comes the same config carrying a new latent. That's the entire node - one assignment, config.latent_image = latent_image, no sampling of its own.

Why it exists: a config built by Repeat Sampler Config bakes the latent in at creation time. If you want to run the same recipe against a different starting latent - a different frame, a different img2img source image, a different noise blob per branch - this swaps just that field so you don't rebuild the whole config.

Honest note: RepeatSampler already has an optional latent_image input that does the same job per call without touching the shared object. The difference is mutation. This node changes the config in place and hands back the same Python object, so a patch on one branch is visible everywhere that config object flows in the run. That's occasionally exactly what you want (thread one config through a series of cells and repoint each) and occasionally a nasty surprise (two branches sharing one config, patched on one, both changed). If you only need to vary the latent for a single sampler call, the optional input is the safer tool; reach for this node when you want the recipe itself to carry the new latent onward.

Install

Pack-wide, same as every other 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

If a path in your workflow produces a latent you weren't expecting, check whether two branches share the same config object - that's the in-place mutation biting. And if the whole pack won't load, its frame_segmenter.py imports oauthlib and sympy at load time (both unused); pip install oauthlib sympy into ComfyUI's Python fixes it.

CategoryAharaNodes/sampling

Inputs (2)

NameTypeDefaultDescription
latent_imageLATENTThe latent image to denoise.
configSAMPLER_CONFIG

Outputs (1)

NameTypeDescription
SAMPLER_CONFIGSAMPLER_CONFIG