Nodes/Latent Consistency Model for ComfyUI/LCM img2img Sampler (Advanced)
ComfyUI Node

LCM img2img Sampler (Advanced)

Img2img with CONDITIONING in, LATENT out

By 0xbitches·Created 3 years ago·Updated 3 years ago· 263
LCM img2img Sampler (Advanced)
  • images
  • conditioning
  • LATENT
seed0
prompt_strength0.50
steps4
cfg8.0
height512
width512
num_images1
use_fp16true

This is the img2img sampler with the same swap the plain LCM Sampler gets in its Advanced form: positive_prompt becomes a conditioning input, and the finished IMAGE becomes a raw LATENT. Same job as the regular img2img node - push a source image toward your prompt in 4-8 fast steps through the diffusers LCM_Dreamshaper_v7 pipeline - just wired for people who want to build it into a bigger graph instead of using it standalone.

Quick context if you landed here first: LCM is a distilled Stable Diffusion checkpoint, trained to reach a finished denoise in a handful of steps instead of the usual 20-50. This whole pack predates ComfyUI's own native LCM scheduler, and the README says as much - there's an archival notice pointing you to the official implementation now baked into core ComfyUI. This node is still the fastest path to this exact setup (one checkpoint, no LoRA, no scheduler tuning), just don't expect it to be current-gen.

Why the Advanced version

Two changes from the plain LCM_img2img_Sampler, both aimed at the same thing: composability. conditioning replaces the raw prompt string, so you build your prompt the normal ComfyUI way - CLIPTextEncode, ConditioningCombine, whatever else you'd normally stack - instead of being stuck with one text box. You'll need an SD1.5-family CLIP model loaded somewhere upstream to produce that conditioning, since LCM_Dreamshaper_v7 is SD1.5-based. And LATENT replaces the decoded image output, so you can chain more latent-space work - another sampler, a latent upscale - before you spend a VAEDecode on it. Skip both if you just want a quick result; use both the moment you're building this into a real workflow rather than testing it in isolation.

The inputs that matter

images is your source image, and prompt_strength (0-1, default 0.5) is the one dial that actually reshapes the output - it works like a denoise-strength slider: low keeps you close to the source, high lets the conditioning take over. Everything else mirrors the rest of the pack: seed, steps (default 4, built for 4-8 - more steps won't add detail here, just artifacts), cfg (default 8 in the widget, but LCM's guidance is baked in from distillation, so push it down to 1-2 or expect oversaturated, harsh results), width/height (512-768, SD1.5-class), num_images for batching, and use_fp16 for the low-VRAM behavior this pack is known for.

Installing it

git clone https://github.com/0xbitches/ComfyUI-LCM into custom_nodes/ and restart, or search "Latent Consistency Model for ComfyUI" in ComfyUI Manager. No model file to place by hand - LCM_Dreamshaper_v7 downloads automatically into your HuggingFace cache the first time you run any node from this pack, so budget a few minutes and a few gigabytes for that first run.

Where people get stuck

The README's own known issue is a tokenizer mismatch - Non-consecutive added token '<|startoftext|>' - fixed by hand-editing added_tokens.json in the cached model folder (the exact JSON is in the README). If you feed this node a conditioning from a non-SD1.5 CLIP, expect a shape error rather than anything useful - the internal pipeline is hard-wired to Dreamshaper v7's architecture. A handful of people also hit cache permission errors on first download (mostly reported on Windows in the original launch thread); deleting the models--SimianLuo--LCM_Dreamshaper_v7 folder from your HuggingFace cache and letting it redownload is the usual fix. And since this pack depends on diffusers rather than ComfyUI's own model loading, a shared Python environment with other diffusers-based nodes is worth watching if you start seeing import errors that weren't there before.

Categorysampling

Inputs (10)

NameTypeDefaultDescription
imagesIMAGE
seedINT00–18446744073709550000
prompt_strengthFLOAT0.500–1
stepsINT41–10000
cfgFLOAT8.00–100
heightINT512512–768
widthINT512512–768
num_imagesINT11–64
use_fp16BOOLEANtrue
conditioningCONDITIONING

Outputs (1)

NameTypeDescription
LATENTLATENT