orronai commited on
Commit
92bf603
·
1 Parent(s): 964b389

feat: try just flux

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -14,7 +14,7 @@ from utils.sd3 import sd3_editing
14
 
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
 
17
- pipe_sd3 = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16, token=os.getenv('HF_ACCESS_TOK'))
18
  pipe_flux = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.float16, token=os.getenv('HF_ACCESS_TOK'))
19
 
20
 
@@ -74,7 +74,7 @@ def get_examples():
74
  ]
75
  return case
76
 
77
- @spaces.GPU(duration=200)
78
  def FlowOpt_run(
79
  image_src_val: str, model_type_val: str, T_steps_val: int,
80
  n_max_val: int, eta_val: float, flowopt_iterations_val: int,
@@ -88,8 +88,8 @@ def FlowOpt_run(
88
 
89
  if model_type_val == 'FLUX':
90
  pipe = pipe_flux.to(device)
91
- elif model_type_val == 'SD3':
92
- pipe = pipe_sd3.to(device)
93
  else:
94
  raise NotImplementedError(f"Model type {model_type_val} not implemented")
95
 
 
14
 
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
 
17
+ # pipe_sd3 = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3-medium-diffusers", torch_dtype=torch.float16, token=os.getenv('HF_ACCESS_TOK'))
18
  pipe_flux = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.float16, token=os.getenv('HF_ACCESS_TOK'))
19
 
20
 
 
74
  ]
75
  return case
76
 
77
+ @spaces.GPU(duration=240)
78
  def FlowOpt_run(
79
  image_src_val: str, model_type_val: str, T_steps_val: int,
80
  n_max_val: int, eta_val: float, flowopt_iterations_val: int,
 
88
 
89
  if model_type_val == 'FLUX':
90
  pipe = pipe_flux.to(device)
91
+ # elif model_type_val == 'SD3':
92
+ # pipe = pipe_sd3.to(device)
93
  else:
94
  raise NotImplementedError(f"Model type {model_type_val} not implemented")
95