Hy3D Torch Compile Settings
The speed-up knob for the shape model — torch.compile, configured from a widget
- torch_compile_args
Hy3DTorchCompileSettings is a settings node, not a doing node. It doesn't render, sample, or decode anything - it produces a HY3DCOMPILEARGS blob that you plug into Hy3DModelLoader's optional compile_args input. When connected, the shape model's transformer blocks and VAE get torch.compile'd at load time. Same model, same results, fewer seconds per step. The node's own description is honest about the catch: "Requires Triton and torch 2.5.0 is recommended."
That last sentence is the whole review. torch.compile is a real speedup for this DiT - the community runs it on Linux and loves it - but it's also the single most system-dependent optimization in the pack. On a Linux box with a matching torch + Triton, it's basically free performance. On Windows, Triton has historically been a pain point (the README even links the triton-windows project's build notes), and a compile that fights your environment can eat more time than it saves.
The inputs, briefly
backend-inductor(default) orcudagraphs.inductoris the standard full-featured backend;cudagraphsis a leaner CUDA-graph path.mode-default,max-autotune,max-autotune-no-cudagraphs,reduce-overhead.max-autotunesearches harder for the fastest kernels at the cost of a much longer first-compile;defaultis the sensible start.compile_transformer(default on) - compiles the shape model's transformer blocks (the author's tooltip calls them "single blocks").compile_vae(default on) - compiles the VAE ("double blocks"). Both on is the point; that's the whole model.fullgraph,dynamic- advanced torch.compile flags; leave off unless you know you need dynamic shapes.dynamo_cache_size_limit(default 64) -torch._dynamo.config.cache_size_limit; higher tolerates more graph variants before recompiling.
Output is torch_compile_args (HY3DCOMPILEARGS), which only plugs into Hy3DModelLoader.compile_args. That's its only consumer in the pack.
The gotcha: it's all-or-nothing at load
The compile happens at model load, not at first sample - so your first workflow run after wiring this in gets a long stall while inductor grinds through the graph (that's the max-autotune wait, usually minutes). It's a one-time cost per load, but it's easy to mistake for a hang. If anything in your toolchain is off, the load itself can fail.
That's also the escape hatch: the node is entirely optional. Unplug it, and Hy3DModelLoader loads uncompiled and runs fine. The settings only ever attempt compile.
Install
Same pack clone (Manager search "Hunyuan3DWrapper", or git clone https://github.com/kijai/ComfyUI-Hunyuan3DWrapper, pip install -r requirements.txt) - the Triton requirement is a runtime one, not a pack one. Get Triton in your environment on its own:
pip install triton # Linux: works with your torch's CUDA build
Windows users: check the triton-windows builds referenced in the README, or skip the node.
Common issues
- Load hangs for minutes on first run - that's the compile working; wait once, then it's cached per run.
- Load crashes after wiring it in - Triton/torch mismatch. Unplug
compile_argsand the workflow runs uncompiled. - "No speedup" - some GPU/driver combos just don't get much from inductor. Compare
defaultvsmax-autotuneonce before assuming the node is broken.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| backend | COMBO | inductor | 2 options: inductor, cudagraphs |
| fullgraph | BOOLEAN | false | Enable full graph mode |
| mode | COMBO | default | 4 options: default, max-autotune, max-autotune-no-cudagraphs, reduce-overhead |
| dynamic | BOOLEAN | false | Enable dynamic mode |
| dynamo_cache_size_limit | INT | 640–1024 | torch._dynamo.config.cache_size_limit |
| compile_transformer | BOOLEAN | true | Compile single blocks |
| compile_vae | BOOLEAN | true | Compile double blocks |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| torch_compile_args | HY3DCOMPILEARGS | — |