ClownGuides
Steer composition and style with guide images
- guide_masked
- guide_unmasked
- mask
- weights_masked
- weights_unmasked
- guides
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.epsilonandfloware 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.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| guide_mode | COMBO | epsilon | Completely undocumented guide mode. |
| channelwise_mode | BOOLEAN | true | — |
| projection_mode | BOOLEAN | true | — |
| weight_masked | FLOAT | 0.75-100–100 | Set the strength of the guide. |
| weight_unmasked | FLOAT | 0.75-100–100 | Set the strength of the guide_bkg. |
| cutoff_masked | FLOAT | 1.000–1 | Disables the guide for the next step when the denoised image is similar to the guide. Higher values will strengthen the effect. |
| cutoff_unmasked | FLOAT | 1.00-100–100 | Disables the guide for the next step when the denoised image is similar to the guide. Higher values will strengthen the effect. |
| weight_scheduler_masked | COMBO | beta57 | 12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6 |
| weight_scheduler_unmasked | COMBO | constant | 12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6 |
| start_step_masked | INT | 00–10000 | — |
| start_step_unmasked | INT | 00–10000 | — |
| end_step_masked | INT | 15-1–10000 | — |
| end_step_unmasked | INT | 15-1–10000 | — |
| invert_mask | BOOLEAN | false | — |
| guide_maskedopt | LATENT | — | |
| guide_unmaskedopt | LATENT | — | |
| maskopt | MASK | — | |
| weights_maskedopt | SIGMAS | — | |
| weights_unmaskedopt | SIGMAS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| guides | GUIDES | — |