Nodes/ComfyUI/Positive-Biased Guidance
ComfyUI Node Runs on cloud

Positive-Biased Guidance

The positive-biased guidance node nobody can explain

By Comfy-Org·Created 4 years ago·Updated about an hour ago· 129,865
Positive-Biased Guidance
  • model
  • patched_model

If you typed "mahiro" into ComfyUI and this is the node you got, welcome to one of the least-documented things in core. It's been sitting in the codebase since roughly mid-2025 - a Reddit post from back then literally asked "any idea what this node is doing?" and the answer was basically nobody knew. It's a genuine experiment by the ComfyUI team, not a port of a paper, which is why it has no explainer page anywhere. Here's what it actually does.

The problem it's aimed at. Normal CFG steers by the difference between your positive and negative prompt: uncond + scale × (cond − uncond). That's a clean formula, but the negative direction leaks into the result. Your negative says "no bad anatomy, no flat lighting," and the sampler pushes away from it - which is also why a heavy negative shifts colors, desaturates, and generally makes images look overcooked. Mahiro's idea: stop steering so hard along the negative's direction, and instead scale more along the direction the positive prediction itself points. Positive-biased guidance, as the display name says.

How it works. It's a model patcher that hooks the post-CFG step. It computes the plain CFG result, then a "naive leap" (the positive prediction scaled by CFG), then measures how similar the normalized negative leap and that merged result are using cosine similarity. When the positive and negative directions point very differently, it blends the output toward the positive leap; when they agree, it stays closer to normal CFG. So the more your negative is fighting your positive, the more Mahiro quietly ignores the negative's direction.

The node itself is almost absurdly simple. One input - model - and one output, patched_model, which is a MODEL that wires into your KSampler's model port. That's it. No scale, no strength, no toggle. It's a binary "try it and see" thing, which is exactly as experimental as the category label implies.

When you'd reach for it. If you're on an SDXL-lineage checkpoint (they still run real CFG at 5–9; see the knowledge base's guidance-distilled notes for which models that excludes) and your negative prompt is dragging your colors toward grey, Mahiro is a ten-second A/B test: drop it in, rerun the same seed, and see if the image keeps its punch. On guidance-distilled models that run at CFG 1 there's no unconditional pass for it to hook, so it does nothing there - don't bother.

Gotchas. It has no knobs, so you can't tune how much it ignores the negative; either you like what it does to your seed or you don't. It interacts with other post-CFG patchers (SAG, FreSca) - if you stack several, they run in sequence and nobody promises the result is sane. And because it's experimental, its API can change between ComfyUI updates; a workflow that loads today might not load next month. Save the workflow, not the assumption.

Honest verdict: 76 impressions and a 4.8 average position say people are finding it, not necessarily keeping it. Try it on a stubborn SDXL render where the negative is fighting you. If it doesn't visibly help, you've lost two minutes - which is about the right budget for an experiment.

To add it in the UI: double-click the canvas and search "Mahiro" or "positive-biased guidance." It ships with ComfyUI core, no install needed.

Categoryexperimental

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
patched_modelMODEL