Step1X-3D:实现高保真和可控 纹理 3D 资产的生成

在这里插入图片描述
Step1X-3D:实现高保真和可控 纹理 3D 资产的生成_第1张图片
虽然生成式人工智能在文本、图像、音频和视频领域取得了显著进展,但由于数据稀缺、算法限制和生态系统碎片化等根本性挑战,3D生成仍然相对不发达。为此,我们提出了Step1X-3D,一个通过以下方式解决这些挑战的开放框架:(1)一个严格的数据处理流程,处理超过500万个资产,创建一个包含200万个高质量数据集的标准化几何和纹理属性;(2)一个两阶段的3D原生架构,结合了混合VAE-DiT几何生成器和基于SD-XL的纹理合成模块;(3)模型、训练代码和适配模块的完全开源发布。对于几何生成,混合VAE-DiT组件通过采用基于感知器的潜在编码和锐利边缘采样来生成水密的TSDF表示,以保留细节。基于SD-XL的纹理合成模块通过几何条件和潜在空间同步确保跨视图一致性。基准测试结果表明,该框架在性能上超越了现有的开源方法,同时在与专有解决方案的竞争中达到了相当的质量。值得注意的是,该框架独特地桥接了2D和3D生成范式,支持将2D控制技术(例如LoRA)直接转移到3D合成中。通过同时提升数据质量、算法保真度和可重复性,Step1X-3D旨在为可控3D资产生成的开放研究建立新标准。

模型下载

模型 下载链接 大小 更新日期
Step1X-3D-geometry Huggingface 1.3B 2025-05-13
Step1X-3D-geometry-label Huggingface 1.3B 2025-05-13
Step1X-3D Texture Huggingface 3.5B 2025-05-13
Models in ModelScope ModelScope 6.1B 2025-05-14

开放过滤的高质量数据集

数据源 下载链接 大小 更新日期
Objaverse Huggingface 320K 2025-05-13
Objaverse-XL Huggingface 480K 2025-05-13
纹理合成的资产 Huggingface 30K 2025-05-13
Assets in ModelScope ModelScope 830K 2025-05-14

基于上述高质量3D资产,您可以按照Dora中的方法预处理数据以进行VAE和3D DiT训练,并按照MV-Adapter进行ig2mv训练。

安装环境

# 克隆仓库
git clone https://github.com/stepfun-ai/Step1X-3D.git
cd Step1X-3D

# 创建新的conda环境
conda create -n step1x-3d python=3.10
conda activate step1x-3d

# 安装依赖库
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.5.1+cu124.html

cd step1x3d_texture/custom_rasterizer
python setup.py install
cd ../differentiable_renderer
python setup.py install
cd ../../

推理脚本

显存占用 50 steps耗时
Step1X-3D-Geometry-1300m+Step1X-3D-Texture 27G 152秒
Step1X-3D-Geometry-Label-1300m+Step1X-3D-Texture 29G 152秒

提供以下示例代码作为教程,以按顺序生成几何和纹理。

import torch
# 阶段1:3D几何生成
from step1x3d_geometry.models.pipelines.pipeline import Step1X3DGeometryPipeline

# 定义管道
geometry_pipeline = Step1X3DGeometryPipeline.from_pretrained("stepfun-ai/Step1X-3D", subfolder='Step1X-3D-Geometry-1300m'
).to("cuda")

# 输入图像
input_image_path = "examples/images/000.png"

# 运行管道并获取无纹理网格
generator = torch.Generator(device=geometry_pipeline.device).manual_seed(2025)
out = geometry_pipeline(input_image_path, guidance_scale=7.5, num_inference_steps=50)

# 以.glb格式导出无纹理网格
out.mesh[0].export("untexture_mesh.glb")


# 阶段2:3D纹理合成
from step1x3d_texture.pipelines.step1x_3d_texture_synthesis_pipeline import (
    Step1X3DTexturePipeline,
)
from step1x3d_geometry.models.pipelines.pipeline_utils import reduce_face, remove_degenerate_face
import trimesh

# 加载无纹理网格
untexture_mesh = trimesh.load("untexture_mesh.glb")

# 定义纹理管道
texture_pipeline = Step1X3DTexturePipeline.from_pretrained("stepfun-ai/Step1X-3D", subfolder="Step1X-3D-Texture")

# 减少面
untexture_mesh = remove_degenerate_face(untexture_mesh)
untexture_mesh = reduce_face(untexture_mesh)

# 纹理映射
textured_mesh = texture_pipeline(input_image_path, untexture_mesh)

# 以.glb格式导出纹理化网格
textured_mesh.export("textured_mesh.glb")

还可以通过运行

python inference.py

来运行整个过程。

还提供了基于gradio的交互式生成,支持本地部署

python app.py

或huggingface网页demo

训练细节参考Github

你可能感兴趣的:(AI作画,3d,人工智能,开源,AIGC)