haodongli hysts HF Staff commited on
Commit
442dd05
·
verified ·
1 Parent(s): 9b026cf

small fix for ZeroGPU (#5)

Browse files

- Small fix for ZeroGPU (96a8ef82d56228ea3f7af506a68033b3299da244)


Co-authored-by: hysts <hysts@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
26
  weight_dtype = torch.bfloat16
27
  task = None
28
 
29
- @spaces.GPU
30
  def load_pipeline():
31
  global pipeline, device, weight_dtype, task
32
  noise_scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained(
@@ -55,7 +55,7 @@ def fn(image_path):
55
  pipeline.set_progress_bar_config(disable=True)
56
  with nullcontext():
57
  _, output_vis, _ = process_single_image(
58
- image_path, pipeline,
59
  task_name=task,
60
  device=device,
61
  num_inference_steps=10,
 
26
  weight_dtype = torch.bfloat16
27
  task = None
28
 
29
+
30
  def load_pipeline():
31
  global pipeline, device, weight_dtype, task
32
  noise_scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained(
 
55
  pipeline.set_progress_bar_config(disable=True)
56
  with nullcontext():
57
  _, output_vis, _ = process_single_image(
58
+ image_path, pipeline,
59
  task_name=task,
60
  device=device,
61
  num_inference_steps=10,