Nodes/NovelAI GENYTOOLS/NAI 精准参考应用器
ComfyUI Node

NAI 精准参考应用器

Keep the character, steal the style — V4.5's precise reference

By XTOGENY·Created 2 months ago·Updated 24 days ago· 19
NAI 精准参考应用器
  • nai_pipe
  • image
  • nai_pipe
  • 参考摘要
reference_type角色
strength1.00
fidelity1.00
enabledtrue

NovelAI's "precise reference" is how you make a character or a style stick across generations without a LoRA - you feed it a reference image and it steers the generation to match. NAIPreciseReferenceApplyV2 is that feature as a node: it sits in the model pipeline and hands the reference to the sampler along with everything else. Two things to know up front: it only works on V4.5 models, and it can't be combined with Vibe. The pack enforces both before you spend anything.

What it is

Inputs: the NAI_PIPE, a reference IMAGE, and four controls:

  • reference_type - 角色 (character), 风格 (style), or 角色与风格 (both). Character reference locks identity; style reference locks the look; both does what it says.
  • strength (default 1, range −5 to 5) - how hard the reference pushes the generation.
  • fidelity (default 1, range −5 to 5) - how closely the result must match the reference.
  • enabled (true) - flip this off to keep the reference in the workflow without applying it.

Outputs: the modified nai_pipe (wire it onward to the sampler) and a 参考摘要 (STRING) counting how many references are attached.

How it behaves

The node appends the reference to the pipe's reference list, tagged with its type, strength and fidelity. At generation time NovelAI uses it to constrain the output. Character references are the same trick as the KB's character-consistency advice writ small: you get identity stability from an image instead of from training a LoRA. Style reference is the one people underestimate - a single style image can transplant a whole aesthetic onto your prompt.

The strength and fidelity pair is worth understanding as two different axes. Strength is how much the reference matters at all; fidelity is how strictly the result must obey it. High fidelity + high strength = very tight match, often at the cost of the reference image's flaws (pose, lighting) bleeding through. Low fidelity + high strength is the "vibe but not a photocopy" setting. For a first run, defaults of 1/1 are the pack's conservative sweet spot.

The rules the pack enforces

  • V4.5 only. V5 doesn't support precise reference yet, and the pack errors before the paid request rather than silently ignoring the parameter. If you pick a V5 model, this node refuses to apply.
  • No Vibe at the same time. Vibe and precise reference are mutually exclusive in NovelAI's API. Attach a Vibe and this node will error telling you to remove one.
  • You can chain multiple references in series - the summary counts them.

Install and setup

Part of ComfyUI-NovelAI-GENYTOOLS. Manager search, or:

cd ComfyUI/custom_nodes
git clone https://github.com/XTOGENY/ComfyUI-NovelAI-GENYTOOLS.git
pip install -r ComfyUI-NovelAI-GENYTOOLS/requirements.txt

Restart, set your NovelAI Persistent API Token under NovelAI 2.0: Persistent API Token. The node itself is free; the generation downstream is where Anlas go.

Gotchas

  • It fails loudly on the wrong model. If you're on V5 and want reference steering, you're out of luck until NovelAI opens it up - the node can't and won't fake it.
  • strength and fidelity go negative and that's not a typo: negative values actively push away from the reference. Some people use a negative strength style reference to de-stylize. Unusual, but it's a real trick.
  • The reference is sent to NovelAI as part of the request. If the reference image is huge, downscale it first - it's the same API-request cost logic as the rest of the pack.
CategoryNovelAI 2.0/参考与角色

Inputs (6)

NameTypeDefaultDescription
nai_pipeNAI_PIPE
imageIMAGE
reference_typeCOMBO角色3 options: 角色, 风格, 角色与风格
strengthFLOAT1.00-5–5
fidelityFLOAT1.00-5–5
enabledBOOLEANtrue

Outputs (2)

NameTypeDescription
nai_pipeNAI_PIPE
参考摘要STRING