Nodes/RES4LYF/ClownGuides
ComfyUI Node Runs on cloud

ClownGuides

Steer composition and style with guide images

By ClownsharkBatwing·Created 2 years ago·Updated 21 days ago· 1,222
ClownGuides
  • guide_masked
  • guide_unmasked
  • mask
  • weights_masked
  • weights_unmasked
  • guides
guide_modeepsilon
channelwise_modetrue
projection_modetrue
weight_masked0.75
weight_unmasked0.75
cutoff_masked1.00
cutoff_unmasked1.00
weight_scheduler_maskedbeta57
weight_scheduler_unmaskedconstant
start_step_masked0
start_step_unmasked0
end_step_masked15
end_step_unmasked15
invert_maskfalse

ClownGuides is how you tell a RES4LYF sampler "make it look like this." You feed it a guide image (or two) as latents, optionally a mask, and it produces a GUIDES object that plugs into a sampler's guides input. During sampling the solver is nudged toward your guide - its composition, its color, its style - without you training a LoRA or wiring up a ControlNet. Community users describe it as living somewhere between high-denoise img2img and RF inversion, and reach for it to guide layout and color or just to escape the model's default "person centered, posing for camera" output.

This is the machinery behind RES4LYF's headline style-transfer and composition demos. A composition guide sets where things go; a style guide sets how they look. With a mask you can apply guidance to part of the frame only - the basis for the pack's regional and dual-guide workflows.

How it works

The guide latents are injected into the sampling process according to a weight and a schedule, so the guidance is strongest early and fades as the image resolves (or however you shape it). The guide_mode decides how the guide is applied - the low-level method - and community practice is to flip between a few of them (epsilon, flow) depending on the model and the effect you want.

The inputs and outputs that matter

  • guide_masked / guide_unmasked (optional LATENT) - your guide images, encoded to latents. "Masked" applies inside the mask, "unmasked" outside it; use one or both.
  • mask (optional MASK) - the region the masked guide applies to. Leave it off for a whole-frame guide.
  • guide_mode (default epsilon) - the application method: epsilon, flow, sync, data, inversion, and the pseudoimplicit variants. epsilon and flow are the everyday picks; the others are for specific tricks.
  • weight_masked / weight_unmasked (FLOAT, default 0.75) - how hard each guide pulls. Higher clings to the guide; lower lets the prompt lead.
  • end_step_masked / end_step_unmasked (INT, default 15) - the step the guide stops acting on. Guiding early then releasing lets the model finish naturally; guide too late and you fossilize the reference.

The single output is guides (GUIDES) - wire it into the guides input of ClownSamplerAdvanced or the all-in-one ClownsharKSampler.

Installing it

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

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

pip install in the venv or portable Python, restart, hard-refresh (F5). No downloads, but your guides need to be encoded to latents first (a VAE encode).

Where people get tripped up

The guides are latents, not images - run your reference through a VAE encode before it reaches this node, matched to your model's latent format (16-channel for flow-matching models). Feed a raw image in and it won't work.

Second, weight and end-step are a balance, not a "more is better." Crank weight and drag end_step late and the output stops being a generation and starts being a slightly-noised copy of your guide - the model's own knowledge gets crushed. Start around the 0.75 default, end the guide partway through (the default 15), and back off if the result feels traced. And to actually confirm the guide is doing the work and not your prompt, the README's own advice applies: try a run with the guide off and see how much the prompt was carrying on its own.

CategoryRES4LYF/sampler_extensions

Inputs (19)

NameTypeDefaultDescription
guide_modeCOMBOepsilonCompletely undocumented guide mode.
channelwise_modeBOOLEANtrue
projection_modeBOOLEANtrue
weight_maskedFLOAT0.75-100–100Set the strength of the guide.
weight_unmaskedFLOAT0.75-100–100Set the strength of the guide_bkg.
cutoff_maskedFLOAT1.000–1Disables the guide for the next step when the denoised image is similar to the guide. Higher values will strengthen the effect.
cutoff_unmaskedFLOAT1.00-100–100Disables the guide for the next step when the denoised image is similar to the guide. Higher values will strengthen the effect.
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
start_step_maskedINT00–10000
start_step_unmaskedINT00–10000
end_step_maskedINT15-1–10000
end_step_unmaskedINT15-1–10000
invert_maskBOOLEANfalse
guide_maskedoptLATENT
guide_unmaskedoptLATENT
maskoptMASK
weights_maskedoptSIGMAS
weights_unmaskedoptSIGMAS

Outputs (1)

NameTypeDescription
guidesGUIDES