rootonchair
commited on
Commit
·
e233a0f
verified
·
0
Parent(s):
initial commit
Browse files- .gitattributes +55 -0
- README.md +68 -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,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- text-to-image
|
4 |
+
- stable-diffusion
|
5 |
+
- lora
|
6 |
+
- diffusers
|
7 |
+
- template:sd-lora
|
8 |
+
widget:
|
9 |
+
- text: Inference with 2 steps
|
10 |
+
output:
|
11 |
+
url: images/result_2steps.png
|
12 |
+
- text: Inference with 4 steps
|
13 |
+
output:
|
14 |
+
url: images/result_4steps.png
|
15 |
+
- text: Inference with 8 steps
|
16 |
+
output:
|
17 |
+
url: images/result_8steps.png
|
18 |
+
base_model: Lykon/dreamshaper-7
|
19 |
+
instance_prompt: tscd, hypersd
|
20 |
+
license: mit
|
21 |
+
---
|
22 |
+
# TSCD-Dreamshaper-7
|
23 |
+
|
24 |
+
<Gallery />
|
25 |
+
|
26 |
+
## Model description
|
27 |
+
|
28 |
+
Fine-tune a distill LoRA version of [Lykon/dreamshaper-7](https://huggingface.co/Lykon/dreamshaper-7) using Time Segmented Consistency Model (TSCD) introduce in [Hyper-SD: Trajectory Segmented Consistency Model for
|
29 |
+
Efficient Image Synthesis](https://arxiv.org/abs/2404.13686)
|
30 |
+
|
31 |
+
This LoRA is fine-tuned on [laion/conceptual-captions-12m-webdataset](https://huggingface.co/datasets/laion/conceptual-captions-12m-webdataset) for 16.000 iterations using unofficial training implementation at [https://github.com/rootonchair/consistency_models_distill]()
|
32 |
+
|
33 |
+
# Usage
|
34 |
+
```python
|
35 |
+
import os
|
36 |
+
import torch
|
37 |
+
from diffusers import StableDiffusionPipeline, TCDScheduler
|
38 |
+
|
39 |
+
pipeline = StableDiffusionPipeline.from_pretrained("Lykon/dreamshaper-7", torch_dtype=torch.float16, safety_checker = None).to("cuda")
|
40 |
+
pipeline.load_lora_weights("rootonchair/tscd-dreamshaper-7")
|
41 |
+
pipeline.scheduler = TCDScheduler.from_config(pipeline.scheduler.config)
|
42 |
+
test_prompts = [
|
43 |
+
"cgmech, white mecha robot, cape, science fiction, torn clothes, glowing, standing, robot joints, mecha, armor, cowboy shot, intense sunlight, silver dragonborn, outdoors, landscape, nature, volumetrics dtx",
|
44 |
+
"Portrait photo of muscular bearded guy in a worn mech suit, elegant, sharp focus, photo by greg rutkowski, soft lighting, vibrant colors",
|
45 |
+
"photo of a supercar, 8k uhd, high quality, road, sunset, motion blur, depth blur, cinematic, filmic image 4k",
|
46 |
+
"a portrait of a white cat wearing glasses, highly detailed",
|
47 |
+
"a beautiful runrise at the beach, cinematic, masterpiece",
|
48 |
+
"A photo of beautiful mountain with realistic sunset and blue lake, highly detailed, masterpiece",
|
49 |
+
"Self-portrait oil painting, a beautiful cyborg with golden hair, 8k",
|
50 |
+
"Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
|
51 |
+
]
|
52 |
+
seed = 1234
|
53 |
+
images = pipeline(test_prompts, width=512, height=512, num_inference_steps=4, guidance_scale = 0, generator=torch.Generator(device='cuda').manual_seed(seed)).images
|
54 |
+
```
|
55 |
+
|
56 |
+
|
57 |
+
## Trigger words
|
58 |
+
|
59 |
+
You should use `tscd` to trigger the image generation.
|
60 |
+
|
61 |
+
You should use `hypersd` to trigger the image generation.
|
62 |
+
|
63 |
+
|
64 |
+
## Download model
|
65 |
+
|
66 |
+
Weights for this model are available in Safetensors format.
|
67 |
+
|
68 |
+
[Download](/rootonchair/tscd-dreamshaper-7/tree/main) them in the Files & versions tab.
|