cd /news/artificial-intelligence/building-an-image-to-glb-workflow-wi… · home › topics › artificial-intelligence › article
[ARTICLE · art-176693] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Building an Image-to-GLB Workflow with Hunyuan3D 2.1

A developer documented a workflow for turning a single image into a GLB 3D model using Tencent's open-source Hunyuan3D 2.1, covering local setup with PyTorch 2.5.1, launching the bundled Gradio interface in low-VRAM mode, and calling the local API server to generate textured meshes. The writeup stresses that outputs should be treated as editable starting assets rather than finished production models, since the system must infer surfaces not visible in the source image, and recommends fixing the seed while testing and inspecting results in the target environment.

key takeaway

Hunyuan3D 2.1 can turn a single image into an exported GLB via its local Gradio app or API server, but the mesh is only a starting asset—validate shape generation before texture generation and keep the seed fixed while testing.

by read2 min views1 publishedNov 26, 2026

Turning a single image into a GLB model

Image-to-3D is useful when a project needs a fast 3D starting point instead of a manually built model from scratch.

Tencent’s Hunyuan3D 2.1 is an open-source image-to-3D system. Given a source image, it can generate a mesh and export a result in GLB format. That makes it relevant for product prototypes, web-based 3D previews, game-prop experiments, and early AR concepts.

The result should be treated as a starting asset, not a finished production model. The model has to infer surfaces that are not visible in the input image, so quality still depends heavily on the source image and the final use case.

Official project:

https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1 Start with the right image

For an initial test, choose an image with:

pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 \

  --index-url [https://download.pytorch.org/whl/cu124](https://download.pytorch.org/whl/cu124)

pip install -r requirements.txt

The full texture-generation workflow includes additional dependencies. For a first test, it is better to validate that shape generation works before spending time on texture generation and rendering settings.

Run the local interface

Hunyuan3D 2.1 includes a local Gradio interface. After the environment and model files are ready, launch it with:

python3 gradio_app.py \

  --model_path tencent/Hunyuan3D-2.1 \

  --subfolder hunyuan3d-dit-v2-1 \

  --texgen_model_path tencent/Hunyuan3D-2.1 \

  --low_vram_mode

Upload a single image, generate the initial model, and export the output as GLB.

The first goal is not to create the perfect asset. It is to confirm that the full path works:

Start the server:

python api_server.py

Then open the local API documentation:

http://localhost:8081/docs A minimal Python request can look like this:

import base64import requestswith open("input_image.png", "rb") as file: image_data = base64.b64encode(file.read()).decode()payload = { "image": image_data, "texture": True, "seed": 42, "type": "glb"}response = requests.post( "http://localhost:8081/generate", json=payload, timeout=600)response.raise_for_status()with open("output_model.glb", "wb") as file: file.write(response.content) The seed is useful when comparing changes. Keep it fixed while testing a new image or parameter, then change it only when you want alternative results.

What to check after export

A generated GLB file can look good from the source angle but still have issues elsewhere. Before using it in a project, inspect:

That is why a sensible first test is:

A cleaner image with one obvious object will usually save more time than endlessly changing parameters. Once the first GLB file is generated, inspect it in the actual environment where it will be used and treat it as an editable starting point.

Official API reference:

https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1/blob/main/API_DOCUMENTATION.md Disclosure: I’m building GanAI360, a Chinese-language AI resource site. I also collected a more detailed Hunyuan3D guide covering image-to-3D generation, ComfyUI workflows, model setup, and GLB export here:https://ganai360.com/news/comfyui-hunyuan3d-2-1-workflow/

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @tencent 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/building-an-image-to…] indexed:0 read:2min 2026-11-26 · —