Hey everyone,
If you've tried running Tencent's Hunyuan3D-2.1 locally on Windows recently—especially on a fresh Python install or a 12 GB GPU—you've probably hit a wall of crashes: broken deepspeed/bpy wheels, transformers DINOv2 key mismatches, PyTorch 2.6+ weights_only=True blocks, or silent 0xC0000005 access violations when unpacking the 7.37 GB model.fp16.ckpt file.
I put together a lightweight, MIT-licensed drop-in helper (Hunyuan3D-2.1-Windows-1Click) consisting of two small scripts (Hunyuan3D_1Click.bat + patch_hunyuan.py) that drop straight into the official repository without redistributing bloated forks or model weights.
GitHub Repo: https://github.com/amtexas98/Hunyuan3D-2.1-Windows-1Click
(Fun fact: tracking down, debugging, and stress-testing all of these Windows issues took me almost 24 hours straight so nobody else has to go through it.)
What it does: A lightweight, 1-click Windows launcher and idempotent compatibility patcher (Hunyuan3D_1Click.bat + patch_hunyuan.py) that automatically resolves dependency conflicts, PyTorch 2.6+ unpickling crashes, Windows 0xC0000005 memory violations, and 12 GB VRAM Out-Of-Memory errors when running Tencent's Hunyuan3D-2.1 Gradio app locally.
Who it's for: Indie game developers, 3D artists, mid-range GPU owners (8 GB–16 GB VRAM), and AI agent builders (Cline, Cursor, CLI scripts) who want to generate .glb 3D meshes locally on Windows without bloated forks or ComfyUI node graphs.
Source code: github.com
License: MIT License
What mine adds:
• Zero-RAM .ckpt → .safetensors Stream Converter: Existing installers and forks crash with MemoryError or 0xC0000005 when unpacking Tencent's 7.37 GB model.fp16.ckpt on Windows systems with tight free RAM. Mine reads data.pkl metadata first (MetaUnpickler) and streams individual tensor slices into a memory-mapped .safetensors file using <300 MB of RAM, cutting startup time to under 1 second.
• Modern Stack Auto-Patching: Automatically bypasses PyTorch 2.6+ weights_only=True blocks, translates legacy DINOv2 attention keys (query/key/value/output.dense → q_proj/k_proj/v_proj/o_proj) at runtime for transformers 5.x, injects trust_remote_code=True for PBR pipelines, strips Linux-only wheels (deepspeed, bpy), and repairs corrupted RealESRGAN_x4plus.pth weights—all non-destructively with .bak backups.
• Headless CLI Mode for AI Agents (v1.0.2): Supports positional arguments (Hunyuan3D_1Click.bat 1–4) to bypass interactive prompts and exit pauses so autonomous coding agents like Cline can start the server and batch-generate 3D assets via gradio_client.
Builds on: Tencent Hunyuan3D-2.1, PyTorch, Hugging Face transformers / diffusers, safetensors, and Gradio.
How it was built: AI-assisted — Spent almost 24 hours straight tracking down, debugging, and stress-testing Windows-specific PyTorch serialization bugs, transformers key mismatches, and 12 GB VRAM limits on an RTX 5070 Ti laptop until the whole pipeline worked reliably in one click.
Feedback/contributions wanted: Testing reports across different Windows 10/11 builds, Python versions (3.10–3.14), and 8 GB–16 GB GPUs, as well as PRs or suggestions for expanding automated PBR texture batching.