Nodes/ComfyUI-Replicate/Replicate luosiallen/latent-consistency-model
ComfyUI Node

Replicate luosiallen/latent-consistency-model

The original LCM, run via API

By replicate·Created 2 years ago·Updated 2 years ago· 207
Replicate luosiallen/latent-consistency-model
    • IMAGE
    promptSelf-portrait oil painting, a beautiful cyborg with golden hair, 8k
    width768
    height768
    num_images1
    num_inference_steps8
    guidance_scale8.00
    seed
    force_rerunfalse

    This is the original LCM - Latent Consistency Models, straight from luosiallen (Simian Luo, the first author on the LCM paper). LCM was the release, back in October 2023, that made fast few-step image generation cheap enough for everyone. It generates a solid image in around 4–8 steps instead of the usual 20–50, which is why it kicked off the whole wave of "seconds not minutes" generation. This node runs that reference model through Replicate: REPLICATE_API_TOKEN, pay-per-run, nothing on your disk.

    The honest context: in 2026 you'd rarely pick LCM for a final image - distilled models trade quality for speed, and newer distills (Turbo, Lightning, DMD2, and the modern Turbo bases) generally look better. But as a fast idea-machine, or just to run the model that started it all, it's a clean, no-setup way in.

    How it works

    Distillation is the trick. A "student" model is trained to land where a full model would after many denoising steps, but in a handful of big jumps. The teacher's guidance gets baked into the student, which is why LCM wants low guidance and few steps - feed it normal settings and you get oversaturated mush. This node is the consistency-model approach that made that affordable (it trained on about 32 A100 GPU-hours), relayed to you as a hosted endpoint.

    The inputs and outputs that matter

    • prompt - plain description.
    • num_inference_steps (default 8, range 1–50) - the LCM headline. Keep it low. 4–8 is the sweet spot; cranking it to 50 doesn't buy quality, it buys artifacts. This is the single most-misused setting on any distilled model.
    • guidance_scale (8) - note LCM tolerates and even likes a higher-looking number than most distills, but stay in its designed range rather than pushing SD-style CFG.
    • num_images (1–4) - batch a few at once, which suits fast exploration.
    • width / height (768) and seed round it out; force_rerun forces a fresh run.

    Output is a single IMAGE.

    How to install it

    One install covers every Replicate node.

    • ComfyUI Manager: search ComfyUI-Replicate, install, restart.
    • Manual:
      cd ComfyUI/custom_nodes
      git clone https://github.com/replicate/comfyui-replicate
      cd comfyui-replicate
      pip install -r requirements.txt
      
      then restart.

    Nothing lands on your GPU - the model runs on Replicate's servers, so the only install is the replicate Python client. Set your token before launching ComfyUI: export REPLICATE_API_TOKEN="r8_..." (replicate.com/account/api-tokens). No token, no runs.

    Common issues & troubleshooting

    Auth error first run. REPLICATE_API_TOKEN must be set before ComfyUI launches. Set it, restart.

    Output looks fried / oversaturated / weirdly high-contrast. Classic distilled-model mistake: too many steps and/or too much guidance. Pull num_inference_steps back toward 4–8 and don't push the guidance. LCM is not a normal checkpoint; it doesn't want normal settings.

    Quality is lower than I expected. That's inherent to distillation - fewer steps means less time to refine. Use LCM to farm a good seed fast, then re-render the winner on a fuller model if you need the final to be crisp.

    Same image on re-run. Replicate cached identical inputs. Change the seed or set force_rerun.

    Why pay to run something I can run locally? Fair point - LCM has open weights and LCM-LoRAs run on any SD checkpoint. This node is for when you'd rather not set any of that up. If you already have a local pipeline, use it.

    CategoryReplicate

    Inputs (8)

    NameTypeDefaultDescription
    promptoptSTRINGSelf-portrait oil painting, a beautiful cyborg with golden hair, 8k
    widthoptINT768
    heightoptINT768
    num_imagesoptINT11–4
    num_inference_stepsoptINT81–50
    guidance_scaleoptFLOAT8.001–20
    seedoptINT
    force_rerunoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE