English
art
Stable Diffusion
lyraSD / README.md
bigmoyan's picture
Update README.md
fb79cc3
|
raw
history blame
2.28 kB
metadata
license: creativeml-openrail-m
language:
  - en
library_name: diffusers
pipeline_tag: text-to-image
tags:
  - art
  - tensorRT

Model Card for lyraSD

lyraSD is currently the fastest Stable Diffusion model available, boasting an inference cost of only 0.435 seconds for a 512x512 image, accelerating the process up to 10 times faster than the original version.

Among its main features are:

  • weights: original Stable Diffusion 1.4 weights
  • input image: 512x512 (in img2img mode)
  • output image: 512x512
  • device requirements: Nvidia Ampere architecture (A100) or compatable
  • super-resultion: 4x by default, optional.

Speed

test environment

  • device: Nvidia A100 40G
  • img size: 512x512
  • percision:fp16
  • steps: 30
  • solver: LMSD

text2img

model time cost(ms) memory(MB)
Pytorch SD ~5000ms ~10240
lyraSD ~435ms ~4026

superResolution(SR)

model time cost(ms) memory(MB)
Pytorch SR ~720ms ~6650
lyraSD ~26ms ~1600

Model Sources

Uses

from lyraSD import LyraSD

t2imodel = LyraSD("text2img", "./sd1.4-engine")
t2imodel.inference(prompt="A fantasy landscape, trending on artstation", use_super=False)


from PIL import Image
i2imodel = LyraSD("img2img", "./sd1.4-engine")
demo_img = Image.open("output/text2img_demo.jpg")
i2imodel.inference(prompt="A fantasy landscape, trending on artstation", image=demo_img)

Demo output

text2img

text2img_demo

img2img

text2img_demo

text2img_demo

Environment

docker pull bigmoyan/lyra_aigc:v0.1

Citation

@Misc{lyraSD2023,
  author =       {Kangjian Wu, Zhengtao Wang, Bin Wu},
  title =        {lyraSD: Accelerating Stable Diffusion by 10x+},
  howpublished = {\url{https://huggingface.co/TMElyralab/lyraSD}},
  year =         {2023}
}

Report bug