Nodes/RES4LYF/ClownGuides Sync
ComfyUI Node Runs on cloud

ClownGuides Sync

Bundle masked and unmasked latent guides for RES4LYF

By ClownsharkBatwing·Created 2 years ago·Updated 21 days ago· 1,222
ClownGuides Sync
  • guide_masked
  • guide_unmasked
  • mask
  • weights_masked
  • weights_unmasked
  • syncs_masked
  • syncs_unmasked
  • guides
weight_masked1.00
weight_unmasked1.00
weight_scheduler_maskedbeta57
weight_scheduler_unmaskedconstant
weight_start_step_masked0
weight_start_step_unmasked0
weight_end_step_masked15
weight_end_step_unmasked15
sync_masked1.00
sync_unmasked1.00
sync_scheduler_maskedbeta57
sync_scheduler_unmaskedconstant
sync_start_step_masked0
sync_start_step_unmasked0
sync_end_step_masked15
sync_end_step_unmasked15
invert_maskfalse

ClownGuides Sync is the node that packages up latent image guides for RES4LYF sampling - one guide for a masked region, another for everything else - and hands them to the sampler as a single GUIDES bundle. If you've seen the pack's "composition guide → output ← style guide" workflows, this is the plumbing that lets you point the sampler at a reference latent and say "steer toward this here, and toward that there."

Latent guidance is one of RES4LYF's core img2img tricks. Instead of denoising from pure noise, you give the sampler a target latent to lean toward as it goes - useful for keeping a composition, doing guided unsampling/resampling, or transforming an existing image while holding its layout. The "sync" part is the clever bit: it schedules how the guide's pull tracks the sampling process, so you can have it dominate early (locking composition) and fade out late (letting detail emerge), or the reverse. Two independent channels - masked and unmasked - mean the region you care about and the surrounding image can follow different guide strengths and schedules.

How it works

You feed a guide_masked latent, a guide_unmasked latent, and a mask that separates them. The node builds a GUIDES object carrying both, plus per-channel weight and sync schedules, and your RES4LYF sampler applies it during denoising.

The inputs and outputs that matter

There are a lot of widgets here, most of them mirrored _masked / _unmasked pairs. The ones that matter:

  • guide_masked / guide_unmasked (LATENT, both optional) - the target latents for inside and outside the mask.
  • mask (MASK) - splits masked from unmasked. invert_mask flips it.
  • guides (GUIDES) out - wire into your sampler's guides input, or chain into a style-guide node.
  • weight_masked / weight_unmasked (default 1) - how hard each channel pulls. Turn the region you care about up, the rest down.
  • weight_scheduler_masked (default beta57) / weight_scheduler_unmasked (default constant) - the shape of the pull over time. constant holds steady; beta57 and the others ramp it. This is where "lock composition early, release late" lives.
  • weight_end_step_masked / weight_end_step_unmasked (default 15) - when to stop applying each guide. Ending a guide partway through hands the back half of sampling to the model.

The sync_* set mirrors all of that for a second guidance channel; leave it at defaults until the basic guide is behaving.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt

then restart and hard-refresh (F5). Nothing to download.

Common issues & troubleshooting

The guide overpowers everything and the output is basically the reference. Lower the weights, and shorten weight_end_step_* so the guide releases before the final steps. A guide that runs to the last step leaves no room for the model to finish.

Masked and unmasked feel swapped. guide_masked applies inside the mask. If the wrong region is following the wrong guide, check invert_mask and confirm which latent you plugged where.

It does nothing. GUIDES only take effect when a RES4LYF sampler that accepts them is consuming the output - this isn't a standalone effect, it's an instruction for the pack's samplers. Make sure the bundle actually reaches one.

CategoryRES4LYF/sampler_extensions

Inputs (24)

NameTypeDefaultDescription
weight_maskedFLOAT1.00-100–100Set the strength of the guide.
weight_unmaskedFLOAT1.00-100–100Set the strength of the guide_bkg.
weight_scheduler_maskedCOMBObeta5712 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
weight_scheduler_unmaskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
weight_start_step_maskedINT00–10000
weight_start_step_unmaskedINT00–10000
weight_end_step_maskedINT15-1–10000
weight_end_step_unmaskedINT15-1–10000
sync_maskedFLOAT1.00-100–100Set the strength of the guide.
sync_unmaskedFLOAT1.00-100–100Set the strength of the guide_bkg.
sync_scheduler_maskedCOMBObeta5712 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
sync_scheduler_unmaskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
sync_start_step_maskedINT00–10000
sync_start_step_unmaskedINT00–10000
sync_end_step_maskedINT15-1–10000
sync_end_step_unmaskedINT15-1–10000
invert_maskBOOLEANfalse
guide_maskedoptLATENT
guide_unmaskedoptLATENT
maskoptMASK
weights_maskedoptSIGMAS
weights_unmaskedoptSIGMAS
syncs_maskedoptSIGMAS
syncs_unmaskedoptSIGMAS

Outputs (1)

NameTypeDescription
guidesGUIDES