LCMGenerate_img2img
Fast img2img with loopback and a T2I adapter
- image
- pipe
- adapter_image
- adapter
- IMAGE
LCMGenerate_img2img is the img2img edition of the pack's main sampler. Same structure as LCMGenerate - pick Inpaint or Outpaint, feed it an image, and it runs the 4-step LCM pipeline - but tuned for reworking existing images rather than filling masks: it adds a strength slider, a loopback mode, and optional T2I-Adapter conditioning. If you want the "image variations" or "blend" behavior from the pack's screenshots, this is the node.
The inputs that do the work
Everything from LCMGenerate is here (mode, seed, text, steps, width/height, cfg, image, outpaint_size/direction, pipe, batch, prompt_weighting), plus the img2img-specific set:
- strength (default 1.0) - how much of the original image gets changed. 1.0 is nearly a full redraw; lower it toward 0.4–0.6 for subtle variations that keep the original composition. This is the first knob you'll touch.
- loopback (
disable/enable) and loopback_iterations (default 4) - when enabled, the node feeds its own output back in as the next input, running repeatedly. Each pass nudges the image further from the original. It's a cheap way to get more dramatic transformation, and it's exactly what the pack'simg2img_loopback_workflow.jsonis built around. - adapter_image and adapter_weight (default 1.0) - optional T2I-Adapter conditioning.
adapter_weightscales how hard the adapter's structural condition pulls. These need an adapter loaded viaLCMT2IAdapterfeeding the adapter input.
How it works
The pipeline is the same diffusers-based LCM pipe from LCMLoader, run at lcm_origin_steps=50 with your chosen step count and CFG. The img2img twist is that the input image is the starting latent, so strength controls how much of it survives denoising. Remember the distillation rules here: keep steps in the 4–8 range and drop CFG toward 1–2 instead of leaving the 8.0 default - that's the difference between "clean fast variation" and "oversaturated mess."
Setup
Same pack story as everywhere:
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. The pipe comes from LCMLoader (or LCMLoader_img2img, which is the dedicated img2img loader in this pack), and LCM_Dreamshaper_v7 has to be in ComfyUI/models/diffusers/ or you'll hit the "couldn't connect to huggingface.co" error before anything renders.
Gotchas
Loopback is the feature that bites: each iteration re-randomizes the seed in the source, so a long loopback chain drifts unpredictably - set loopback_iterations low (2–4) and use strength to control how far you go instead. And the usual 2023-era caveats: Windows path quirks, CPU-only prompt weighting, and the fact that this whole pack predates today's native ComfyUI img2img tooling. It's a fun, fast way to iterate - just don't expect polished behavior around the edges.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 2 options: Inpaint, Outpaint | |
| seed | INT | 00–18446744073709550000 | — |
| text | STRING | — | |
| steps | INT | 40–360 | — |
| width | INT | 5120–5000 | — |
| height | INT | 5120–5000 | — |
| cfg | FLOAT | 8.00–30 | — |
| image | IMAGE | — | |
| outpaint_size | INT | 2560–5000 | — |
| outpaint_direction | COMBO | 4 options: left, right, top, bottom | |
| pipe | class | — | |
| batch | INT | 11–100 | — |
| strength | FLOAT | 1.00–1 | — |
| prompt_weighting | COMBO | 2 options: disable, enable | |
| loopback | COMBO | 2 options: disable, enable | |
| loopback_iterations | INT | 41–5000 | — |
| adapter_image | IMAGE | — | |
| adapter_weight | FLOAT | 1.00–1 | — |
| adapter | class | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |