Nodes/LCM_Inpaint_Outpaint_Comfy/LCMGenerate_inpaintv3
ComfyUI Node

LCMGenerate_inpaintv3

Reference + ControlNet + IP-Adapter in one inpaint node

By taabata·Created 3 years ago·Updated 2 years ago· 259
LCMGenerate_inpaintv3
  • image
  • mask
  • original_image
  • pipe
  • reference_image
  • control_image
  • ip_model
  • pil_image
  • IMAGE
mode
seed0
text
steps4
width512
height512
cfg8.0
outpaint_size256
outpaint_direction
batch1
prompt_weighting
style_fidelity0.5
Reference_Only
oupaint_quality
control_weight1.0
scale1.0

LCMGenerate_inpaintv3 is the other mega-node in the pack's inpaint family, and the direct sibling of inpaintv2. Same idea - reference-only steering plus structural conditioning plus 4-step LCM inpainting in one node - but it trades the T2I-Adapter for an IP-Adapter. If your workflow wants image-prompting (style from a reference picture) combined with ControlNet structure during inpaint, this is the one.

What's in it

The full base set from LCMGenerate: mode (Inpaint/Outpaint), seed, text, steps, width/height, cfg, image, mask, original_image, outpaint_size/direction, pipe, batch, prompt_weighting, reference_image, style_fidelity, Reference_Only, oupaint_quality.

Then the v3 additions, which is where it differs from v2:

  • control_image and control_weight (default 1.0) - ControlNet conditioning. The pipe must come from LCMLoader_controlnet (or LCM_IPAdapter_inpaint's mode-loaded ControlNet) for this to actually do anything.
  • ip_model - the IP-Adapter, loaded by LCM_IPAdapter or LCM_IPAdapter_inpaint.
  • pil_image - the reference image for the IP-Adapter (yes, that's just the image input name).
  • scale (default 1.0) - how hard the IP-Adapter pulls.

So compared to v2's adapter_image/adapter_weight/adapter trio, v3 carries ip_model/pil_image/scale. v2 = T2I-Adapter track; v3 = IP-Adapter track. The ControlNet input is shared by both.

How to wire it

LCM_IPAdapter_inpaint is the natural loader pairing here, because it loads the ControlNet and the IP-Adapter into the same pipeline - one loader, one generation node, and you've got the pack's full "reference + structure + image-prompt + inpaint at 4 steps" showpiece. Or combine LCMLoader_controlnet with LCM_IPAdapter if you prefer the pieces separate.

Setup and honesty

Standard pack install (ComfyUI Manager → search LCM_Inpaint-Outpaint_Comfy, or clone + pip install -r requirements.txt), then LCM_Dreamshaper_v7 in models/diffusers/, ControlNet folder under models/controlnet/, IP-Adapter file under models/controlnet/, CLIP vision encoder in models/clip_vision/.

The honest truth about v3 (and v2, and the pack's other combined nodes): stacking reference-only + ControlNet + IP-Adapter onto a 4-step distilled model is the hardest thing this pack asks of the model. Three steering signals, almost no denoising time to reconcile them. Dial scale and control_weight down - start both around 0.5–0.6 - and keep CFG at 1–2, or you'll get oversaturated incoherence. It works, and when you land it the speed is wild, but it's fiddly. This is very much late-2023 "look what I can do with LCM" code, and it's best treated as a fun experiment rather than a daily driver - today's separated native nodes are easier to reason about.

CategoryLCM_Nodes/nodes

Inputs (24)

NameTypeDefaultDescription
modeCOMBO2 options: Inpaint, Outpaint
seedINT00–18446744073709550000
textSTRING
stepsINT40–360
widthINT5120–5000
heightINT5120–5000
cfgFLOAT8.00–30
imageIMAGE
maskIMAGE
original_imageIMAGE
outpaint_sizeINT2560–5000
outpaint_directionCOMBO4 options: left, right, top, bottom
pipeclass
batchINT11–100
prompt_weightingCOMBO2 options: disable, enable
reference_imageIMAGE
style_fidelityFLOAT0.50–1
Reference_OnlyCOMBO2 options: disable, enable
oupaint_qualityCOMBO2 options: higher, lower
control_imageIMAGE
control_weightFLOAT1.00–1
ip_modelclass
pil_imageIMAGE
scaleFLOAT1.00–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE