ClownGuide SelfRefine
Refine an image against its own estimate, no reference
- mask
- weights
- guides
Most of RES4LYF's guides steer your generation toward an external reference image. SelfRefine is the odd one that doesn't need one. It guides the image toward its own evolving denoised estimate - a self-consistency pass that can tighten coherence and clean up wobble without importing anything from outside. Notice there's no guide latent input here: that absence is the whole idea.
Like the rest of the family, it builds a GUIDES bundle that plugs into the sampler's guides input and acts during sampling. The self-refine guide modes also appear inside the bigger dual-guide node, but this dedicated node exposes just them, with their own threshold and metric controls, so you can add a refinement pass without wading through the kitchen-sink guide's options.
How it works
During sampling the model is constantly forming a prediction of the finished image. SelfRefine takes that internal estimate and feeds it back as a soft guide, encouraging the trajectory to stay consistent with where it's already heading rather than drifting. Two modes are on offer - self_refine_epsilon and self_refine_pseudoimplicit - differing in the math of how the refinement is applied. A threshold and cutoff decide when the refinement kicks in and stops, and you choose whether the comparison uses an L1 or L2 distance metric.
The inputs and outputs that matter
guide_mode(enum:self_refine_epsilon,self_refine_pseudoimplicit; default the former) - which refinement method. Start with the default.weight(FLOAT, default1) - how strongly to pull toward the self-estimate.self_refine_threshold(FLOAT, default0.2) andself_refine_cutoff(default0.99) - the window, in normalized terms, where refinement is active. These gate when it engages.self_refine_metric(enum:L1,L2; defaultL1) - the distance used to compare against the estimate. L1 is more forgiving of outliers, L2 punishes big deviations harder.weight_scheduler,start_step/end_step,mask- the shared scheduling, step-window, and regional controls.
Output is a guides (GUIDES) bundle for the sampler or the next guide.
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. Nested sampler menu: rgthree-comfy with "Auto Nest Subdirectories" on.
Common issues
The failure mode to watch is over-refinement. Push weight too high or open the threshold/cutoff window too wide and the image can lock onto its early estimate and stop developing - you get something over-smoothed, plasticky, or weirdly rigid, because the guide keeps dragging it back to an unfinished prediction. If detail collapses, lower the weight and tighten the window.
It's also genuinely subtle. On an already-clean flow-matching generation with a good sampler and beta57, SelfRefine may do very little visible work - its value shows up more on trickier cases where sampling would otherwise wander. Don't expect a dramatic before/after on an easy prompt. And since this is deep, thinly-documented sampler territory, use a fixed seed and change one control at a time; the difference between "helped" and "over-refined" is a small move on weight, and you won't see it if the seed is also moving.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| guide_mode | COMBO | self_refine_epsilon | Self-refine guide mode. |
| channelwise_mode | BOOLEAN | false | — |
| projection_mode | BOOLEAN | false | — |
| weight | FLOAT | 1.00-100–100 | Set the strength of the guide. |
| weight_scheduler | COMBO | constant | 12 options: constant, simple, sgm_uniform, karras, exponential, ddim_uniform, +6 |
| start_step | INT | 00–10000 | — |
| end_step | INT | 15-1–10000 | — |
| invert_masks | BOOLEAN | false | — |
| self_refine_threshold | FLOAT | 0.200–1 | Self-refine threshold for masking. (Use much lower value for L2 versus L1 metric (eg. 0.05 vs 0.20)) |
| self_refine_cutoff | FLOAT | 0.990–1 | Skip remaining iterations when certain mask coverage exceeds this fraction. |
| self_refine_metric | COMBO | L1 | Self-refine metric for thresholding. |
| maskopt | MASK | — | |
| weightsopt | SIGMAS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| guides | GUIDES | — |