Nodes/LCM_Inpaint_Outpaint_Comfy/LCMLoader_ReferenceOnly
ComfyUI Node

LCMLoader_ReferenceOnly

Style transfer and promptless edits, reference-style

By taabata·Created 3 years ago·Updated 2 years ago· 259
LCMLoader_ReferenceOnly
    • class
    device
    model_path
    tomesd_value0.6
    controlnet_model

    This loader is the pack's style machine. Reference-only conditioning - the same trick A1111's ControlNet extension popularized - means the model borrows the composition and mood of a reference image while your prompt supplies the content. The author built it specifically for the demo images that make this pack worth a look: style transfer, image variations, blending two images, and "promptless" outpainting, all at LCM speed. The Reddit posts from back then are basically a gallery of those four tricks.

    LCMLoader_ReferenceOnly assembles a LatentConsistencyModelPipeline_reference_img2img - a custom diffusers pipeline with the reference-image attention path built in - and also loads a ControlNet from models/controlnet, so you can stack reference conditioning and spatial structure guidance at once. Wire its class output into the pack's LCMGenerate_ReferenceOnly node and you're generating.

    How it works

    Mechanically it's the standard pack loader: pull VAE, text encoder, tokenizer and UNet out of a diffusers-format base model (default models/diffusers/LCM_Dreamshaper_v7), set the LCMScheduler_X, load the ControlNet you pick from models/controlnet as a ControlNetModel, apply ToMe at tomesd_value, and on GPU enable xformers + sequential CPU offload.

    The "reference" part isn't in the loader's fields at all - it's baked into the pipeline class. That's why this loader's output only works with generate nodes that understand a reference pipeline. When you run it, style_fidelity on the generate side decides how closely the output copies the reference's look (0 = loose, 1 = glued to it), and strength decides how much the input image is allowed to change.

    The inputs that matter

    • device - GPU or CPU, same as the rest of the family.
    • model_path - empty defaults to models/diffusers/LCM_Dreamshaper_v7. Must be a diffusers folder, not a safetensors.
    • controlnet_model - dropdown of subfolders in ComfyUI/models/controlnet. Unlike the base loaders this one always loads a ControlNet, so the dropdown has to resolve to something real or the node errors at load time.
    • tomesd_value - ToMe merge ratio, default 0.6, 0 = off.

    Output is a single class wire carrying the pipeline. Feed it into LCMGenerate_ReferenceOnly.

    How to install it

    Part of the taabata/LCM_Inpaint-Outpaint_Comfy pack - install once via ComfyUI Manager (search "LCM_Inpaint_Outpaint_Comfy") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/taabata/LCM_Inpaint-Outpaint_Comfy
    cd LCM_Inpaint-Outpaint_Comfy
    pip install -r requirements.txt
    

    Restart, then place the models: LCM_Dreamshaper_v7 (diffusers format) in ComfyUI/models/diffusers/ and a ControlNet folder in ComfyUI/models/controlnet/.

    Common issues

    Two things bite here specifically. First, this loader unconditionally loads a ControlNet - there's no "none" option baked in, so an empty models/controlnet folder means an error before you even generate. Keep at least one model folder there. Second, the reference pipeline ignores the base model's own scheduler settings, so keep the generate node's steps at LCM territory (4–8) and CFG low (~1.8); the moment you treat it like a normal SD pipeline the reference signal overwhelms everything and you get mush.

    The honest verdict: as a style-transfer one-stop it's clever, and in 2023 it was genuinely ahead of the curve. It's also very much of its era - a dedicated diffusers pipeline where a modern graph would just use an IP-Adapter node. But if you want this pack's workflow files to run, this is the loader they expect.

    CategoryLCM_Nodes/nodes

    Inputs (4)

    NameTypeDefaultDescription
    deviceCOMBO2 options: GPU, CPU
    model_pathSTRING
    tomesd_valueFLOAT0.60–1
    controlnet_modelCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    classclass