fix
This commit is contained in:
22
demo.py
22
demo.py
@@ -18,17 +18,17 @@ except Exception as e:
|
|||||||
print(f"Warning: Failed to apply torchvision fix: {e}")
|
print(f"Warning: Failed to apply torchvision fix: {e}")
|
||||||
|
|
||||||
# shape
|
# shape
|
||||||
#model_path = 'tencent/Hunyuan3D-2.1'
|
model_path = 'tencent/Hunyuan3D-2.1'
|
||||||
#pipeline_shapegen = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(model_path)
|
pipeline_shapegen = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(model_path)
|
||||||
##
|
|
||||||
#image_path = 'assets/demo.png'
|
image_path = 'assets/demo.png'
|
||||||
#image = Image.open(image_path).convert("RGBA")
|
image = Image.open(image_path).convert("RGBA")
|
||||||
#if image.mode == 'RGB':
|
if image.mode == 'RGB':
|
||||||
# rembg = BackgroundRemover()
|
rembg = BackgroundRemover()
|
||||||
# image = rembg(image)
|
image = rembg(image)
|
||||||
#
|
|
||||||
#mesh = pipeline_shapegen(image=image)[0]
|
mesh = pipeline_shapegen(image=image)[0]
|
||||||
#mesh.export('demo.glb')
|
mesh.export('demo.glb')
|
||||||
|
|
||||||
# paint
|
# paint
|
||||||
max_num_view = 6 # can be 6 to 9
|
max_num_view = 6 # can be 6 to 9
|
||||||
|
|||||||
Reference in New Issue
Block a user