ComfyUI Node

LCMLora_ipadapter

Controlnet + reference + IP-Adapter, all on one generate node

By taabata·Created 3 years ago·Updated 2 years ago· 259
LCMLora_ipadapter
  • pipe
  • image
  • control_image
  • reference_image
  • ipadapter_image
  • IMAGE
seed0
prompt
negative_prompt
steps4
width512
height512
cfg8.0
style_fidelity0.50
strength1.00
batch1
ipadapter_scale0.60
controlnet_conditioning_scale0.60
reference_only
ip_adapter
control_net

This is the pack's Swiss Army generate node. LCMLora_ipadapter takes one pipeline from LCMLoraLoader_ipadapter and lets you flip on ControlNet, reference-only conditioning, and IP-Adapter independently - with separate image inputs for each - all in a single node. It's the closest thing in this pack to a "do whatever combination of image conditioning you want" node, and it's the one the author's SettingsSwitch node was built to drive (four of this node's inputs map exactly to the switch's four outputs).

In practice that means one node covers style borrowing, structure guidance, and identity/character steering - plus the classic "stack them all" combo, which is a standard IP-Adapter + ControlNet workflow pattern: IP-Adapter for style, ControlNet for composition.

How it works

You feed it up to four images:

  • image - the base img2img input.
  • control_image - what the ControlNet conditions on (edges, pose, depth map, etc.).
  • reference_image - the reference-only source.
  • ipadapter_image - what IP-Adapter embeds.

Three toggles - control_net, reference_only, ip_adapter - decide which paths run, and three scales tune them: controlnet_conditioning_scale (default 0.6), style_fidelity (default 0.5, how hard the reference's style sticks), and ipadapter_scale (default 0.6). The pipe calls thread these through the custom diffusers pipeline from the loader, which has to have been built with the matching combination enabled (that's the loader's control_net/ip_adapter/reference_only toggles).

The other fields are standard generation: prompt, negative_prompt, steps (4), cfg (8 by default on this node - note it, this is not the low-CFG LCM default of the inpaint nodes), strength, width/height, seed, batch. Output is IMAGE.

The inputs that matter

  • The three toggles + three scales above - that's the whole character of the node.
  • pipe - class output from LCMLoraLoader_ipadapter.
  • cfg - watch this one. It defaults to 8.0 here (unlike the LCMLora_inpaint nodes' 1.8) because this loader's non-LCM mode runs a normal DDIM pipeline; if you enable LCM_enable on the loader, drop CFG way down.
  • batch - number of images to generate (0–1000, default 1).

Output: IMAGE.

How to install it

Standard for the pack - ComfyUI Manager (search "LCM_Inpaint_Outpaint_Comfy") or:

cd ComfyUI/custom_nodes
git clone https://github.com/taabata/LCM_Inpaint-Outpaint_Comfy
cd LCM_Inpaint-Outpaint_Comfy
pip install -r requirements.txt

Restart. Loader-side files: base diffusers model in models/diffusers/, ControlNet folder in models/controlnet/, IP-Adapter model under models/controlnet/IPAdapter/models/, and if the loader's LCM_enable is on, pytorch_lora_weights.safetensors in models/loras/.

Common issues

The loader and this node must agree on the toggles: if you enable ip_adapter here but the loader wasn't given an IP-Adapter model, or you toggle control_net on here while the loader built a non-ControlNet pipeline, you get runtime errors that look like the pipeline "doesn't accept this argument." Match them before you tune anything.

And the CFG trap above is real: this node defaults to 8.0, which is right for a plain DDIM img2img pass but wrong for LCM mode. Decide which mode you're in first - the loader's LCM_enable - then set CFG accordingly (1.8-ish for LCM, 7–8 for DDIM). It's the single easiest way to get garbage out of an otherwise correct graph.

CategoryLCM_Nodes/nodes

Inputs (20)

NameTypeDefaultDescription
pipeclass
seedINT00–18446744073709550000
promptSTRING
negative_promptSTRING
stepsINT40–360
widthINT5120–5000
heightINT5120–5000
cfgFLOAT8.00–30
imageIMAGE
control_imageIMAGE
reference_imageIMAGE
ipadapter_imageIMAGE
style_fidelityFLOAT0.500–1
strengthFLOAT1.000–1
batchINT10–1000
ipadapter_scaleFLOAT0.600–10
controlnet_conditioning_scaleFLOAT0.600–10
reference_onlyCOMBO2 options: disable, enable
ip_adapterCOMBO2 options: disable, enable
control_netCOMBO2 options: disable, enable

Outputs (1)

NameTypeDescription
IMAGEIMAGE