Views
No views yet



1# Stage 1: 3D geometry generation
2from step1x3d_geometry.models.pipelines.pipeline import Step1X3DGeometryPipeline
3
4# define the pipeline
5geometry_pipeline = Step1X3DGeometryPipeline.from_pretrained("stepfun-ai/Step1X-3D", subfolder='Step1X-3D-Geometry-1300m'
6).to("cuda")
7
8# input image
9input_image_path = "examples/test.png"
10
11# run pipeline and obtain the untextured mesh
12generator = torch.Generator(device=geometry_pipeline.device).manual_seed(2025)
13out = geometry_pipeline(input_image_path,guidance_scale=7.5, num_inference_steps=50)
14
15# export untextured mesh as .glb format
16out.mesh[0].export("untexture_mesh.glb")
17
18
19# Stage 2: 3D texure synthsis
20from step1x3d_texture.pipelines.step1x_3d_texture_synthesis_pipeline import (
21 Step1X3DTexturePipeline,
22)
23from step1x3d_geometry.models.pipelines.pipeline_utils import reduce_face, remove_degenerate_face
24import trimesh
25
26# load untextured mesh
27untexture_mesh = trimesh.load("untexture_mesh.glb")
28
29# define texture_pipeline
30texture_pipeline = Step1X3DTexturePipeline.from_pretrained("stepfun-ai/Step1X-3D", subfolder="Step1X-3D-Texture")
31
32# reduce face
33untexture_mesh = remove_degenerate_face(untexture_mesh)
34untexture_mesh = reduce_face(untexture_mesh)
35
36# texture mapping
37textured_mesh = texture_pipeline(input_image_path, untexture_mesh)
38
39# export textured mesh as .glb format
40textured_mesh.export("textured_mesh.glb")@article{li2025step1x3dhighfidelitycontrollablegeneration,
title={Step1X-3D: Towards High-Fidelity and Controllable Generation of Textured 3D Assets},
author={Weiyu Li and Xuanyang Zhang and Zheng Sun and Di Qi and Hao Li and Wei Cheng and Weiwei Cai and Shihao Wu and Jiarui Liu and Zihao Wang and Xiao Chen and Feipeng Tian and Jianxiong Pan and Zeming Li and Gang Yu and Xiangyu Zhang and Daxin Jiang and Ping Tan},
journal={arXiv preprint arxiv:2505.07747}
year={2025}
}