linoyts HF staff commited on
Commit
f6365e6
·
verified ·
1 Parent(s): 1600510

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -20,8 +20,8 @@ pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
20
  custom_pipeline="pipeline_flux_rf_inversion",
21
  torch_dtype=torch.bfloat16)
22
  pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"), lora_scale=0.125)
23
- #pipe.fuse_lora(lora_scale=0.125)
24
- pipe.enable_lora()
25
  pipe.to(DEVICE)
26
 
27
  examples = [[Image.open("cat.jpg"), "a tiger", 0, 4, 0.5, 0.9, False, 1, 8, 8, 789385745, False],
@@ -41,10 +41,10 @@ def check_style(stylezation):
41
 
42
  def check_hyper_flux_lora(enable_hyper_flux):
43
  if enable_hyper_flux:
44
- pipe.enable_lora()
45
  return 8, 8, 4
46
  else:
47
- pipe.disable_lora()
48
  return 28, 28, 7
49
 
50
  @spaces.GPU(duration=85)
 
20
  custom_pipeline="pipeline_flux_rf_inversion",
21
  torch_dtype=torch.bfloat16)
22
  pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"), lora_scale=0.125)
23
+ pipe.fuse_lora(lora_scale=0.125)
24
+ #pipe.enable_lora()
25
  pipe.to(DEVICE)
26
 
27
  examples = [[Image.open("cat.jpg"), "a tiger", 0, 4, 0.5, 0.9, False, 1, 8, 8, 789385745, False],
 
41
 
42
  def check_hyper_flux_lora(enable_hyper_flux):
43
  if enable_hyper_flux:
44
+ pipe.fuse_lora(lora_scale=0.125)
45
  return 8, 8, 4
46
  else:
47
+ pipe.unfuse_lora()
48
  return 28, 28, 7
49
 
50
  @spaces.GPU(duration=85)