LCMLora_inpaintV2
The same workhorse, but its size inputs take wires
- mask
- image
- reference_image
- pipe
- IMAGE
LCMLora_inpaintV2 is LCMLora_inpaint with one meaningful change: width and height are NUMBER inputs instead of fixed INTs. The source code literally reuses the same generation function and just casts int(width) / int(height) before running. That's the whole diff - and for the workflows this pack ships, the diff matters more than it sounds.
The V1 node locks dimensions to the sliders on the node. V2 lets you wire dimensions in from somewhere else - a canvas node, an ImageDims node that reads the size of your loaded image, a mask, a manual float you want to round down. In a canvas-driven inpainting/outpainting workflow, where the canvas can change size between runs, a fixed slider is a footgun you have to remember to update. V2 removes that class of error entirely: the generation size always follows whatever you feed it.
How it works
Everything from the V1 node carries over: it takes the pipe from LCMLoraLoader_inpaint, converts the image/mask/reference tensors to PIL, and runs the diffusers pipeline with the reference-only, IP-Adapter and prompt-weighting toggles. width/height arrive as numbers, get cast to int, and become the generation resolution. It still rolls a fresh seed per batch image and outputs a list of IMAGE tensors.
The inputs that matter
Identical to LCMLora_inpaint except for the two changed types:
width/height-NUMBERnow. Feed them from another node, or type a value like any other field; either way they're cast to int before use.pipe- theclassoutput ofLCMLoraLoader_inpaint.mask/image- the inpaint pair (white mask = regenerate).reference_image+reference_style_fidelity- for reference-only and IP-Adapter.text,steps,cfg- prompt, 4 steps, CFG ~1.8 by default.strength,controlnet_weight,ipadapter_scale- the dials for how much each conditioning path pushes the result.
Output: IMAGE, ready for any save node.
How to install it
Same pack as everything here, one install:
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 ComfyUI Manager → search "LCM_Inpaint_Outpaint_Comfy" → restart. The loader needs the same model stack as V1: base model as a diffusers folder in models/diffusers/, LCM-LoRA pytorch_lora_weights.safetensors in models/loras/, ControlNet folder in models/controlnet/, optional IP-Adapter model in models/controlnet/IPAdapter/models/, optional TAESD in models/vae/taesd.
Common issues
The V1 gotchas are V2's gotchas: the loader will fail if pytorch_lora_weights.safetensors is missing, and enabling IP-Adapter without the model file in place errors at load. Prompt weighting still needs the CPU device setting on the loader.
One V2-specific footgun in the other direction: because width/height are now free numbers, a stray non-integer value from an upstream node (say, 512.6) gets silently truncated to 512 rather than failing loudly. That's usually fine - it's the least surprising way to handle it - but if your output is a different size than you expect, check what the upstream node is actually emitting. This is the node to reach for when your size has to follow the data; use V1 when a fixed slider is what you want.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
| text | STRING | — | |
| steps | INT | 40–360 | — |
| width | NUMBER | — | |
| height | NUMBER | — | |
| 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 | — |