<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: steve</title>
    <description>The latest articles on DEV Community by steve (@steve_019d4db7e87ce55ae3d).</description>
    <link>https://dev.to/steve_019d4db7e87ce55ae3d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4266453%2F0232cc25-dad9-4be2-b0f6-0fd2033a96e2.png</url>
      <title>DEV Community: steve</title>
      <link>https://dev.to/steve_019d4db7e87ce55ae3d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/steve_019d4db7e87ce55ae3d"/>
    <language>en</language>
    <item>
      <title>Building an Image-to-GLB Workflow with Hunyuan3D 2.1</title>
      <dc:creator>steve</dc:creator>
      <pubDate>Thu, 26 Nov 2026 09:35:14 +0000</pubDate>
      <link>https://dev.to/steve_019d4db7e87ce55ae3d/building-an-image-to-glb-workflow-with-hunyuan3d-21-4e3g</link>
      <guid>https://dev.to/steve_019d4db7e87ce55ae3d/building-an-image-to-glb-workflow-with-hunyuan3d-21-4e3g</guid>
      <description>&lt;p&gt;Turning a single image into a GLB model&lt;br&gt;
Image-to-3D is useful when a project needs a fast 3D starting point instead of a manually built model from scratch.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Official project:&lt;br&gt;
&lt;a href="https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1" rel="noopener noreferrer"&gt;https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1&lt;/a&gt;&lt;br&gt;
Start with the right image&lt;br&gt;
For an initial test, choose an image with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One clearly visible object&lt;/li&gt;
&lt;li&gt;A simple or removable background&lt;/li&gt;
&lt;li&gt;Sharp object boundaries&lt;/li&gt;
&lt;li&gt;Even lighting&lt;/li&gt;
&lt;li&gt;Limited reflections and motion blur
A clean product image usually produces a more predictable model than a crowded lifestyle photo. Transparent materials, thin wires, hands, dense text, and overlapping objects are more difficult because the system has less reliable visual information to work with.
Local setup
The official Hunyuan3D 2.1 repository lists Python 3.10 and PyTorch 2.5.1 with CUDA 12.4 as its tested environment.
git clone &lt;a href="https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1.git" rel="noopener noreferrer"&gt;https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1.git&lt;/a&gt;
cd Hunyuan3D-2.1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 \&lt;br&gt;
  --index-url &lt;a href="https://download.pytorch.org/whl/cu124" rel="noopener noreferrer"&gt;https://download.pytorch.org/whl/cu124&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;pip install -r requirements.txt&lt;/p&gt;

&lt;p&gt;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.&lt;br&gt;
Run the local interface&lt;br&gt;
Hunyuan3D 2.1 includes a local Gradio interface. After the environment and model files are ready, launch it with:&lt;br&gt;
python3 gradio_app.py \&lt;br&gt;
  --model_path tencent/Hunyuan3D-2.1 \&lt;br&gt;
  --subfolder hunyuan3d-dit-v2-1 \&lt;br&gt;
  --texgen_model_path tencent/Hunyuan3D-2.1 \&lt;br&gt;
  --low_vram_mode&lt;/p&gt;

&lt;p&gt;Upload a single image, generate the initial model, and export the output as GLB.&lt;/p&gt;

&lt;p&gt;The first goal is not to create the perfect asset. It is to confirm that the full path works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Input image is loaded correctly.&lt;/li&gt;
&lt;li&gt;The system generates a mesh.&lt;/li&gt;
&lt;li&gt;The GLB file exports successfully.&lt;/li&gt;
&lt;li&gt;The model opens in Blender, a web viewer, or the target engine.
Calling the local API
For developers integrating the workflow into another application, Hunyuan3D also includes a FastAPI server.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Start the server:&lt;br&gt;
python api_server.py&lt;/p&gt;

&lt;p&gt;Then open the local API documentation:&lt;br&gt;
&lt;a href="http://localhost:8081/docs" rel="noopener noreferrer"&gt;http://localhost:8081/docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A minimal Python request can look like this:&lt;br&gt;
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(    "&lt;a href="http://localhost:8081/generate" rel="noopener noreferrer"&gt;http://localhost:8081/generate&lt;/a&gt;",    json=payload,    timeout=600)response.raise_for_status()with open("output_model.glb", "wb") as file:    file.write(response.content)&lt;/p&gt;

&lt;p&gt;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.&lt;br&gt;
What to check after export&lt;br&gt;
A generated GLB file can look good from the source angle but still have issues elsewhere. Before using it in a project, inspect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The overall silhouette&lt;/li&gt;
&lt;li&gt;Hidden and back-facing surfaces&lt;/li&gt;
&lt;li&gt;Texture seams&lt;/li&gt;
&lt;li&gt;Object orientation and scale&lt;/li&gt;
&lt;li&gt;Polygon density&lt;/li&gt;
&lt;li&gt;Whether the file opens correctly in the intended viewer or engine
For a quick product preview, the output may already be sufficient. For a game asset, animation pipeline, 3D print, or commercial library, expect additional cleanup in a tool such as Blender.
GPU memory is part of the workflow
According to the official repository, shape generation needs about 10 GB of VRAM, texture generation about 21 GB, and the combined workflow around 29 GB.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why a sensible first test is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use one simple image.&lt;/li&gt;
&lt;li&gt;Test shape generation first.&lt;/li&gt;
&lt;li&gt;Confirm GLB export.&lt;/li&gt;
&lt;li&gt;Add texture generation only after the basic flow is stable.
This approach makes it easier to tell whether a problem comes from the source image, model setup, GPU memory, or the texture stage.
Final thoughts
Image-to-3D is becoming a practical shortcut for early 3D work, but input quality still matters more than most people expect.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Official API reference:&lt;br&gt;
&lt;a href="https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1/blob/main/API_DOCUMENTATION.md" rel="noopener noreferrer"&gt;https://github.com/Tencent-Hunyuan/Hunyuan3D-2.1/blob/main/API_DOCUMENTATION.md&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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:&lt;a href="https://ganai360.com/news/comfyui-hunyuan3d-2-1-workflow/" rel="noopener noreferrer"&gt;https://ganai360.com/news/comfyui-hunyuan3d-2-1-workflow/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>tengxunhunyuan3d</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
