Nodes/LCM_Inpaint_Outpaint_Comfy/LCMGenerate_img2img_controlnet
ComfyUI Node

LCMGenerate_img2img_controlnet

Img2img steered by a ControlNet

By taabata·Created 3 years ago·Updated 2 years ago· 259
LCMGenerate_img2img_controlnet
  • image
  • pipe
  • control_image
  • IMAGE
mode
seed0
text
steps4
width512
height512
cfg8.0
outpaint_size256
outpaint_direction
batch1
strength1.0
prompt_weighting
loopback
loopback_iterations4
control_weight1.0

LCMGenerate_img2img_controlnet is the img2img generation node with ControlNet conditioning bolted on. It's the counterpart to LCMGenerate_img2img (same strength, loopback, and structure) plus two extra inputs: control_image and control_weight. The node runs the ControlNet-equipped LCM pipe that LCMLoader_controlnet built, so you can rework an image while keeping its edges, depth, or pose locked to a reference.

What changed from the plain img2img node

The ControlNet flavor swaps the T2I-Adapter inputs for:

  • control_image - the conditioning image (canny edges, depth map, pose skeleton, whatever your ControlNet expects).
  • control_weight (default 1.0) - how strongly the condition steers. Start at 0.6–0.8, not 1.0.

And the pipe input is the important one: it must come from LCMLoader_controlnet, because that's the loader that actually loads the ControlNet into the pipeline. Wiring a plain LCMLoader pipe into this node gives you nothing - the control_image/control_weight inputs would be ignored and the whole point of the node evaporates.

Everything else matches the img2img node: mode (Inpaint/Outpaint), seed, text, steps (default 4), width/height, cfg, image, outpaint_size/direction, batch, strength, loopback, loopback_iterations, prompt_weighting.

Setup

Two-part model setup on top of the standard install (ComfyUI Manager, search LCM_Inpaint-Outpaint_Comfy, or the clone + pip install -r requirements.txt):

  1. LCM_Dreamshaper_v7 diffusers → ComfyUI/models/diffusers/.
  2. Your ControlNet → a subfolder in ComfyUI/models/controlnet/ so it appears in LCMLoader_controlnet's mode dropdown.

The honest balance problem

Here's the real tension with ControlNet on an LCM model: LCM is distilled to make a handful of big denoising jumps, so there's very little denoising "time" for a condition to assert itself. ControlNet on 4 steps can feel like it's barely doing anything at low weight, then suddenly collapse into oversaturated artifacts the moment you push it. The trick is patience: keep CFG low (1–2 per the distillation playbook, not the pack's 8.0 default), run 4–8 steps, and tune control_weight against strength together - the two fight each other for control of the output.

It's late-2023 code from the pack's author (taabata / Sensitive-Paper6812), one of the first people to demo ControlNet + LCM + ComfyUI together. It works, it's fast, and it's a legitimately cool way to play with structural control at 4 steps. But if you want something maintained and easier to debug, native ComfyUI ControlNet with an LCM checkpoint is the modern route. This node is the historical, single-node version of that idea.

CategoryLCM_Nodes/nodes

Inputs (18)

NameTypeDefaultDescription
modeCOMBO2 options: Inpaint, Outpaint
seedINT00–18446744073709550000
textSTRING
stepsINT40–360
widthINT5120–5000
heightINT5120–5000
cfgFLOAT8.00–30
imageIMAGE
outpaint_sizeINT2560–5000
outpaint_directionCOMBO4 options: left, right, top, bottom
pipeclass
batchINT11–100
strengthFLOAT1.00–1
prompt_weightingCOMBO2 options: disable, enable
loopbackCOMBO2 options: disable, enable
loopback_iterationsINT41–5000
control_imageIMAGE
control_weightFLOAT1.00–1

Outputs (1)

NameTypeDescription
IMAGEIMAGE