Nodes/ComfyUI-Advanced-ControlNet/Reference ControlNet πŸ›‚πŸ…πŸ…’πŸ…
ComfyUI Node Runs on cloud

Reference ControlNet πŸ›‚πŸ…πŸ…’πŸ…

Style and color from an image, no model file

By KosinkadinkΒ·Created 3 years agoΒ·Updated 8 days agoΒ· 993
Reference ControlNet πŸ›‚πŸ…πŸ…’πŸ…
    • CONTROL_NET
    β—„reference_typeβ–Ύβ–Ί
    β—„style_fidelity0.50β–Ί
    β—„ref_weight1.00β–Ί

    The neat thing about Reference is that there's no model file to download and no preprocessor to run. You feed it a raw image and it pulls that image's look - style, color, texture - into your generation by borrowing the reference's self-attention features during sampling. It's conceptually close to IP-Adapter (semantic content rather than spatial structure), but it lives inside the ControlNet framework, so you wire it up the same way you'd wire any other ControlNet in this pack.

    This node doesn't load anything. It builds a Reference "ControlNet" object out of a couple of settings, and the actual reference image goes in through the image input of your Apply Advanced ControlNet node. That surprises people - there's no image input on this node itself.

    How it works

    Standard ControlNet conditions on a preprocessed map (edges, depth, pose). Reference skips the preprocessor entirely: as the model denoises, it also runs your reference image through the same UNet and shares that image's attention (and/or its AdaIN feature statistics) with the generation, so the output drifts toward the reference's appearance. Because it's the raw image doing the work, it's great for keeping a consistent style or palette across shots - the classic 2023 recipe was Reference plus a lineart ControlNet to hold a character's look steady across scenes.

    One thing to know going in: Reference is an SD 1.5 and SDXL technique. It was never rebuilt for the DiT bases (Flux, Qwen, Z-Image, Anima), so if you're on a modern model, this node has nothing to attach to. On those bases, appearance transfer moved to reference images consumed in-context by editing models.

    The inputs and outputs that matter

    Three required inputs, all simple:

    • reference_type - the mode: attention-based, AdaIN-based, or both together. Attention transfers structure-of-style most strongly; AdaIN leans on color and tone statistics; the combined mode is the fullest transfer. Try attention first.
    • style_fidelity (default 0.5) - how hard it clamps to the reference's style. Equivalent to A1111's style_fidelity. Higher sticks closer to the reference at some cost to prompt freedom.
    • ref_weight (default 1.0) - how strongly the reference features are injected. Equivalent to A1111's control_weight.

    Output is a CONTROL_NET you plug into the apply node. Remember: the reference image itself goes into the apply node's image input, and the strength on that apply node balances the ref-influenced result against the no-ref result.

    How to install it

    ComfyUI Manager: search ComfyUI-Advanced-ControlNet, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet
    

    then restart. No dependencies, and - nicely - no model download for this one. The whole Reference mechanism is built into the pack.

    Common issues & troubleshooting

    "Where does the image go?" Into the Apply Advanced ControlNet node's image input, not this node. This node only carries the settings.

    It does nothing on Flux/Qwen/Z-Image/Anima. Reference is SD 1.5 / SDXL only. There's no modern-base equivalent; do the pass on an SDXL model and carry the result forward if you need this look.

    The style barely shows, or it takes over completely. Balance three dials, not one: ref_weight on this node, style_fidelity here, and strength on the apply node. If it's overpowering, drop the apply strength first; if it's faint, raise ref_weight and nudge style_fidelity up. For finer separate control of the attention and AdaIN halves, use the Reference ControlNet (Finetune) node.

    CategoryAdv-ControlNet πŸ›‚πŸ…πŸ…’πŸ…/Reference

    Inputs (3)

    NameTypeDefaultDescription
    reference_typeCOMBO3 options: reference_attn, reference_adain, reference_attn+adain
    style_fidelityFLOAT0.500–1β€”
    ref_weightFLOAT1.000–1β€”

    Outputs (1)

    NameTypeDescription
    CONTROL_NETCONTROL_NETβ€”