Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,11 +16,6 @@ from huggingface_hub import snapshot_download
|
|
| 16 |
from PIL import Image
|
| 17 |
from accelerate.utils import set_seed
|
| 18 |
|
| 19 |
-
from src.utils.data_utils import get_colored_mesh_composition, scene_to_parts, load_surfaces
|
| 20 |
-
from src.utils.render_utils import render_views_around_mesh, render_normal_views_around_mesh, make_grid_for_images_or_videos, export_renderings
|
| 21 |
-
from src.pipelines.pipeline_partcrafter import PartCrafterPipeline
|
| 22 |
-
from src.utils.image_utils import prepare_image
|
| 23 |
-
from src.models.briarmbg import BriaRMBG
|
| 24 |
import subprocess
|
| 25 |
import importlib, site, sys
|
| 26 |
|
|
@@ -58,6 +53,12 @@ sh("pip install diso")
|
|
| 58 |
import importlib, site; site.addsitedir(site.getsitepackages()[0]); importlib.invalidate_caches()
|
| 59 |
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
# Constants
|
| 62 |
MAX_NUM_PARTS = 16
|
| 63 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
|
| 16 |
from PIL import Image
|
| 17 |
from accelerate.utils import set_seed
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
import subprocess
|
| 20 |
import importlib, site, sys
|
| 21 |
|
|
|
|
| 53 |
import importlib, site; site.addsitedir(site.getsitepackages()[0]); importlib.invalidate_caches()
|
| 54 |
|
| 55 |
|
| 56 |
+
from src.utils.data_utils import get_colored_mesh_composition, scene_to_parts, load_surfaces
|
| 57 |
+
from src.utils.render_utils import render_views_around_mesh, render_normal_views_around_mesh, make_grid_for_images_or_videos, export_renderings
|
| 58 |
+
from src.pipelines.pipeline_partcrafter import PartCrafterPipeline
|
| 59 |
+
from src.utils.image_utils import prepare_image
|
| 60 |
+
from src.models.briarmbg import BriaRMBG
|
| 61 |
+
|
| 62 |
# Constants
|
| 63 |
MAX_NUM_PARTS = 16
|
| 64 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|