> ## 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.

# TRELLIS.2 이미지 기반 3D 생성 ComfyUI 워크플로 예제

> Microsoft의 오픈소스 4B 파라미터 이미지 기반 3D 생성 모델인 TRELLIS.2를 사용하여 단일 이미지에서 전체 PBR 텍스처가 포함된 고품질 3D 모델을 생성합니다.

**TRELLIS.2**는 Microsoft Research에서 개발한 오픈소스 이미지 기반 3D 생성 모델로, TRELLIS의 후속 모델입니다. 16배 공간 압축을 지원하는 네이티브 3D VAE와 O-Voxel이라는 희소 복셀 표현을 기반으로 구축된 4B 파라미터 모델로, 단일 이미지에서 전체 PBR 머티리얼을 갖춘 정밀한 3D 에셋을 생성합니다.

TRELLIS.2는 Pixal3D와 기본 아키텍처를 공유합니다. 두 모델 모두 동일한 DINOv3 이미지 인코더, 동일한 형태 및 텍스처 VAE, 동일한 구조·형태·텍스처 생성 단계를 사용합니다. 주요 diffusion 모델과 조건화 형식만 다릅니다. [Pixal3D 워크플로](/ko/tutorials/3d/pixal3d)를 실행해 본 적이 있다면 모델 설정은 거의 동일합니다.

<h3 id="trellis2">
  TRELLIS.2: 이미지를 모델로
</h3>

단일 이미지를 업로드하세요. TRELLIS.2를 사용하여 전체 PBR 텍스처가 포함된 고품질 3D 모델을 생성하세요.

이 워크플로에는 Pixal3D 파이프라인도 포함되어 있습니다. TRELLIS.2를 실행하려면 `Boolean (Switch to Trellis2)` 노드를 `true`로 설정합니다. 워크플로가 TRELLIS.2 모델과 컨디셔닝으로 자동 전환됩니다.

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/3d_pixal3d_trellis2_image_to_model-1.webp" alt="TRELLIS.2 워크플로 미리보기" />

<Tip>
  <Tabs>
    <Tab title="로컬 사용자">
      ComfyUI가 최신 버전으로 업데이트되었는지 확인하세요.

      * [ComfyUI 다운로드](https://www.comfy.org/download)
      * [업데이트 가이드](/ko/installation/update_comfyui)

      이 가이드의 워크플로는 [워크플로 템플릿](/ko/interface/features/template)에서 확인할 수 있습니다.
      템플릿에서 찾을 수 없다면, 귀하의 ComfyUI가 오래된 버전일 수 있습니다.

      워크플로를 로드할 때 노드가 누락되는 경우, 가능한 원인:

      1. 최신 ComfyUI 버전(최신 테스트 버전(nightly))을 사용하고 있지 않음
      2. 일부 노드가 시작 시 가져오기에 실패함
    </Tab>

    <Tab title="클라우드 사용자">
      * [클라우드](https://cloud.comfy.org)는 ComfyUI 안정판 출시 후 업데이트됩니다.

      따라서 이 문서에서 핵심 노드가 누락된 것을 발견했다면, 그 이유는 새로운 핵심 노드가 아직 최신 안정판에 공개되지 않았기 때문일 수 있습니다. 다음 안정판 출시를 기다려 주세요.
    </Tab>
  </Tabs>
</Tip>

<CardGroup cols={2}>
  <Card title="Comfy Cloud에서 실행" icon="cloud" href="https://cloud.comfy.org/?template=3d_pixal3d_trellis2_image_to_model&utm_source=docs&utm_medium=referral&utm_campaign=trellis2">
    이 워크플로를 Comfy Cloud에서 즉시 실행하세요.
  </Card>

  <Card title="워크플로 다운로드" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/3d_pixal3d_trellis2_image_to_model.json">
    JSON을 다운로드하거나 템플릿 라이브러리에서 "Pixal3D & TRELLIS.2: Image to Model"을 검색하세요.
  </Card>
</CardGroup>

**입력 파일**

이 파일을 `LoadImage` 노드에 업로드하세요:

<CardGroup cols={1}>
  <Card title="viking_wolf_rune_axe.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/viking_wolf_rune_axe.png">
    `LoadImage` 노드 122 · `viking_wolf_rune_axe.png`
  </Card>
</CardGroup>

<div style={{display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '1rem', alignItems: 'start'}}>
  <img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/viking_wolf_rune_axe.png" alt="입력 이미지" style={{width: '100%', height: 'auto', objectFit: 'contain'}} />
</div>

## 작동 방식

TRELLIS.2는 세 개의 diffusion 단계를 거쳐 3D 에셋을 생성한 다음, 전체 메시 후처리 파이프라인을 실행합니다:

1. **배경 제거**: BiRefNet이 입력 이미지에서 배경을 제거하고, 워크플로는 피사체를 중앙 정렬된 1024×1024 캔버스로 크롭합니다. 전환을 사용하면 배경 제거를 건너뛸 수 있습니다.
2. **TRELLIS.2 파이프라인으로 전환**: `Boolean (Switch to Trellis2)`을 `true`로 설정합니다. 워크플로가 TRELLIS.2 모델을 자동으로 로드합니다
3. **구조 생성**: 희소 구조 잠재 데이터를 샘플링하여 복셀로 디코딩한 다음, 대략적인 메시로 변환합니다.
4. **형태 정제**: 형태 단계와 업샘플링 단계가 메시를 목표 해상도(1536)까지 정제합니다.
5. **텍스처 생성**: 텍스처 diffusion 단계가 PBR 재질 복셀(기본 색상, 금속성, 거칠기)을 생성합니다.
6. **후처리**: DC 리메시, QEM 데시메이션, UV 언랩핑, 그리고 기본 색상·노멀(normal)·앰비언트 오클루전 맵을 최종 텍스처 메시에 베이킹합니다.

## 실행 단계

1. **이미지 로드**: `LoadImage` 노드를 사용하여 객체의 단일 이미지를 로드합니다.
2. **워크플로 실행 대기열에 추가**: Ctrl(macOS의 경우 Cmd) + Enter를 누릅니다.
3. **pipeline 대기**: 구조, 형태, 텍스처 단계가 순서대로 실행된 후 후처리가 이어집니다.
4. **결과 확인**: `Preview3DAdvanced` 노드에서 메시를 확인합니다. GLB 파일은 `ComfyUI/output/3d/ComfyUI/`에 저장됩니다.

## 모델 다운로드

이 워크플로에서 사용하는 모델을 다운로드합니다. 두 확산 모델이 모두 필요합니다. 스위치가 어떤 모델을 실행할지 선택합니다. 해당 `models/` 하위 디렉터리에 배치합니다.

<CardGroup cols={2}>
  <Card title="TRELLIS.2 UNet 모델" icon="download" href="https://huggingface.co/Comfy-Org/TRELLIS.2/blob/main/diffusion_models/trellis_2_int8_convrot.safetensors">
    trellis\_2\_int8\_convrot.safetensors: TRELLIS.2 확산 모델 (스위치가 `true`일 때 로드)
  </Card>

  <Card title="Pixal3D UNet 모델" icon="download" href="https://huggingface.co/Comfy-Org/Pixal3D/blob/main/diffusion_models/pixal3d_int8_convrot.safetensors">
    pixal3d\_int8\_convrot.safetensors: Pixal3D 확산 모델 (기본으로 로드)
  </Card>

  <Card title="셰이프 VAE" icon="download" href="https://huggingface.co/Comfy-Org/TRELLIS.2/blob/main/vae/trellis_2_shape_vae_bf16.safetensors">
    trellis\_2\_shape\_vae\_bf16.safetensors: 구조 및 셰이프 디코딩용 VAE
  </Card>

  <Card title="텍스처 VAE" icon="download" href="https://huggingface.co/Comfy-Org/TRELLIS.2/blob/main/vae/trellis_2_texture_vae_bf16.safetensors">
    trellis\_2\_texture\_vae\_bf16.safetensors: 텍스처 디코딩용 VAE
  </Card>

  <Card title="DINOv3 CLIP 비전" icon="download" href="https://huggingface.co/Comfy-Org/Pixal3D/blob/main/clip_vision/dino_v3_L_naf_fp32.safetensors">
    dino\_v3\_L\_naf\_fp32.safetensors: 이미지 컨디셔닝용 CLIP 비전 인코더. TRELLIS.2 저장소의 동급 dino\_v3\_vit\_l.safetensors도 사용할 수 있습니다
  </Card>

  <Card title="BiRefNet 배경 제거" icon="download" href="https://huggingface.co/Comfy-Org/BiRefNet/blob/main/background_removal/birefnet.safetensors">
    birefnet.safetensors: 전처리용 배경 제거 모델
  </Card>
</CardGroup>

### 모델 저장 위치

```
📂 ComfyUI/
├── 📂 models/
│   ├── 📂 diffusion_models/
│   │      ├── pixal3d_int8_convrot.safetensors
│   │      └── trellis_2_int8_convrot.safetensors
│   ├── 📂 vae/
│   │      ├── trellis_2_shape_vae_bf16.safetensors
│   │      └── trellis_2_texture_vae_bf16.safetensors
│   ├── 📂 clip_vision/
│   │      └── dino_v3_L_naf_fp32.safetensors
│   └── 📂 background_removal/
│          └── birefnet.safetensors
```
