Nodes/LCM_Inpaint_Outpaint_Comfy/LCMGenerate_ReferenceOnly
ComfyUI Node

LCMGenerate_ReferenceOnly

Steer LCM with a reference, prompt optional

By taabata·Created 3 years ago·Updated 2 years ago· 259
LCMGenerate_ReferenceOnly
  • image
  • reference_image
  • pipe
  • control_image
  • IMAGE
seed0
text
steps4
width512
height512
cfg8.0
batch1
style_fidelity0.50
strength1.00
prompt_weighting
control_weight1.0

LCMGenerate_ReferenceOnly is the node that made this pack famous in its little corner of late 2023. Its whole gimmick - and it's a good one - is that you can generate an image that matches a reference's style and composition with no prompt at all. The author's Reddit posts showed promptless outpainting, style transfer, and image blending with this node, and it's genuinely one of the more clever things in the pack.

What it does

Reference-only conditioning feeds a reference image into the pipeline as a strong structural and stylistic guide. This node runs that idea as its sole job, with a matching LCMLoader_ReferenceOnly pipe (that loader's pipeline is built to accept ref_image/style_fidelity arguments). The inputs:

  • reference_image - the image whose look you're borrowing. With an empty prompt, this alone drives the output.
  • style_fidelity (default 0.5) - how closely the output matches the reference. The source passes it straight through to the pipeline; 0.5 is a sensible middle, 0.9+ is "clone this," low values let the prompt wander.
  • strength (default 1.0) - how much the input image survives. Low strength + reference steering = style transfer; high strength + low style_fidelity = image variations.
  • image - the starting image for img2img-style blending.
  • pipe - from LCMLoader_ReferenceOnly.
  • prompt_weighting (disable/enable) - the compel-based +/- weighting, which per the README needs CPU inference.
  • control_image and control_weight (default 1.0) - optional ControlNet conditioning layered on top.
  • Plus the standard seed, text, steps (4), width/height, cfg, batch.

How to use it

For the pack's signature trick - promptless outpainting - wire a reference crop in, leave the text blank, set style_fidelity around 0.5–0.7, and let it extend the image in the reference's own style. For style transfer, put your target style in reference_image, your source in image, and tune style_fidelity up. This is the node that makes "blend two images" and "match this art style" actually fast, because 4-step LCM iteration means you can try a dozen style-fidelity values in a minute.

Setup and gotchas

Standard pack install (ComfyUI Manager → search LCM_Inpaint-Outpaint_Comfy, or clone + pip install -r requirements.txt), LCM_Dreamshaper_v7 in models/diffusers/, and the pipe from LCMLoader_ReferenceOnly. Remember the CFG rule - for reference-driven work the pack's 8.0 default is usually too hot; 1–2 keeps the reference from getting blasted into contrast-y mush.

One thing to know: "reference only" in this era meant exactly that - the reference does most of the work and the prompt is more of a nudge. If you expect crisp prompt adherence on top of the reference, you'll be disappointed. It's a style-and-composition tool, not a fine control tool. And as with all the pack's nodes, it's 2023 code with Windows path quirks. Today, native ComfyUI has more polished reference techniques - but this node's promptless trick is still a fun, fast party piece.

CategoryLCM_Nodes/nodes

Inputs (15)

NameTypeDefaultDescription
seedINT00–18446744073709550000
textSTRING
stepsINT40–360
widthINT5120–5000
heightINT5120–5000
cfgFLOAT8.00–30
imageIMAGE
reference_imageIMAGE
pipeclass
batchINT11–100
style_fidelityFLOAT0.500–1
strengthFLOAT1.000–1
prompt_weightingCOMBO2 options: disable, enable
control_imageIMAGE
control_weightFLOAT1.00–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE