Spaces:
Running
on
Zero
Running
on
Zero
bugfix
Browse files
app.py
CHANGED
@@ -53,6 +53,8 @@ class calculateDuration:
|
|
53 |
|
54 |
|
55 |
@spaces.GPU()
|
|
|
|
|
56 |
def process_image(image_input, image_url, task_prompt, text_prompt=None, dilate=0, merge_masks=False, return_rectangles=False) -> Optional[Image.Image]:
|
57 |
|
58 |
if not image_input:
|
|
|
53 |
|
54 |
|
55 |
@spaces.GPU()
|
56 |
+
@torch.inference_mode()
|
57 |
+
@torch.autocast(device_type="cuda", dtype=torch.bfloat16)
|
58 |
def process_image(image_input, image_url, task_prompt, text_prompt=None, dilate=0, merge_masks=False, return_rectangles=False) -> Optional[Image.Image]:
|
59 |
|
60 |
if not image_input:
|