LCMGenerate_img2img_IPAdapter
Image-prompted variations at 4 steps
- image
- ip_model
- pil_image
- IMAGE
LCMGenerate_img2img_IPAdapter is the generation node for the pack's image-prompting workflows: you give it a source image to rework, a reference image to borrow style or subject from, and it runs the 4-step LCM pipeline with an IP-Adapter pulling toward the reference. This is the node behind the pack's Image Variations trick, and it's the fastest way to "make this look more like that" in this whole pack.
The inputs that matter
This node is a slightly stripped-down img2img with an IP-Adapter instead of a mode/pipe pair:
- image - the image you're starting from (the thing being varied).
- pil_image - the reference image whose style/subject you want. Don't get thrown by the name; it's just an IMAGE input.
- ip_model - the adapter, loaded by
LCM_IPAdapter. This is a required class input; without it the node can't apply image prompting at all. - scale (default 1.0) - how hard the IP-Adapter pulls toward the reference. Lower it for subtlety. This is the main quality knob, and it interacts with
strength. - strength (default 1.0) - how much of the original
imagesurvives. 1.0 redraws hard; 0.4–0.6 keeps the original composition. - loopback / loopback_iterations (default 4) - feed output back in repeatedly. Pairs well with IP-Adapter for gradually pushing an image toward a reference style.
Plus the standard set: seed, text, steps (4), width/height, cfg, batch, prompt_weighting.
How it works
The IP-Adapter injects an embedding of pil_image through its own cross-attention path while the LCM pipe does its fast denoising, and strength controls how much of image survives as the starting latent. In practice the combination is genuinely fun: at 4 steps you can iterate toward a reference style almost interactively. The usual LCM rules still apply - keep steps at 4–8 and don't run the 8.0 CFG default unless you want the oversaturated look.
Setup
Needs the full chain: pack installed (ComfyUI Manager → search LCM_Inpaint-Outpaint_Comfy, or clone + pip install -r requirements.txt), LCM_Dreamshaper_v7 in ComfyUI/models/diffusers/, your IP-Adapter .safetensors in ComfyUI/models/controlnet/, and a CLIP vision encoder in ComfyUI/models/clip_vision/. The ip_model comes from LCM_IPAdapter, which is where those model paths get resolved.
Gotchas
The scale vs strength fight is the thing to learn: crank both high and you get something that barely resembles the original or the reference. A sane starting point is strength ~0.6 and scale ~0.6–0.8, then tune one at a time. Also remember this is 2023-era code - the adapter is loaded in a heavier, less optimized way than today's native IPAdapter nodes, so watch VRAM on smaller cards. It's an early but working take on a now-standard technique.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00–18446744073709550000 | — |
| text | STRING | — | |
| steps | INT | 40–360 | — |
| width | INT | 5120–5000 | — |
| height | INT | 5120–5000 | — |
| cfg | FLOAT | 8.00–30 | — |
| 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 | — |
| image | IMAGE | — | |
| ip_model | class | — | |
| pil_image | IMAGE | — | |
| scale | FLOAT | 1.00–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |