Update README.md
Browse files
README.md
CHANGED
@@ -23,17 +23,28 @@ Target-Driven Distillation: Consistency Distillation with Target Timestep Select
|
|
23 |
Samples generated by TDD-distilled SDXL, with only 4--8 steps.
|
24 |
</div>
|
25 |
|
26 |
-
##
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
-
|
32 |
-
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
|
|
37 |
You can directly download the model in this repository.
|
38 |
You also can download the model in python script:
|
39 |
|
@@ -71,6 +82,17 @@ image = pipe(
|
|
71 |
image.save("tdd.png")
|
72 |
```
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
## Introduction
|
75 |
|
76 |
Target-Driven Distillation (TDD) features three key designs, that differ from previous consistency distillation methods.
|
|
|
23 |
Samples generated by TDD-distilled SDXL, with only 4--8 steps.
|
24 |
</div>
|
25 |
|
26 |
+
## Usage FLUX
|
27 |
+
```python
|
28 |
+
from huggingface_hub import hf_hub_download
|
29 |
+
from diffusers import FluxPipeline
|
30 |
+
|
31 |
+
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
32 |
+
pipe.load_lora_weights(hf_hub_download("RED-AIGC/TDD", "TDD-FLUX.1-dev-lora-beta.safetensors"))
|
33 |
+
pipe.fuse_lora(lora_scale=0.125)
|
34 |
+
pipe.to("cuda")
|
35 |
+
|
36 |
+
image_flux = pipe(
|
37 |
+
prompt=[prompt],
|
38 |
+
generator=torch.Generator().manual_seed(int(3413)),
|
39 |
+
num_inference_steps=8,
|
40 |
+
guidance_scale=2.0,
|
41 |
+
height=1024,
|
42 |
+
width=1024,
|
43 |
+
max_sequence_length=256
|
44 |
+
).images[0]
|
45 |
+
```
|
46 |
|
47 |
+
## Usage SDXL
|
48 |
You can directly download the model in this repository.
|
49 |
You also can download the model in python script:
|
50 |
|
|
|
82 |
image.save("tdd.png")
|
83 |
```
|
84 |
|
85 |
+
## Update
|
86 |
+
[2024.09.20]:Upload the TDD LoRA weights of FLUX-TDD-BETA(4-8-steps)
|
87 |
+
[2024.08.25]:Upload the TDD LoRA weights of SVD
|
88 |
+
[2024.08.22]:Upload the TDD LoRA weights of Stable Diffusion XL, YamerMIX and RealVisXL-V4.0, fast text-to-image generation.
|
89 |
+
- sdxl_tdd_lora_weights.safetensors
|
90 |
+
- yamermix_tdd_lora_weights.safetensors
|
91 |
+
- realvis_tdd_sdxl_lora_weights.safetensors
|
92 |
+
|
93 |
+
Thanks to [Yamer](https://civitai.com/user/Yamer) and [SG_161222](https://civitai.com/user/SG_161222) for developing [YamerMIX](https://civitai.com/models/84040?modelVersionId=395107) and [RealVisXL V4.0](https://civitai.com/models/139562/realvisxl-v40) respectively.
|
94 |
+
|
95 |
+
|
96 |
## Introduction
|
97 |
|
98 |
Target-Driven Distillation (TDD) features three key designs, that differ from previous consistency distillation methods.
|