theoracle commited on
Commit
3a30bfb
·
verified ·
1 Parent(s): 800f45f

Update background_edit.py

Browse files
Files changed (1) hide show
  1. background_edit.py +2 -2
background_edit.py CHANGED
@@ -38,7 +38,7 @@ inpaint_pipe = StableDiffusionXLInpaintPipeline.from_pretrained(
38
  use_auth_token=os.getenv("HF_TOKEN")
39
  ).to("cuda")
40
 
41
- @spaces.GPU
42
  def run_background_removal_and_inpaint(image_path, prompt, negative_prompt, guidance_scale=10):
43
  if not image_path or not os.path.isfile(image_path):
44
  raise gr.Error("No valid image found. Please run Step 1 first.")
@@ -71,7 +71,7 @@ def run_background_removal_and_inpaint(image_path, prompt, negative_prompt, guid
71
 
72
  return result
73
 
74
- @spaces.GPU
75
  def run_clothing_inpaint(image, prompt, negative_prompt, guidance):
76
  try:
77
  print("[INFO] Step 3: Clothing segmentation and inpainting...", flush=True)
 
38
  use_auth_token=os.getenv("HF_TOKEN")
39
  ).to("cuda")
40
 
41
+ @spaces.GPU(duration=30)
42
  def run_background_removal_and_inpaint(image_path, prompt, negative_prompt, guidance_scale=10):
43
  if not image_path or not os.path.isfile(image_path):
44
  raise gr.Error("No valid image found. Please run Step 1 first.")
 
71
 
72
  return result
73
 
74
+ @spaces.GPU(duration=30)
75
  def run_clothing_inpaint(image, prompt, negative_prompt, guidance):
76
  try:
77
  print("[INFO] Step 3: Clothing segmentation and inpainting...", flush=True)