Commit
•
179eb90
0
Parent(s):
initial commit
Browse files- .gitattributes +55 -0
- README.md +65 -0
.gitattributes
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.lz4 filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
27 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
37 |
+
# Audio files - uncompressed
|
38 |
+
*.pcm filter=lfs diff=lfs merge=lfs -text
|
39 |
+
*.sam filter=lfs diff=lfs merge=lfs -text
|
40 |
+
*.raw filter=lfs diff=lfs merge=lfs -text
|
41 |
+
# Audio files - compressed
|
42 |
+
*.aac filter=lfs diff=lfs merge=lfs -text
|
43 |
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
44 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
45 |
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
46 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
47 |
+
# Image files - uncompressed
|
48 |
+
*.bmp filter=lfs diff=lfs merge=lfs -text
|
49 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
50 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
51 |
+
*.tiff filter=lfs diff=lfs merge=lfs -text
|
52 |
+
# Image files - compressed
|
53 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
+
*.webp filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- text-to-image
|
4 |
+
- stable-diffusion
|
5 |
+
- lora
|
6 |
+
- diffusers
|
7 |
+
- template:sd-lora
|
8 |
+
widget:
|
9 |
+
- text: >-
|
10 |
+
Beautiful woman, bubblegum pink, lemon yellow, minty blue, futuristic,
|
11 |
+
high-detail, epic composition, watercolor.
|
12 |
+
output:
|
13 |
+
url: images/sd21_base.png
|
14 |
+
base_model: stabilityai/stable-diffusion-2-1-base
|
15 |
+
instance_prompt: null
|
16 |
+
license: mit
|
17 |
+
---
|
18 |
+
# TCD-SD21-LoRA
|
19 |
+
|
20 |
+
<Gallery />
|
21 |
+
|
22 |
+
## Model description
|
23 |
+
|
24 |
+
Official SD21(base) Model of the paper [Trajectory Consistency Distillation](https://arxiv.org/abs/2402.19159).
|
25 |
+
|
26 |
+
For more usage please found at [Project Page](https://huggingface.co/h1t/TCD-SDXL-LoRA/)
|
27 |
+
|
28 |
+
Here is a simple example:
|
29 |
+
|
30 |
+
```python
|
31 |
+
import torch
|
32 |
+
from diffusers import StableDiffusionPipeline, TCDScheduler
|
33 |
+
|
34 |
+
device = "cuda"
|
35 |
+
base_model_id = "stabilityai/stable-diffusion-2-1-base"
|
36 |
+
tcd_lora_id = "h1t/TCD-SD21-base-LoRA"
|
37 |
+
|
38 |
+
pipe = StableDiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16, variant="fp16").to(device)
|
39 |
+
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)
|
40 |
+
|
41 |
+
pipe.load_lora_weights(tcd_lora_id)
|
42 |
+
pipe.fuse_lora()
|
43 |
+
|
44 |
+
prompt = "Beautiful woman, bubblegum pink, lemon yellow, minty blue, futuristic, high-detail, epic composition, watercolor."
|
45 |
+
|
46 |
+
image = pipe(
|
47 |
+
prompt=prompt,
|
48 |
+
num_inference_steps=4,
|
49 |
+
guidance_scale=0,
|
50 |
+
# Eta (referred to as `gamma` in the paper) is used to control the stochasticity in every step.
|
51 |
+
# A value of 0.3 often yields good results.
|
52 |
+
# We recommend using a higher eta when increasing the number of inference steps.
|
53 |
+
eta=0.3,
|
54 |
+
generator=torch.Generator(device=device).manual_seed(0),
|
55 |
+
).images[0]
|
56 |
+
|
57 |
+
```
|
58 |
+
![sd21_base.png](https://cdn-uploads.huggingface.co/production/uploads/630b77f68b327c7b8b98c409/ifzBOlPA7E4IKkysMpelC.png)
|
59 |
+
|
60 |
+
|
61 |
+
## Download model
|
62 |
+
|
63 |
+
Weights for this model are available in Safetensors format.
|
64 |
+
|
65 |
+
[Download](/h1t/TCD-SD21-base-LoRA/tree/main) them in the Files & versions tab.
|