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
|
@@ -826,6 +826,13 @@ class TrellisVGGTTo3DPipeline(TrellisImageTo3DPipeline):
|
|
| 826 |
del new_pipeline.VGGT_model.camera_head
|
| 827 |
del new_pipeline.VGGT_model.point_head
|
| 828 |
new_pipeline.VGGT_model.eval()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 829 |
|
| 830 |
new_pipeline.sparse_structure_sampler = getattr(samplers, args['sparse_structure_sampler']['name'])(**args['sparse_structure_sampler']['args'])
|
| 831 |
new_pipeline.sparse_structure_sampler_params = args['sparse_structure_sampler']['params']
|
|
|
|
| 826 |
del new_pipeline.VGGT_model.camera_head
|
| 827 |
del new_pipeline.VGGT_model.point_head
|
| 828 |
new_pipeline.VGGT_model.eval()
|
| 829 |
+
|
| 830 |
+
from transformers import AutoImageProcessor, Mask2FormerForUniversalSegmentation, AutoModelForImageSegmentation
|
| 831 |
+
new_pipeline.birefnet_model = AutoModelForImageSegmentation.from_pretrained(
|
| 832 |
+
'ZhengPeng7/BiRefNet',
|
| 833 |
+
trust_remote_code=True
|
| 834 |
+
).to(new_pipeline.device)
|
| 835 |
+
new_pipeline.birefnet_model.eval()
|
| 836 |
|
| 837 |
new_pipeline.sparse_structure_sampler = getattr(samplers, args['sparse_structure_sampler']['name'])(**args['sparse_structure_sampler']['args'])
|
| 838 |
new_pipeline.sparse_structure_sampler_params = args['sparse_structure_sampler']['params']
|