fountai commited on
Commit
fba3736
·
1 Parent(s): 4ed04d2
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -94,12 +94,13 @@ def remove_background(image_path, mask):
94
 
95
  return result
96
 
97
- pipe = FluxInpaintPipeline.from_pretrained(bfl_repo, torch_dtype=torch.bfloat16).to(DEVICE)
98
  MAX_SEED = np.iinfo(np.int32).max
99
  TRIGGER = "a photo of TOK"
100
 
101
  @spaces.GPU(duration=200)
102
  def execute(image, prompt):
 
103
  if not prompt :
104
  gr.Info("Please enter a text prompt.")
105
  return None
 
94
 
95
  return result
96
 
97
+ pipe = FluxInpaintPipeline.from_pretrained(bfl_repo, torch_dtype=torch.bfloat16)
98
  MAX_SEED = np.iinfo(np.int32).max
99
  TRIGGER = "a photo of TOK"
100
 
101
  @spaces.GPU(duration=200)
102
  def execute(image, prompt):
103
+ pipe.to(DEVICE)
104
  if not prompt :
105
  gr.Info("Please enter a text prompt.")
106
  return None