LCMGenerate
This pack's main inpaint/outpaint workhorse
- image
- mask
- original_image
- pipe
- reference_image
- IMAGE
This is the node the whole pack is named after. LCMGenerate is the big single-node inpaint/outpaint sampler: give it an image, a mask, and a prompt, and it runs the LCM_Dreamshaper_v7 pipeline that LCMLoader built, then composites the result back over your original. It's the thing to reach for when you want the classic inpainting workflow from the pack's screenshots without assembling it out of native ComfyUI parts.
How it works
Feed it an image, a mask (which regions to regenerate), and an original_image (what to keep). The code converts all three from ComfyUI tensors back to PIL images, runs the pipeline with lcm_origin_steps=50, and then - the interesting part - does the compositing itself in Python with Pillow. In Inpaint mode it returns the generated image. In Outpaint mode it builds a larger canvas, pastes your original in, and stitches the generated expansion alongside it, with a direction you choose.
The inputs that matter
Most of these appear on every generation node in the pack, so learning them here pays off.
- mode -
InpaintorOutpaint. This changes what the node does with the output. - image, mask, original_image - the inpaint trio. The mask is white where you want regeneration; the other two feed the composite.
- outpaint_size (default 256) and outpaint_direction (
left/right/top/bottom) - how far and which way to extend the canvas when mode is Outpaint. - oupaint_quality -
higherruns a second pass over the seam with a blurred mask so the join isn't a hard line. Costs time, fixes the obvious stitch artifact. Worth it. - steps (default 4) and cfg (default 8). Here's the trap: this is an LCM model, and the distillation rules say CFG should sit around 1–2, not 8. The author's default is hot. Lower
cfgtoward 1–2 for the characteristic clean LCM look; keep the default if you want more contrast and don't mind oversaturation. Steps of 4–8 is the whole point - that's the speed. - text, seed, batch - standard. Note that with
batch > 1the node re-randomizes the seed each pass. - prompt_weighting -
enableroutes the prompt throughcompel, which gives you+/-emphasis. The README is blunt: it requires CPU inference (select CPU in LCMLoader) because the GPU path throws an error the author never fixed. - Reference_Only -
enableusesreference_image+style_fidelityto steer generation toward a reference's style, so outpaint and inpaint match the source art better. This is the "promptless" trick from the author's Reddit posts.
The single output is an IMAGE - wire it to a preview or save node (the pack ships SaveImage_LCM for this).
Setup and the usual pain
You need the pack installed and the LCM_Dreamshaper_v7 diffusers model in ComfyUI/models/diffusers (blank model_path in LCMLoader resolves there). If you skipped the model download you'll get the loader's "couldn't connect to huggingface.co" error before this node ever runs. Windows path quirks also crop up here, since all the image handling is Pillow + manual string paths.
One honest caveat: this is October 2023 code, written when the author was actively posting "Workflow Included" LCM demos to r/StableDiffusion. It works, and it's genuinely fast, but the seams show - the default CFG, the CPU-only prompt weighting, the re-randomized batch seeds. Treat it as a fun, fast pipeline to iterate with, not as polished tooling. For final renders, take the same concept to native ComfyUI nodes and a proper LCM sampler.
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 | — | |
| mask | IMAGE | — | |
| original_image | IMAGE | — | |
| outpaint_size | INT | 2560–5000 | — |
| outpaint_direction | COMBO | 4 options: left, right, top, bottom | |
| pipe | class | — | |
| batch | INT | 11–100 | — |
| prompt_weighting | COMBO | 2 options: disable, enable | |
| reference_image | IMAGE | — | |
| style_fidelity | FLOAT | 0.50–1 | — |
| Reference_Only | COMBO | 2 options: disable, enable | |
| oupaint_quality | COMBO | 2 options: higher, lower |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |