ComfyUI Node

Reference Image

Stack style-reference images with per-image weight and timing

By Acly·Created 3 years ago·Updated about a month ago· 667
Reference Image
  • image
  • reference_images
  • reference_images
weight1.00
range_start0.00
range_end1.00

Use this when you want to steer a generation toward one or more reference images - "make it look like this" - and you want real control over how hard each reference pushes and when. ETN_ReferenceImage doesn't apply anything on its own; it's a builder. It wraps one image with a weight and a timing window, and it chains, so you can stack several references into a single bundle that Apply Reference Images then feeds into your conditioning.

This is the style-reference path in Acly's tooling-nodes pack - the CLIP-Vision + style-model approach (the Flux Redux family and compatible style models), the same machinery behind the "reference image" feature in his Krita AI Diffusion plugin. The plugin is one of the most-used front ends for running ComfyUI without touching the graph, and these nodes are what make its reference-image slider work under the hood.

How it works

Each ETN_ReferenceImage node holds one image plus how it should influence the result. Because it has an optional input and an output of the same ReferenceImage type, you daisy-chain them: reference A → reference B → reference C, and the whole chain flows out as one bundle. That's how you blend multiple references - two style images at half weight each, say, or a strong content reference plus a light color reference.

The two knobs that actually matter are strength and timing. Weight scales how much this reference pulls. The range controls when during sampling it applies - and that timing is the underrated lever, the same idea as ControlNet's start/end steps: let a reference shape the early composition and then back off, or hold it late for surface detail. Getting the reference to act only on the phase you care about is often what separates "nice nudge" from "it copied the whole picture."

The inputs and outputs that matter

  • image (IMAGE) - the reference to steer toward.
  • weight (FLOAT, default 1, range 0–10) - strength. 1 is a normal push; drop below 1 to make it a hint, raise it to force the reference harder. It goes surprisingly high, but big values overwhelm your prompt fast.
  • range_start / range_end (FLOAT, both 0–1, default 01) - the fraction of the sampling process where this reference is active. Default is the whole run. Narrow it (e.g. 0 → 0.5) to influence only composition, or (0.5 → 1) to touch only the later detail phase.
  • reference_images (optional, ReferenceImage) - the chain input. Plug the previous ETN_ReferenceImage here to stack. Leave it empty for the first one.

Output:

  • reference_images (ReferenceImage) - the accumulated bundle. Feed it into the next ETN_ReferenceImage to add more, or into Apply Reference Images to actually use it.

How to install it

One install for the whole pack. ComfyUI Manager: search ComfyUI Nodes for External Tooling, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/Acly/comfyui-tooling-nodes.git

then restart. This node itself downloads nothing - but note that applying the references needs a CLIP Vision model and a style model loaded elsewhere in the graph (see Apply Reference Images).

Common issues & troubleshooting

Nothing changes in the output. This node only builds a bundle. It has to reach Apply Reference Images, which patches your conditioning with a CLIP Vision + style model. If the chain dead-ends, it does nothing.

The reference takes over the whole image. Turn weight down and/or narrow the range so it only acts early. A full-strength reference across the entire sample often just reproduces the reference. Composition-phase-only (range_end around 0.4–0.6) is a good first dial-back.

Stacking references washes everything out. Multiple full-weight references fight each other. Split the budget - drop each toward 0.4–0.6 - and consider giving them different ranges so they layer instead of collide.

Categoryexternal_tooling

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
weightFLOAT1.000–10
range_startFLOAT0.000–1
range_endFLOAT1.000–1
reference_imagesoptReferenceImage

Outputs (1)

NameTypeDescription
reference_imagesReferenceImage