Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -82,13 +82,11 @@ EXAMPLES = [
|
|
82 |
|
83 |
os.makedirs(TMP_DIR, exist_ok=True)
|
84 |
|
85 |
-
dtype = torch.float16
|
86 |
-
|
87 |
local_dir = "pretrained_weights/DetailGen3D"
|
88 |
snapshot_download(repo_id=REPO_ID, local_dir=local_dir)
|
89 |
pipeline = DetailGen3DPipeline.from_pretrained(
|
90 |
local_dir
|
91 |
-
).to(DEVICE, dtype=
|
92 |
|
93 |
|
94 |
def load_mesh(mesh_path, num_pc=20480):
|
@@ -130,7 +128,7 @@ def run_detailgen3d(
|
|
130 |
sampled_points, grid_size, bbox_size = generate_dense_grid_points(
|
131 |
bbox_min=box_min, bbox_max=box_max, octree_depth=8, indexing="ij"
|
132 |
)
|
133 |
-
sampled_points = torch.FloatTensor(sampled_points).to(DEVICE, dtype=
|
134 |
sampled_points = sampled_points.unsqueeze(0).repeat(batch_size, 1, 1)
|
135 |
|
136 |
# inference pipeline
|
|
|
82 |
|
83 |
os.makedirs(TMP_DIR, exist_ok=True)
|
84 |
|
|
|
|
|
85 |
local_dir = "pretrained_weights/DetailGen3D"
|
86 |
snapshot_download(repo_id=REPO_ID, local_dir=local_dir)
|
87 |
pipeline = DetailGen3DPipeline.from_pretrained(
|
88 |
local_dir
|
89 |
+
).to(DEVICE, dtype=DTYPE)
|
90 |
|
91 |
|
92 |
def load_mesh(mesh_path, num_pc=20480):
|
|
|
128 |
sampled_points, grid_size, bbox_size = generate_dense_grid_points(
|
129 |
bbox_min=box_min, bbox_max=box_max, octree_depth=8, indexing="ij"
|
130 |
)
|
131 |
+
sampled_points = torch.FloatTensor(sampled_points).to(DEVICE, dtype=DTYPE)
|
132 |
sampled_points = sampled_points.unsqueeze(0).repeat(batch_size, 1, 1)
|
133 |
|
134 |
# inference pipeline
|