Nodes/ComfyUI-Inference-Core-Nodes/Inference_Core_ReferenceOnlySimple
ComfyUI Node

Inference_Core_ReferenceOnlySimple

Style Consistency Without a ControlNet Model

By LykosAI·Created 2 years ago·Updated about a year ago· 33
Inference_Core_ReferenceOnlySimple
  • model
  • reference
  • MODEL
  • LATENT
batch_size1

Reference-only is the trick people used for character consistency before IP-Adapter existed, and it's still worth knowing because it needs literally nothing extra downloaded. No adapter checkpoint, no ControlNet weights, no training. You give it a reference image (already encoded to a latent) and it hijacks the model's own self-attention so every step of generation "looks at" that reference the same way the model normally looks at itself.

That's the whole mechanism, and it's a neat one. A diffusion UNet's self-attention layers let each patch of the image attend to every other patch while it's being denoised - that's how a face stays coherent while it forms. Reference-only patches those layers so the reference latent's features get folded into that same attention pool. The model isn't told "copy this image," it's just given more of itself to look at, and the reference's style, palette, and rough character traits leak through as a side effect.

Inputs that matter: model is any loaded checkpoint (this is an SD 1.5/SDXL-era technique, not something you'll find wired into a modern DiT graph), reference is a LATENT - meaning you VAE-encode your reference image first, this node doesn't take a raw IMAGE - and batch_size tells it how many copies of that reference to prepare, matching however many images you're sampling in the same batch. Two outputs come back: a patched MODEL you plug straight into your KSampler, and a LATENT that's the batched reference itself, which in the standard workflow you concatenate with your actual noise latent before sampling - both ride through the UNet together, and you split the reference back out afterward with something like Latent From Batch.

Where does this sit today? Honestly, it's a legacy move. The community's own read on it: reference-only ControlNet was a genuine "first real zero-shot consistency mechanism," and then IP-Adapter ate its lunch for faces and characters, and instruction-editing models (Kontext, Qwen-Edit) ate IP-Adapter's lunch in turn. If you're chasing serious character consistency in 2026, you probably want one of those instead. Where reference-only still earns its keep is exactly the "custom_node_experiments" corner it lives in here - cheap, no-download style nudging on an SD 1.5/SDXL workflow where you don't want to add another model to your VRAM budget.

Installing it: this node ships inside LykosAI's ComfyUI-Inference-Core-Nodes pack - the same team that makes Stability Matrix, the popular meta-installer for local SD UIs, so the dependency story here is more deliberate than your average hobby node pack. Easiest path is ComfyUI Manager: search "ComfyUI-Inference-Core-Nodes" and install. Manually, it's cd ComfyUI/custom_nodes && git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes, then either run install.py with the same Python environment ComfyUI uses, or pip install -e .[cuda] (CUDA 11), .[cuda12], .[rocm], .[directml], or .[cpu] depending on your hardware - those variants pull in an accelerated onnxruntime build, which most of this pack's other nodes need but this particular one doesn't. Restart ComfyUI after.

Where people actually get stuck: the install step, not the node itself. A recurring real report is ComfyUI failing to import the pack entirely with ModuleNotFoundError: No module named 'inference_core_nodes' - that means the git clone landed but the Python package itself never got installed, usually because install.py was run against the wrong interpreter (a classic trap on portable/embedded ComfyUI builds, where you need to target python_embeded explicitly, not your system Python). If ComfyUI throws an outright IMPORT FAILED for this pack rather than a runtime error, that's also worth checking against a plain pip install -e . first before chasing GPU-specific extras - get it importing on CPU, then layer on acceleration.

For this specific node, once it's loaded there's not much that goes wrong at runtime beyond the usual "forgot to encode the reference to a latent first" - remember it wants LATENT, not IMAGE, so a bare image input will just fail to connect.

Categorycustom_node_experiments

Inputs (3)

NameTypeDefaultDescription
modelMODEL
referenceLATENT
batch_sizeINT11–64

Outputs (2)

NameTypeDescription
MODELMODEL
LATENTLATENT