[ docs ] // Beyond chat

3D generation

arcflare gen turns a picture into a 3D mesh on your own GPU and writes a .glbyou can drop into Blender, Godot, Unity or a web page. There's no upload and no credits, so iterating costs nothing.

In two commands#

arcflare gen setup hunyuan3d-2mini --torch cuda
arcflare gen 3d chair.png
  ✓ C:\work\chair-hunyuan3d-2mini.glb
  38,912 faces · 1.9 MB · 21.4s total · 14.2s shape · cuda

The first run downloads the model's weights. After that, generation never touches the network. Run arcflare genon its own to see every model and whether it's ready.

The models#

ModelSizeVRAMText→3DNotes
hunyuan3d-2mini0.6B~5 GByesThe default. Clean shapes, modest VRAM.
hunyuan3d-2mini-turbo0.6B~5 GByesStep-distilled + FlashVDM: 5 steps, seconds not a minute.
hunyuan3d-2mini-fast0.6B~5 GByesGuidance-distilled: about twice as fast as mini, nearly the same shapes.
hunyuan3d-21.1B~6 GB · 16 texturedyesFull 2.0 shape model; --texture paints it.
hunyuan3d-2-turbo1.1B~6 GB · 16 texturedyesFull-size 2.0 in 5 steps with FlashVDM.
hunyuan3d-2.13.3B~10 GB—Most detailed shapes. Texturing not wired up yet.
triposr0.4B~6 GB—One forward pass: under a second, rougher, vertex colours.

Make one the default with arcflare gen default hunyuan3d-2mini-turbo.

Licences

The Hunyuan3D models use the Tencent Hunyuan 3D Community License. Commercial use is allowed below a user threshold, and the licence excludes some territories (the EU, UK and South Korea). Read it before you ship anything. TripoSR is MIT.

Setup#

These are PyTorch pipelines, not GGUFs, so llama.cpp can't run them. ArcFlare keeps a separate Python environment in ~/.arcflare/gen. arcflare gen setup <model> does four things:

  • creates ~/.arcflare/gen/venv from a Python 3.10+ it finds (py -3, python3, python)
  • clones the model's code into ~/.arcflare/gen/repos
  • installs its requirements, minus torch. A pinned torch would replace your working GPU build with whatever PyPI resolves to
  • imports the model's code on your actual device and lists anything missing

Torch: you choose the build

The right torch depends on your GPU vendor, driver and OS. A wrong guess is a multi-GB download that then runs on the CPU. So setup only installs torch when you name the build:

Your machineUse
NVIDIA (Windows or Linux)--torch cuda
AMD on Linux--torch rocm
AMD on Windows--torch-from <python> (see below)
Apple Silicon--torch cpu installs the standard wheel, which uses Metal (mps)
No GPU--torch cpu. It works, but takes many minutes per mesh

AMD on Windows: borrow a working torch

There is no official ROCm torch for Windows. If another tool on your machine already has a working one, ArcFlare can borrow it:

arcflare gen setup hunyuan3d-2mini --torch-from C:\path\to\other\.venv\Scripts\python.exe
  • The other environment's packages become importable from ArcFlare's venv, read-only, and nothing is ever installed into it.
  • The venv is built from the same Python version, because torch is compiled for one Python version and a 3.13 venv can't load a 3.12 torch.
  • torchvision has to come from the same place as torch. The regular PyPI torchvision fails next to a ROCm build with operator torchvision::nms does not exist. If the donor environment lacks it, setup says so. Install the matching torchvision into that environment, from wherever its torch came from.

Already have an environment with everything installed? Use it directly, with no venv at all:

arcflare gen python C:\path\to\python.exe

Textures

arcflare gen setup hunyuan3d-2 --texture

This builds Hunyuan's two texture extensions from CUDA source, so it needs an NVIDIA GPU, the CUDA toolkit and a C++ compiler. Shape generation works without them on any GPU torch supports.

Check it again later

arcflare gen check hunyuan3d-2mini

Prints the interpreter, torch version, device, free VRAM and whether the model's code imports.

Generating#

arcflare gen 3d photos/lamp.jpg -m hunyuan3d-2mini-turbo --octree 380
arcflare gen 3d --prompt "a low-poly wooden treasure chest" -m hunyuan3d-2
FlagDefaultDoes
-m, --modelhunyuan3d-2miniWhich generator
--prompt "…"—Text → image (HunyuanDiT) → mesh; hunyuan3d-2 family only
-o, --outnext to the imageOutput .glb path. Prompt meshes go to ~/.arcflare/gen/out
--steps30 (turbo 5)Diffusion steps: more is slower and slightly cleaner
--octree256Mesh resolution. 380 is finer and slower; lower it if you run out of memory
--faces40000Simplify to at most this many faces
--seed1234Same seed and image give the same mesh
--textureoffPaint a texture (hunyuan3d-2 family, NVIDIA)
--keep-backgroundoffSkip automatic background removal
--deviceautocuda, mps or cpu. ROCm reports as cuda

Getting a good mesh#

The image is the model. Image-to-3D reproduces exactly what the picture shows, and every flaw in it becomes geometry.

  • One whole object, centred, nothing cropped at the edges.
  • A three-quarter view shows more of the shape than a straight-on one.
  • Flat, even light. Hard shadows get baked into the shape.
  • Plain background. It's removed automatically, but a cut-out PNG with transparency skips that step.
  • Iterate with the turbo variant or TripoSR, then regenerate the keeper with full Hunyuan3D at --octree 380.
  • Text-to-3D is a picture first: if the mesh is wrong, the generated image usually was too. A photo you picked beats one generated for you.

From the agent, and into Blender#

The machine server exposes generation as three tools, so arcflare agent, Claude Code or any MCP client can make meshes:

ToolDoes
generate_modelsWhich models are installed, their VRAM, and the Python that runs them
generate_3dImage or prompt → .glb. Waits up to wait_s (default 240), then returns a job id
generate_jobWait for, check on, or cancel a running job

A first run downloads weights and a CPU run takes minutes, but an MCP call has a time limit. So long jobs keep running and hand back an id rather than timing out. Jobs stop when the client disconnects, because a GPU job nobody is waiting for still holds VRAM.

ask the agent
❯ make a mesh from ref/teapot.png and render it in Blender

  ⚙ generate_3d ref/teapot.png
  └ mesh ok · hunyuan3d-2mini · 19.8s
  ⚙ blender_run import the glb, add a camera and a light
  ⚙ blender_render scene.blend

Where things live#

PathHolds
~/.arcflare/gen/venvThe Python environment (delete it to start over)
~/.arcflare/gen/reposModel code: Hunyuan3D-2, Hunyuan3D-2.1, TripoSR
~/.arcflare/gen/modelsHunyuan weights (HY3DGEN_MODELS)
~/.arcflare/gen/hfOther Hugging Face downloads (HF_HUB_CACHE)
~/.arcflare/gen/outMeshes made from a prompt

Setting HY3DGEN_MODELS or HF_HUB_CACHE yourself points ArcFlare at weights you already downloaded.

Troubleshooting#

You seeIt means
torch sees no GPUThe torch build is CPU-only. Re-run setup with --torch cuda, --torch rocm or --torch-from.
cannot import hy3dgen.shapegenThe model code or a requirement is missing. Re-run setup and read the pip output.
No module named 'torchvision'Install torchvision built for your torch (with --torch-from, into the donor environment).
operator torchvision::nms does not existtorchvision doesn't match torch. Install the matching build and remove the mismatched one.
out of memoryLower --octree, use a smaller model or drop --texture, and close other GPU work.
worker exited … reported nothingPython crashed before reporting. The lines under the error are its last output.