Spaces:
Runtime error
Runtime error
fix
Browse files
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)
|
| 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
|