Spaces:
Running
on
Zero
Running
on
Zero
Update trellis/pipelines/trellis_image_to_3d.py
Browse files
trellis/pipelines/trellis_image_to_3d.py
CHANGED
|
@@ -19,8 +19,9 @@ from typing import *
|
|
| 19 |
from scipy.spatial.transform import Rotation
|
| 20 |
from transformers import AutoModelForImageSegmentation
|
| 21 |
import rembg
|
| 22 |
-
|
| 23 |
-
from
|
|
|
|
| 24 |
|
| 25 |
def export_point_cloud(xyz, color):
|
| 26 |
# Convert tensors to numpy arrays if needed
|
|
@@ -1062,8 +1063,9 @@ class TrellisVGGTTo3DPipeline(TrellisImageTo3DPipeline):
|
|
| 1062 |
|
| 1063 |
new_pipeline._init_image_cond_model(args['image_cond_model'])
|
| 1064 |
|
| 1065 |
-
|
| 1066 |
-
new_pipeline.
|
| 1067 |
-
new_pipeline.dreamsim_model
|
|
|
|
| 1068 |
|
| 1069 |
return new_pipeline
|
|
|
|
| 19 |
from scipy.spatial.transform import Rotation
|
| 20 |
from transformers import AutoModelForImageSegmentation
|
| 21 |
import rembg
|
| 22 |
+
# for app_refine.py, please uncomment these lines
|
| 23 |
+
# from dreamsim import dreamsim
|
| 24 |
+
# from tqdm import tqdm
|
| 25 |
|
| 26 |
def export_point_cloud(xyz, color):
|
| 27 |
# Convert tensors to numpy arrays if needed
|
|
|
|
| 1063 |
|
| 1064 |
new_pipeline._init_image_cond_model(args['image_cond_model'])
|
| 1065 |
|
| 1066 |
+
# for app_refine.py, please uncomment these lines
|
| 1067 |
+
# model, _ = dreamsim(pretrained=True, device=new_pipeline.device, dreamsim_type="dino_vitb16", cache_dir="weights/dreamsim")
|
| 1068 |
+
# new_pipeline.dreamsim_model = model
|
| 1069 |
+
# new_pipeline.dreamsim_model.eval()
|
| 1070 |
|
| 1071 |
return new_pipeline
|