LCMLora_inpaint
The generate node that does everything in the Lora line
- mask
- image
- reference_image
- pipe
- IMAGE
This is the workhorse. Where the older LCMLoader/LCMGenerate pair use a dedicated LCM checkpoint (Dreamshaper v7 in diffusers format), the LCMLora line uses an LCM-LoRA on top of a normal model - the approach that ended up winning. One small adapter file turns any SD 1.5 checkpoint into a 4-step model, and LCMLora_inpaint is where the magic actually runs: it's a full generate node with inpainting, reference-only conditioning, IP-Adapter, and optional Compel prompt weighting all selectable on the same node.
It expects a pipe from LCMLoraLoader_inpaint (the loader that builds the LCM-LoRA pipeline and loads the ControlNet + IP-Adapter). The output is an IMAGE - a batch of generated images you can feed straight to a save node.
How it works
It converts your ComfyUI tensors to PIL, then calls the diffusers pipeline with whatever you've toggled on. The three toggles are independent:
reference_only- enable passes aref_image+reference_style_fidelityto the pipeline for example-driven style.ip_adapter- enable routes the same reference image through the IP-Adapter path withipadapter_scale, which the loader has to have prepared (it callsload_ip_adapterat load time, so the model file must exist inmodels/controlnet/IPAdapter/models).prompt_weighting- enable swaps the prompt for Compel-processed embeddings, giving you(word:1.2)-style weighting. Remember the README's warning: this one requires CPU inference, so the loader'sdeviceshould be set to CPU.
It runs the batch as a loop, rolling a fresh random seed per image, and strength controls how much of the input image survives. Keep the LCM defaults - steps 4, cfg 1.8 - and you're in the right territory.
The inputs that matter
Honestly, most of them. The few you'll touch constantly:
pipe- theclassoutput fromLCMLoraLoader_inpaint.maskandimage- the inpaint pair. Image is your base, mask is where it regenerates (white = repaint).reference_image- feeds reference-only and/or IP-Adapter.text,steps,cfg- prompt, 4 steps, CFG ~1.8.controlnet_weight- how hard the ControlNet loaded by the loader pushes the result (0–1).
Output: IMAGE - wire it into SaveImage_LCM or any ComfyUI image output.
How to install it
Part of taabata/LCM_Inpaint-Outpaint_Comfy - one install gets every node:
cd ComfyUI/custom_nodes
git clone https://github.com/taabata/LCM_Inpaint-Outpaint_Comfy
cd LCM_Inpaint-Outpaint_Comfy
pip install -r requirements.txt
Or via ComfyUI Manager (search "LCM_Inpaint_Outpaint_Comfy"), then restart. The loader side needs: your base SD 1.5 model as a diffusers folder in models/diffusers/, the LCM-LoRA pytorch_lora_weights.safetensors in models/loras/, a ControlNet folder in models/controlnet/, and if you want IP-Adapter, its model file under models/controlnet/IPAdapter/models/. Optional TAESD in models/vae/taesd speeds up previews.
Common issues
The most common failure is actually in the loader, not this node: pytorch_lora_weights.safetensors missing from models/loras/ makes the whole load error. The IP-Adapter toggle is the other gotcha - if the model file isn't in exactly models/controlnet/IPAdapter/models/, the dropdown is empty and enable will fail.
And the prompt-weighting/GPU trap is real: leave prompt_weighting on with a GPU loader and it errors. Either run CPU or leave it disabled.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
| text | STRING | — | |
| steps | INT | 40–360 | — |
| width | INT | 5120–5000 | — |
| height | INT | 5120–5000 | — |
| cfg | FLOAT | 1.80–3 | — |
| mask | IMAGE | — | |
| image | IMAGE | — | |
| reference_image | IMAGE | — | |
| reference_style_fidelity | FLOAT | 0.50–1 | — |
| pipe | class | — | |
| batch | INT | 11–100 | — |
| strength | FLOAT | 1.00–1 | — |
| prompt_weighting | COMBO | 2 options: disable, enable | |
| controlnet_weight | FLOAT | 1.00–1 | — |
| reference_only | COMBO | 2 options: disable, enable | |
| ip_adapter | COMBO | 2 options: disable, enable | |
| ipadapter_scale | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |