Spaces:
Sleeping
Sleeping
Update demo.py
Browse files
demo.py
CHANGED
|
@@ -3,7 +3,8 @@ sys.path.insert(0, './hy3dshape')
|
|
| 3 |
sys.path.insert(0, './hy3dpaint')
|
| 4 |
|
| 5 |
from PIL import Image
|
| 6 |
-
from hy3dshape.rembg import BackgroundRemover
|
|
|
|
| 7 |
from hy3dshape.pipelines import Hunyuan3DDiTFlowMatchingPipeline
|
| 8 |
from textureGenPipeline import Hunyuan3DPaintPipeline, Hunyuan3DPaintConfig
|
| 9 |
|
|
@@ -22,7 +23,8 @@ pipeline_shapegen = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(model_path)
|
|
| 22 |
image_path = 'assets/demo.png'
|
| 23 |
image = Image.open(image_path).convert("RGBA")
|
| 24 |
if image.mode == 'RGB':
|
| 25 |
-
rembg = BackgroundRemover()
|
|
|
|
| 26 |
image = rembg(image)
|
| 27 |
|
| 28 |
mesh = pipeline_shapegen(image=image)[0]
|
|
|
|
| 3 |
sys.path.insert(0, './hy3dpaint')
|
| 4 |
|
| 5 |
from PIL import Image
|
| 6 |
+
# from hy3dshape.rembg import BackgroundRemover
|
| 7 |
+
from ..birefnet_rembg import BiRefNetRemover
|
| 8 |
from hy3dshape.pipelines import Hunyuan3DDiTFlowMatchingPipeline
|
| 9 |
from textureGenPipeline import Hunyuan3DPaintPipeline, Hunyuan3DPaintConfig
|
| 10 |
|
|
|
|
| 23 |
image_path = 'assets/demo.png'
|
| 24 |
image = Image.open(image_path).convert("RGBA")
|
| 25 |
if image.mode == 'RGB':
|
| 26 |
+
# rembg = BackgroundRemover()
|
| 27 |
+
rembg = BiRefNetRemover()
|
| 28 |
image = rembg(image)
|
| 29 |
|
| 30 |
mesh = pipeline_shapegen(image=image)[0]
|