Spaces:
Running on Zero
Running on Zero
Commit ·
99f0b01
1
Parent(s): 9ac3dae
disable 3dfixer
Browse files
app.py
CHANGED
|
@@ -7,8 +7,8 @@ import gradio as gr
|
|
| 7 |
import spaces
|
| 8 |
|
| 9 |
import os
|
| 10 |
-
os.environ["ATTN_BACKEND"] = "
|
| 11 |
-
os.environ["SPARSE_ATTN_BACKEND"] = "
|
| 12 |
os.environ['SPCONV_ALGO'] = 'native'
|
| 13 |
import uuid
|
| 14 |
from typing import Any, List, Optional, Union
|
|
@@ -20,20 +20,18 @@ import trimesh
|
|
| 20 |
import random
|
| 21 |
import imageio
|
| 22 |
from einops import repeat
|
| 23 |
-
from threeDFixer.pipelines import ThreeDFixerPipeline
|
| 24 |
-
from threeDFixer.datasets.utils import (
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
)
|
| 32 |
from threeDFixer.utils import render_utils, postprocessing_utils
|
| 33 |
from transformers import AutoModelForMaskGeneration, AutoProcessor
|
| 34 |
from scripts.grounding_sam import plot_segmentation, segment
|
| 35 |
-
from sam2.build_sam import build_sam2
|
| 36 |
-
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
| 37 |
import copy
|
| 38 |
import shutil
|
| 39 |
import time
|
|
|
|
| 7 |
import spaces
|
| 8 |
|
| 9 |
import os
|
| 10 |
+
os.environ["ATTN_BACKEND"] = "xformers"
|
| 11 |
+
os.environ["SPARSE_ATTN_BACKEND"] = "xformers"
|
| 12 |
os.environ['SPCONV_ALGO'] = 'native'
|
| 13 |
import uuid
|
| 14 |
from typing import Any, List, Optional, Union
|
|
|
|
| 20 |
import random
|
| 21 |
import imageio
|
| 22 |
from einops import repeat
|
| 23 |
+
# from threeDFixer.pipelines import ThreeDFixerPipeline
|
| 24 |
+
# from threeDFixer.datasets.utils import (
|
| 25 |
+
# edge_mask_morph_gradient,
|
| 26 |
+
# process_scene_image,
|
| 27 |
+
# process_instance_image,
|
| 28 |
+
# transform_vertices,
|
| 29 |
+
# normalize_vertices,
|
| 30 |
+
# project2ply
|
| 31 |
+
# )
|
| 32 |
from threeDFixer.utils import render_utils, postprocessing_utils
|
| 33 |
from transformers import AutoModelForMaskGeneration, AutoProcessor
|
| 34 |
from scripts.grounding_sam import plot_segmentation, segment
|
|
|
|
|
|
|
| 35 |
import copy
|
| 36 |
import shutil
|
| 37 |
import time
|