Tri Mesh Input Switch JK๐
The TriMesh switch built for Hunyuan 3D workflows
- trimesh_false
- trimesh_true
- trimesh_output
- boolean
The 3D side of ComfyUI has a problem the image side never did: objects like meshes are heavy, type-specific, and awkward to route around. TriMesh Input Switch JK is the boring fix - a boolean-controlled toggle between two triangle-mesh inputs - and Jake added it in v1.9.7 specifically for his Hunyuan 3D Wrapper img2mesh workflows, where you often want to swap which reconstructed mesh feeds the next stage (texture sampling, MV generation, remeshing) without rewiring a forest of cables.
If you don't touch 3D nodes, skip this one. If you do, it's the same logic as the rest of the JK switch family - only the payload is a TRIMESH object rather than a string or tensor. You get a trimesh_output plus a boolean pass-through, so you can carry the condition along for the next switch in the chain.
The inputs are the story:
boolean_value- the selector. False pickstrimesh_false, true pickstrimesh_true.trimesh_false- required, the default mesh.trimesh_true- optional, the alternate. Unconnected means the node always passestrimesh_false, same trap as every switch in this family.
That "optional true" pattern is worth understanding: because the node treats an unconnected trimesh_true as "don't switch," you can wire it up late without breaking an existing graph. It also means a workflow that shipped with just the false branch keeps running if someone loads it without the alternate mesh.
Under the hood it's a pure pass-through - no mesh is copied, transformed, or touched. It just hands one object back down the wire, which matters on 3D packs where meshes carry texture arrays and can be genuinely heavy; a switch that duplicated data would be a disaster.
Install. It's part of ComfyUI-JakeUpgrade. ComfyUI Manager โ "JakeUpgrade", or:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt
Windows portable: install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt. Restart. No model downloads - the mesh types themselves come from your 3D pack (ComfyUI-3D-Pack, Hunyuan3D Wrapper), not from JakeUpgrade.
Gotchas: the TRIMESH type won't exist unless a 3D custom node provides it, so this switch is useless until you've got a 3D pack installed - install those first, then JakeUpgrade. And if a JK node you loaded is suddenly "missing," check config.ini's LOAD_DEPRECATED_NODES flag; also heed the README's note to disable ComfyUI MultiGPU, which throws CUDA errors on current ComfyUI builds.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_value | BOOLEAN | false | Condition to select between inputs (True=trimesh_true, False=trimesh_false) |
| trimesh_false | TRIMESH | Triangle mesh to return when condition is False | |
| trimesh_trueopt | TRIMESH | Triangle mesh to return when condition is True (optional) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| trimesh_output | TRIMESH | โ |
| boolean | BOOLEAN | โ |