Hi3D v1.0

Front, right, back and left views of a coarse mesh (top) and its refinement (bottom)

Top: the coarse mesh from Hunyuan3D-2mini turbo. Bottom: refined with the code below (seed 42, 25 steps, resolution 1024).

This is hi3d-official/Hi3Dv1.0, repacked into the Diffusers format in float16, together with the two image encoders it uses: facebook/dinov2-large and the vision tower of openai/clip-vit-large-patch14. It runs as a Modular Diffusers pipeline with the Hi3D v1.0 custom blocks and refines a coarse, untextured 3D shape guided by an image of the object.

Note: You need diffusers>=0.41.0 and pyfqmr. The example also uses trimesh to load and save the meshes.

Usage

The custom blocks load the model code shipped in this repository, hence trust_remote_code and trust_components_code.

Note: both flags run Python code downloaded from the Hub: trust_remote_code=True runs the code of the blocks repository, and trust_components_code=True runs the code shipped in the components_repo. Only use them with repositories you trust, and review their code before passing different ones.

import torch
import trimesh
from diffusers import ModularPipelineBlocks
from diffusers.utils import load_image
from huggingface_hub import hf_hub_download


blocks = ModularPipelineBlocks.from_pretrained(
    "OzzyGT/hi3d_v1_custom_blocks",
    trust_remote_code=True,
    components_repo="OzzyGT/hi3d_v1",
    trust_components_code=True,
)
pipe = blocks.init_pipeline()
pipe.load_components(dtype=torch.float16)
pipe.to("cuda")

image = load_image(
    "https://huggingface.co/datasets/OzzyGT/diffusers-examples/resolve/main/hunyuan3d_2mini/20261016231355.png",
    convert_method=lambda image: image.convert("RGBA"),
)
coarse_mesh = trimesh.load(
    hf_hub_download("OzzyGT/diffusers-examples", "hi3d_v1/20261016231355_coarse.glb", repo_type="dataset"),
    force="mesh",
)
mesh = pipe(
    image=image,
    mesh=coarse_mesh,
    generator=torch.Generator().manual_seed(42),
    output="meshes",
)[0]
trimesh.Trimesh(mesh["vertices"], mesh["faces"]).export("refined.glb")

The coarse mesh is the shape of the object in the image, such as the output of Hunyuan3D-2mini. The image should show the object on a transparent background.

License

This model is released under the Hi3D Open License Agreement Version 1.0, the same as the original; see also the NOTICE. The image encoders keep their own licenses: DINOv2 is Apache-2.0 and CLIP is MIT.

Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for OzzyGT/hi3d_v1

Finetuned
(5)
this model

Space using OzzyGT/hi3d_v1 1