Nodes/RES4LYF/ClownGuides Sync_Advanced
ComfyUI Node Runs on cloud

ClownGuides Sync_Advanced

The kitchen-sink guide behind RES4LYF faceswaps

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
ClownGuides Sync_Advanced
  • guide_masked
  • guide_unmasked
  • mask
  • mask_sync
  • mask_drift_x
  • mask_drift_y
  • mask_lure_x
  • mask_lure_y
  • weights_masked
  • weights_unmasked
  • syncs_masked
  • syncs_unmasked
  • drift_xs_masked
  • drift_xs_unmasked
  • drift_ys_masked
  • drift_ys_unmasked
  • lure_xs_masked
  • lure_xs_unmasked
  • lure_ys_masked
  • lure_ys_unmasked
  • guides
weight_masked1.00
weight_unmasked1.00
weight_scheduler_maskedconstant
weight_scheduler_unmaskedconstant
weight_start_step_masked0
weight_start_step_unmasked0
weight_end_step_masked30
weight_end_step_unmasked-1
sync_masked0.00
sync_unmasked1.00
sync_scheduler_maskedconstant
sync_scheduler_unmaskedconstant
sync_start_step_masked0
sync_start_step_unmasked0
sync_end_step_masked-1
sync_end_step_unmasked-1
drift_x_data0.00
drift_x_sync0.00
drift_x_masked1.00
drift_x_unmasked0.00
drift_x_scheduler_maskedconstant
drift_x_scheduler_unmaskedconstant
drift_x_start_step_masked0
drift_x_start_step_unmasked0
drift_x_end_step_masked-1
drift_x_end_step_unmasked-1
drift_y_data0.00
drift_y_sync0.00
drift_y_guide0.00
drift_y_masked1.00
drift_y_unmasked0.00
drift_y_scheduler_maskedconstant
drift_y_scheduler_unmaskedconstant
drift_y_start_step_masked0
drift_y_start_step_unmasked0
drift_y_end_step_masked-1
drift_y_end_step_unmasked-1
lure_x_masked0.00
lure_x_unmasked0.00
lure_x_scheduler_maskedconstant
lure_x_scheduler_unmaskedconstant
lure_x_start_step_masked0
lure_x_start_step_unmasked0
lure_x_end_step_masked-1
lure_x_end_step_unmasked-1
lure_y_masked0.00
lure_y_unmasked0.00
lure_y_scheduler_maskedconstant
lure_y_scheduler_unmaskedconstant
lure_y_start_step_masked0
lure_y_start_step_unmasked0
lure_y_end_step_masked-1
lure_y_end_step_unmasked-1
lure_iter0
lure_sequencey -> x
invert_maskfalse
invert_mask_syncfalse
invert_mask_drift_xfalse
invert_mask_drift_yfalse
invert_mask_lure_xfalse
invert_mask_lure_yfalse

This is the most parameter-dense node in RES4LYF, and it's not close. ClownGuides Sync Advanced exposes the full guidance machine - separate masked and unmasked control over weight, "sync," "drift" on two axes, and "lure," each with its own scheduler, step window, and mask. It's the node under the pack's zero-shot faceswap and universal style-transfer workflows, where the author needed to guide masked and unmasked regions of an image along different trajectories at the same time.

The context is worth it. The author built the sync guide mode specifically to fight the classic problem with zero-shot faceswaps: source-image color and lighting bleeding into the result. As he put it, PuLID-style methods leave you "more likely to end up with some part of the source image in your generation, such as incongruously colored hair or uncanny lighting," and the sync mode plus scattersort were his answer. This node is where that control lives at full resolution.

How it works

Like every RES4LYF guide it builds a GUIDES bundle for the sampler's guides input. What makes it "advanced" is that almost every effect is split into a masked and an unmasked channel - so the face region and the background can be guided independently. On top of the base guide weight it layers three more families of control: sync (how tightly the guide locks the generation to the reference), drift on X and Y (directional pull of the guided content), and lure (an iterative attraction with its own sequence order). Each of those has masked/unmasked weights, a scheduler, and start/end steps. It's a mixing desk, not a single knob.

The inputs and outputs that matter

Do not try to set all of these by hand. The load-bearing ones:

  • guide_masked / guide_unmasked (LATENT, optional) - references for the masked region and everything else.
  • mask (MASK, optional) - the region split; there are also per-effect masks (mask_sync, mask_drift_x, …) for finer separation.
  • weight_masked / weight_unmasked (FLOAT, default 1) - the base strengths. Start here.
  • sync_masked / sync_unmasked (FLOAT) - how hard each region syncs to its guide; the defaults (masked 0, unmasked 1) are tuned for the faceswap case.
  • The drift_* and lure_* families plus every *_scheduler_* and *_step_* - advanced shaping. Leave at defaults until you have a reason.

Output is a guides (GUIDES) bundle for the sampler.

How to install it

ComfyUI Manager: search RES4LYF, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF/, pip install -r requirements.txt in the venv (portable: embedded python's pip), restart, hard-refresh F5. Do not build this from scratch - load one of the pack's faceswap or style-transfer example workflows and adjust from there. Nested sampler menu: rgthree-comfy with "Auto Nest Subdirectories" on.

Common issues

The honest warning: this node is where people get overwhelmed and conclude RES4LYF is impenetrable. With this many masked/unmasked pairs, it is very easy to set contradictory values - a sync that fights a drift, a masked window that doesn't overlap its unmasked counterpart - and end up with mush and no idea which of forty parameters caused it. Start from a working example workflow, change one channel at a time, keep the seed fixed.

Faceswap-specific: likeness is inherently limited with zero-shot methods (the author says so himself - loras are still the best method), and this node won't fix a weak PuLID embed. If the face is off, the fix is usually upstream (better reference, more zoom on the face), not another pass through these knobs. And the pack-wide scheduler trap applies across every scheduler field here: bong_tangent ignores the workflow's shift, so if a channel misbehaves, try beta57 or constant first.

CategoryRES4LYF/sampler_extensions

Inputs (81)

NameTypeDefaultDescription
weight_maskedFLOAT1.00-100–100Set the strength of the guide.
weight_unmaskedFLOAT1.00-100–100Set the strength of the guide_bkg.
weight_scheduler_maskedCOMBOconstant12 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_maskedINT30-1–10000
weight_end_step_unmaskedINT-1-1–10000
sync_maskedFLOAT0.00-100–100Set the strength of the guide.
sync_unmaskedFLOAT1.00-100–100Set the strength of the guide_bkg.
sync_scheduler_maskedCOMBOconstant12 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_maskedINT-1-1–10000
sync_end_step_unmaskedINT-1-1–10000
drift_x_dataFLOAT0.00-100–100Set the strength of the guide.
drift_x_syncFLOAT0.00-100–100Set the strength of the guide.
drift_x_maskedFLOAT1.00-100–100Set the strength of the guide.
drift_x_unmaskedFLOAT0.00-100–100Set the strength of the guide_bkg.
drift_x_scheduler_maskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
drift_x_scheduler_unmaskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
drift_x_start_step_maskedINT00–10000
drift_x_start_step_unmaskedINT00–10000
drift_x_end_step_maskedINT-1-1–10000
drift_x_end_step_unmaskedINT-1-1–10000
drift_y_dataFLOAT0.00-100–100Set the strength of the guide.
drift_y_syncFLOAT0.00-100–100Set the strength of the guide.
drift_y_guideFLOAT0.00-100–100Set the strength of the guide.
drift_y_maskedFLOAT1.00-100–100Set the strength of the guide.
drift_y_unmaskedFLOAT0.00-100–100Set the strength of the guide_bkg.
drift_y_scheduler_maskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
drift_y_scheduler_unmaskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
drift_y_start_step_maskedINT00–10000
drift_y_start_step_unmaskedINT00–10000
drift_y_end_step_maskedINT-1-1–10000
drift_y_end_step_unmaskedINT-1-1–10000
lure_x_maskedFLOAT0.00-100–100Set the strength of the guide.
lure_x_unmaskedFLOAT0.00-100–100Set the strength of the guide_bkg.
lure_x_scheduler_maskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
lure_x_scheduler_unmaskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
lure_x_start_step_maskedINT00–10000
lure_x_start_step_unmaskedINT00–10000
lure_x_end_step_maskedINT-1-1–10000
lure_x_end_step_unmaskedINT-1-1–10000
lure_y_maskedFLOAT0.00-100–100Set the strength of the guide.
lure_y_unmaskedFLOAT0.00-100–100Set the strength of the guide_bkg.
lure_y_scheduler_maskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
lure_y_scheduler_unmaskedCOMBOconstant12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6
lure_y_start_step_maskedINT00–10000
lure_y_start_step_unmaskedINT00–10000
lure_y_end_step_maskedINT-1-1–10000
lure_y_end_step_unmaskedINT-1-1–10000
lure_iterINT00–10000
lure_sequenceCOMBOy -> x3 options: x -> y, y -> x, xy -> xy
invert_maskBOOLEANfalse
invert_mask_syncBOOLEANfalse
invert_mask_drift_xBOOLEANfalse
invert_mask_drift_yBOOLEANfalse
invert_mask_lure_xBOOLEANfalse
invert_mask_lure_yBOOLEANfalse
guide_maskedoptLATENT
guide_unmaskedoptLATENT
maskoptMASK
mask_syncoptMASK
mask_drift_xoptMASK
mask_drift_yoptMASK
mask_lure_xoptMASK
mask_lure_yoptMASK
weights_maskedoptSIGMAS
weights_unmaskedoptSIGMAS
syncs_maskedoptSIGMAS
syncs_unmaskedoptSIGMAS
drift_xs_maskedoptSIGMAS
drift_xs_unmaskedoptSIGMAS
drift_ys_maskedoptSIGMAS
drift_ys_unmaskedoptSIGMAS
lure_xs_maskedoptSIGMAS
lure_xs_unmaskedoptSIGMAS
lure_ys_maskedoptSIGMAS
lure_ys_unmaskedoptSIGMAS

Outputs (1)

NameTypeDescription
guidesGUIDES