multimodalart HF staff commited on
Commit
c3a473c
1 Parent(s): 1fe5ec5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -3,6 +3,7 @@ from diffusers import DiffusionPipeline
3
  import spaces
4
  import torch
5
  from concurrent.futures import ProcessPoolExecutor
 
6
 
7
  dev_model = "black-forest-labs/FLUX.1-dev"
8
  schnell_model = "black-forest-labs/FLUX.1-schnell"
@@ -20,6 +21,7 @@ pipe_schnell = DiffusionPipeline.from_pretrained(
20
  )
21
  @spaces.GPU
22
  def run_dev_hyper(prompt):
 
23
  pipe_dev.to("cuda")
24
  repo_name = "ByteDance/Hyper-SD"
25
  ckpt_name = "Hyper-FLUX.1-dev-8steps-lora.safetensors"
@@ -30,6 +32,7 @@ def run_dev_hyper(prompt):
30
 
31
  @spaces.GPU
32
  def run_dev_turbo(prompt):
 
33
  pipe_dev.to("cuda")
34
  repo_name = "alimama-creative/FLUX.1-Turbo-Alpha"
35
  ckpt_name = "diffusion_pytorch_model.safetensors"
@@ -40,6 +43,7 @@ def run_dev_turbo(prompt):
40
 
41
  @spaces.GPU
42
  def run_schnell(prompt):
 
43
  pipe_schnell.to("cuda")
44
  image = pipe_schnell(prompt).images[0]
45
  return image
 
3
  import spaces
4
  import torch
5
  from concurrent.futures import ProcessPoolExecutor
6
+ from huggingface_hub import hf_hub_download
7
 
8
  dev_model = "black-forest-labs/FLUX.1-dev"
9
  schnell_model = "black-forest-labs/FLUX.1-schnell"
 
21
  )
22
  @spaces.GPU
23
  def run_dev_hyper(prompt):
24
+ print("dev_hyper")
25
  pipe_dev.to("cuda")
26
  repo_name = "ByteDance/Hyper-SD"
27
  ckpt_name = "Hyper-FLUX.1-dev-8steps-lora.safetensors"
 
32
 
33
  @spaces.GPU
34
  def run_dev_turbo(prompt):
35
+ print("dev_turbo")
36
  pipe_dev.to("cuda")
37
  repo_name = "alimama-creative/FLUX.1-Turbo-Alpha"
38
  ckpt_name = "diffusion_pytorch_model.safetensors"
 
43
 
44
  @spaces.GPU
45
  def run_schnell(prompt):
46
+ print("schnell")
47
  pipe_schnell.to("cuda")
48
  image = pipe_schnell(prompt).images[0]
49
  return image