Sign In

How to: fast generation with LCM

How to: fast generation with LCM

LCM allows you to generate images faster, but sacrificing some % quality. This is a mini-guide on how to get started. This helps low-end hardware well, as well as large-scale tasks where speed is more important than maximum quality.

*relevant for automatic 1.6.1, when using LCM-lora or LCM-checkpoint

Quick start.

Step 1: install extension with LCM-sampler and restart UI

Step 2: choose any LCM-checkpoint (PicX_real, Dreamshaper, etc.) / or choose "regular" checkpoint and add LCM-lora with 1.0 weight

Step 3: choose "LCM_test" sampler in "Sampling method"

Step 4: set sampling steps around 8-12, CFG 1.5-2.5 (use CFG value after the dot for more accurate tuning - 2.2, 2.333, and so on)

About samplers.

You can also use Euler a - it is faster, but slightly worse in quality. The rest of the samplers give significantly worse quality and I do not recommend using them with LCM. Below is a comparison of LCM/Euler a/DPM++ SDE Karras, and a large test of 10 samplers in addition.

full resolution picture / extended samplers test

About CFG/sampling steps.

The value of the appropriate number of sampling steps depends on the CFG value. Below is a test grid on the LCM sampler (Euler a works similarly), and a large CFG/sampling steps test in addition.

full resolution picture / extended CFG/sampling steps test

How to improve quality?

Use elements without implementing LCM. That is, if you use an LCM-checkpoint, add a regular lora without LCM to it. For example, with LCM-checkpoint (PicX_real), you can use lora (PicXer_real) - this way you will preserve the style of the model to a large extent, but improve the quality of its output (an example of this is below).

116

Comments