> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# VaeDecodeShapeTrellis - ComfyUI Built-in Node Documentation

> This node decodes Trellis2 shape latent representations into a 3D mesh.

This node decodes Trellis2 shape latent representations into a 3D mesh. It uses a VAE to convert sparse shape latent data into mesh geometry and also outputs shape subdivision data generated during decoding. The node supports both single and batched latent inputs and automatically adjusts the mesh orientation to the expected coordinate frame.

## Inputs

| Parameter | Description                                                                                                                                                                                                                                                                   | Data Type | Required | Range |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | ----- |
| `samples` | The latent samples to decode, including the sample tensor and sparse coordinate data. The latent dictionary may also contain optional fields: `coord_counts` for batched shapes, `coord_resolution` to control mesh resolution, and `model_frame` for coordinate orientation. | LATENT    | Yes      | None  |
| `vae`     | The VAE model used to decode the shape latent into a mesh.                                                                                                                                                                                                                    | VAE       | Yes      | None  |

### Notes on `samples`

* The `samples` input is a latent dictionary that must contain the `samples` tensor and the `coords` sparse coordinates.
* If `coord_counts` is present, it must be a 1D tensor of non-negative integers, and the sum of all counts must equal the total number of coordinate rows. Each count represents one shape in the batch.
* If `coord_resolution` is provided, the mesh resolution is calculated as `coord_resolution * 16`. Otherwise, the VAE’s built-in resolution buffer is used (default value: 1024).
* If `model_frame` is set to `"z_up"`, the decoded mesh vertices are rotated from a Z-up coordinate system to the Y-up convention used by glTF. The default value is `"y_up"`.

## Outputs

| Output Name        | Description                                                            | Data Type         |
| ------------------ | ---------------------------------------------------------------------- | ----------------- |
| `mesh`             | The decoded 3D mesh, containing vertex positions and face indices.     | MESH              |
| `shape_subdivides` | Shape subdivision data produced at each stage of the decoding process. | SHAPE\_SUBDIVIDES |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/VaeDecodeShapeTrellis/en.md)

***

**Source fingerprint (SHA-256):** `50f1b8200bd750671473278aaf94e6b08d6f9a6a72d5d1dc882ea7ab87084681`
