TheyCallMeHex commited on
Commit
fa55034
1 Parent(s): 87eff73

Updated new readme

Browse files
Assets/OnnxStack - 640x320.png ADDED
Assets/lcm_angel_30_7.5_2092464983.png ADDED
Assets/lcm_car_30_7.5_2092464983.png ADDED
Assets/lcm_demon_30_7.5_2092464983.png ADDED
Assets/lcm_ninja_30_7.5_2092464983.png ADDED
README.md CHANGED
@@ -1,75 +1,56 @@
1
  ---
2
- license: mit
3
  language:
4
  - en
5
- pipeline_tag: text-to-image
6
  tags:
 
 
7
  - text-to-image
 
 
8
  ---
9
 
10
- # Latent Consistency Models
11
-
12
- Official Repository of the paper: *[Latent Consistency Models](https://arxiv.org/abs/2310.04378)*.
13
-
14
- Project Page: https://latent-consistency-models.github.io
15
 
16
- ## Try our Hugging Face demos:
17
- [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/SimianLuo/Latent_Consistency_Model)
18
 
19
- ## Model Descriptions:
20
- Distilled from [Dreamshaper v7](https://huggingface.co/Lykon/dreamshaper-7) fine-tune of [Stable-Diffusion v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) with only 4,000 training iterations (~32 A100 GPU Hours).
21
 
22
- ## Generation Results:
 
23
 
24
- <p align="center">
25
- <img src="teaser.png">
26
- </p>
27
 
28
- 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.
 
29
 
30
- <p align="center">
31
- <img src="speed_fid.png">
32
- </p>
33
 
34
- ## Usage
35
 
36
- You can try out Latency Consistency Models directly on:
37
- [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/SimianLuo/Latent_Consistency_Model)
38
 
39
- To run the model yourself, you can leverage the 🧨 Diffusers library:
40
- 1. Install the library:
41
- ```
42
- pip install git+https://github.com/huggingface/diffusers.git
43
- pip install transformers accelerate
44
- ```
45
 
46
- 2. Run the model:
47
- ```py
48
- from diffusers import DiffusionPipeline
49
- import torch
50
 
51
- pipe = DiffusionPipeline.from_pretrained("SimianLuo/LCM_Dreamshaper_v7", custom_pipeline="latent_consistency_txt2img", custom_revision="main", revision="fb9c5d")
 
52
 
53
- # To save GPU memory, torch.float16 can be used, but it may compromise image quality.
54
- pipe.to(torch_device="cuda", torch_dtype=torch.float32)
55
 
56
- prompt = "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"
57
 
58
- # Can be set to 1~50 steps. LCM support fast inference even <= 4 steps. Recommend: 1~8 steps.
59
- num_inference_steps = 4
60
 
61
- images = pipe(prompt=prompt, num_inference_steps=num_inference_steps, guidance_scale=8.0, lcm_origin_steps=50, output_type="pil").images
62
- ```
63
 
64
- ## BibTeX
65
 
66
- ```bibtex
67
- @misc{luo2023latent,
68
- title={Latent Consistency Models: Synthesizing High-Resolution Images with Few-Step Inference},
69
- author={Simian Luo and Yiqin Tan and Longbo Huang and Jian Li and Hang Zhao},
70
- year={2023},
71
- eprint={2310.04378},
72
- archivePrefix={arXiv},
73
- primaryClass={cs.CV}
74
- }
75
- ```
 
1
  ---
2
+
3
  language:
4
  - en
5
+ license: mit
6
  tags:
7
+ - stable-diffusion
8
+ - stable-diffusion-diffusers
9
  - text-to-image
10
+ - diffusers
11
+ inference: true
12
  ---
13
 
14
+ <p align="center" width="100%">
15
+ <img width="80%" src="Assets/OnnxStack - 640x320.png">
16
+ </p>
 
 
17
 
18
+ ### OnnxStack
19
+ This model has been converted to ONNX and tested with OnnxStack
20
 
21
+ - [OnnxStack](https://github.com/saddam213/OnnxStack)
 
22
 
23
+ ### LCM Dreamshaper V7 Diffusion
24
+ This model was converted to ONNX from LCM Dreamshaper V7
25
 
26
+ - [LCM-Dreamshaper-V7](https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7)
 
 
27
 
28
+ ### Sample Images
29
+ *A demon*
30
 
31
+ <img src="Assets/lcm_demon_30_7.5_2092464983.png" width="256" alt="Image of browser inferencing on sample images."/>
 
 
32
 
33
+ Seed: 207582124 GuidanceScale: 7.5 NumInferenceSteps: 30
34
 
35
+ __________________________
36
+ *An angel*
37
 
38
+ <img src="Assets/lcm_angel_30_7.5_2092464983.png" width="256" alt="Image of browser inferencing on sample images."/>
 
 
 
 
 
39
 
40
+ Seed: 207582124 GuidanceScale: 7.5 NumInferenceSteps: 30
 
 
 
41
 
42
+ __________________________
43
+ *A ninja*
44
 
45
+ <img src="Assets/lcm_ninja_30_7.5_2092464983.png" width="256" alt="Image of browser inferencing on sample images."/>
 
46
 
47
+ Seed: 207582124 GuidanceScale: 7.5 NumInferenceSteps: 30
48
 
49
+ __________________________
50
+ *a japanese dometic market sports car sitting in a showroom*
51
 
52
+ <img src="Assets/lcm_car_30_7.5_2092464983.png" width="256" alt="Image of browser inferencing on sample images."/>
 
53
 
54
+ Seed: 207582124 GuidanceScale: 7.5 NumInferenceSteps: 30
55
 
56
+ __________________________