luosiallen / latent-consistency-model

Synthesizing High-Resolution Images with Few-Step Inference

  • Public
  • 1.1M runs
  • L40S
  • GitHub
  • Paper
  • License

Input

string
Shift + Return to add a new line

Input prompt

Default: "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"

integer

Width of output image. Lower the setting if out of memory.

Default: 768

integer

Height of output image. Lower the setting if out of memory.

Default: 768

integer
(minimum: 1, maximum: 4)

Number of images to output.

Default: 1

integer
(minimum: 1, maximum: 50)

Number of denoising steps. Can be set to 1~50 steps. LCM support fast inference even <= 4 steps. Recommend: 1~8 steps.

Default: 8

number
(minimum: 1, maximum: 20)

Scale for classifier-free guidance

Default: 8

integer

Random seed. Leave blank to randomize the seed

Output

output
Generated in

Run time and cost

This model costs approximately $0.0089 to run on Replicate, or 112 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 10 seconds. The predict time for this model varies significantly based on the inputs.

Readme

Latent Consistency Models

By distilling classifier-free guidance into the model’s input, LCM can generate high-quality images in very short inference time. We compare the inference time at the setting of 768 x 768 resolution, CFG scale w=8, batchsize=4, using a A800 GPU.

BibTeX

@misc{luo2023latent,
      title={Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference}, 
      author={Simian Luo and Yiqin Tan and Longbo Huang and Jian Li and Hang Zhao},
      year={2023},
      eprint={2310.04378},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}