Spaces:
Sleeping
Sleeping
polu
commited on
Commit
·
d3260f5
1
Parent(s):
846b367
init
Browse files
app.py
CHANGED
@@ -31,8 +31,7 @@ if not path.exists(cache_path):
|
|
31 |
os.makedirs(cache_path, exist_ok=True)
|
32 |
|
33 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
34 |
-
|
35 |
-
pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
|
36 |
pipe.fuse_lora(lora_scale=0.125)
|
37 |
pipe.to(device="cuda", dtype=torch.bfloat16)
|
38 |
|
@@ -50,9 +49,9 @@ with gr.Blocks(css=css) as demo:
|
|
50 |
gr.Markdown(
|
51 |
"""
|
52 |
# FLUX.1-dev(beta) distilled by ✨Target-Driven Distillation✨
|
53 |
-
Compared to Hyper-FLUX, the beta version of TDD has its parameters reduced by half(
|
54 |
[**Project Page**](https://redaigc.github.io/TDD/) **|** [**Paper**](https://arxiv.org/abs/2409.01347) **|** [**Code**](https://github.com/RedAIGC/Target-Driven-Distillation) **|** [**Model**](https://huggingface.co/RED-AIGC/TDD) **|** [🤗 **TDD-SDXL Demo**](https://huggingface.co/spaces/RED-AIGC/TDD) **|** [🤗 **TDD-SVD Demo**](https://huggingface.co/spaces/RED-AIGC/SVD-TDD)
|
55 |
-
The codes of this space are built on [Hyper-
|
56 |
"""
|
57 |
)
|
58 |
|
@@ -61,7 +60,7 @@ with gr.Blocks(css=css) as demo:
|
|
61 |
with gr.Group():
|
62 |
prompt = gr.Textbox(
|
63 |
label="Prompt",
|
64 |
-
placeholder="
|
65 |
lines=3
|
66 |
)
|
67 |
|
|
|
31 |
os.makedirs(cache_path, exist_ok=True)
|
32 |
|
33 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
34 |
+
pipe.load_lora_weights(hf_hub_download("RED-AIGC/TDD", "TDD-FLUX.1-dev-lora-beta.safetensors"))
|
|
|
35 |
pipe.fuse_lora(lora_scale=0.125)
|
36 |
pipe.to(device="cuda", dtype=torch.bfloat16)
|
37 |
|
|
|
49 |
gr.Markdown(
|
50 |
"""
|
51 |
# FLUX.1-dev(beta) distilled by ✨Target-Driven Distillation✨
|
52 |
+
Compared to Hyper-FLUX, the beta version of TDD has its parameters reduced by half(600MB), resulting in more realistic details. Due to the limitations of the machine configuration, there are still many imperfections in the test version. The official version is still being optimized and is expected to be released after the National Day holiday. TDD is also available for distilling video generation models. This space presents TDD-distilled [FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
53 |
[**Project Page**](https://redaigc.github.io/TDD/) **|** [**Paper**](https://arxiv.org/abs/2409.01347) **|** [**Code**](https://github.com/RedAIGC/Target-Driven-Distillation) **|** [**Model**](https://huggingface.co/RED-AIGC/TDD) **|** [🤗 **TDD-SDXL Demo**](https://huggingface.co/spaces/RED-AIGC/TDD) **|** [🤗 **TDD-SVD Demo**](https://huggingface.co/spaces/RED-AIGC/SVD-TDD)
|
54 |
+
The codes of this space are built on [Hyper-FLUX](https://huggingface.co/spaces/ByteDance/Hyper-FLUX-8Steps-LoRA) and we acknowledge their contribution.
|
55 |
"""
|
56 |
)
|
57 |
|
|
|
60 |
with gr.Group():
|
61 |
prompt = gr.Textbox(
|
62 |
label="Prompt",
|
63 |
+
placeholder="portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography",
|
64 |
lines=3
|
65 |
)
|
66 |
|