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}")
|
||||
|
||||
# shape
|
||||
#model_path = 'tencent/Hunyuan3D-2.1'
|
||||
#pipeline_shapegen = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(model_path)
|
||||
##
|
||||
#image_path = 'assets/demo.png'
|
||||
#image = Image.open(image_path).convert("RGBA")
|
||||
#if image.mode == 'RGB':
|
||||
# rembg = BackgroundRemover()
|
||||
# image = rembg(image)
|
||||
#
|
||||
#mesh = pipeline_shapegen(image=image)[0]
|
||||
#mesh.export('demo.glb')
|
||||
model_path = 'tencent/Hunyuan3D-2.1'
|
||||
pipeline_shapegen = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(model_path)
|
||||
|
||||
image_path = 'assets/demo.png'
|
||||
image = Image.open(image_path).convert("RGBA")
|
||||
if image.mode == 'RGB':
|
||||
rembg = BackgroundRemover()
|
||||
image = rembg(image)
|
||||
|
||||
mesh = pipeline_shapegen(image=image)[0]
|
||||
mesh.export('demo.glb')
|
||||
|
||||
# paint
|
||||
max_num_view = 6 # can be 6 to 9
|
||||
|
||||
Reference in New Issue
Block a user