polu commited on
Commit
05693ff
1 Parent(s): f1f25a8
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -33,8 +33,7 @@ if not path.exists(cache_path):
33
  pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
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(dtype=torch.float16)
37
- pipe.to("cuda")
38
 
39
  css = """
40
  h1 {
@@ -50,8 +49,15 @@ 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(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).
 
 
 
 
 
 
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-FLUX](https://huggingface.co/spaces/ByteDance/Hyper-FLUX-8Steps-LoRA) and we acknowledge their contribution.
56
  """
57
  )
 
33
  pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
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
 
38
  css = """
39
  h1 {
 
49
  gr.Markdown(
50
  """
51
  # FLUX.1-dev(beta) distilled by ✨Target-Driven Distillation✨
52
+
53
+ Compared to Hyper-FLUX, the beta version of TDD has its parameters reduced by half(600MB), resulting in more realistic details.
54
+
55
+ Due to limitations in machine resources, there are still many imperfections in the beta version. The official version is still being optimized and is expected to be released after the National Day holiday.
56
+
57
+ Besides, 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).
58
+
59
  [**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)
60
+
61
  The codes of this space are built on [Hyper-FLUX](https://huggingface.co/spaces/ByteDance/Hyper-FLUX-8Steps-LoRA) and we acknowledge their contribution.
62
  """
63
  )