Index
2026-04-30 — Research

Multi-view Layout × Text Prompt 비교 — dreamzero T-자형 vs GR00T-Dreams 2×2

dreamzero / GR00T-Dreams | multi-view stitching 설계 분석

TL;DR

1 배경 / 목적

dreamzero와 GR00T-Dreams 두 repo 모두 multi-view 로봇 비디오를 단일 frame으로 stitching해 Cosmos/Wan 모델에 입력한다. 두 repo의 layout 방식과 그에 대응하는 text prompt 템플릿이 어떻게 설계되어 있는지 코드 레벨에서 파악하고, 향후 통합·이식 시 참조할 수 있도록 정리.

핵심 질문: layout이 다른데 같은 Cosmos 모델을 쓰면 어떻게 되는가? → layout-prompt가 학습 시 함께 주입되므로, inference에서도 동일한 layout+prompt를 써야 함. 불일치 시 모델이 view 배치를 잘못 해석.

2 작업 내용

두 repo 코드 직접 분석:

3 결과

Layout 구조 비교

dreamzero — T-자형 (480×832)
┌─────────────────────────┐
│   wrist (×2 wide, 복제)  │  상단
├────────────┬────────────┤
│  left_ext  │ right_ext  │  하단
└────────────┴────────────┘
각 셀: 240×416. wrist 1개를 좌우 복제해 상단 전체.
GR00T-Dreams — 2×2 (480×832)
┌────────────┬────────────┐
│  ext_left  │ ext_right  │  상단
├────────────┼────────────┤
│   wrist    │   BLACK    │  하단 (우하단 항상 검정)
└────────────┴────────────┘
각 셀: 240×416. 우하단은 학습·inference 모두 검정.

Prompt 템플릿 비교

【dreamzero — OXE_DROID】 "A multi-view video shows that a robot {task} The video is split into three views: The top view shows the camera view from the robot's wrist, the bottom-left view shows the camera view from the left exterior camera, and the bottom-right view shows the camera view from the right exterior camera. During training, one of the two bottom exterior views may be a black screen (dropped view). The robot {task}" 【GR00T-Dreams — DROID 4-quadrant】 "A multi-view video shows that a robot {task} The video is split into four views: The top-left view shows the robotic arm from the left side, the top-right view shows it from the right side, the bottom-left view shows a first-person perspective from the robot's end-effector (gripper), and the bottom-right view is a black screen (inactive view). The robot {task}"

전체 비교 요약

항목dreamzeroGR00T-Dreams
View 수3 (wrist + L/R ext)3 + black filler
상단wrist 1개 좌우 복제ext_left / ext_right
하단left_ext / right_extwrist / black
빈 영역training 시 view dropout 가능우하단 항상 검정
Tokenizergoogle/umt5-xxlT5(학습 캐시) / Qwen chat(inference)
사전 캐시없음 (런타임 토큰화).pickle T5 임베딩 캐시
System role없음 (raw text)Qwen path: system msg 있음
Instruction 반복앞뒤 2회앞뒤 2회
Max length512512
Inference prefix 옵션--prompt_prefix 지원

텍스트 인코딩 → 모델 진입 경로

단계dreamzeroGR00T-Dreams
토큰화dreamzero_cotrain.py:153
런타임 tokenizer(output_values)
학습: dataset_video.py:124 .pickle 로드
Inference: text_encoder.py Qwen/T5
DiT 진입wan_flow_matching_action_tf.py:566
encode_prompt(input_ids, mask)
padding을 0으로 zero-out
video2world_gr00t.py
Qwen: chat template → hidden states
T5: batch_encode_plus → embeddings
공통 설계 원칙: 두 repo 모두 instruction을 앞뒤 2회 삽입, 빈/dropout view를 prompt에 명시. "layout과 prompt가 짝지어 학습된다" — view 위치를 자연어로 명시해 모델이 spatial 배치를 텍스트로부터 disambiguate 가능하도록 설계.

4 Takeaway

이식·통합 시 layout-prompt 쌍을 반드시 함께 옮겨야 함

GR00T-Dreams의 Cosmos 모델(mg30_real iter_47200)은 2×2 grid(ext_left/right 상단, wrist 좌하단, black 우하단) + DROID_PROMPT_TEMPLATE으로 학습됨. 이 모델을 dreamzero 코드베이스로 이식하거나 반대 방향으로 이식할 때, layout만 바꾸면 모델이 잘못된 view를 wrong position으로 해석하여 생성 품질이 심하게 저하됨.

DreamGen datagen에서는 GR00T-Dreams의 2×2 layout + DROID_PROMPT_TEMPLATE을 그대로 사용 중 — 이 일관성이 Cosmos 추론 품질의 핵심.

5 Next Steps

미해결: dreamzero T-자형 → Cosmos 이식 가능성

dreamzero가 OXE_DROID embodiment로 학습한 Cosmos/Wan 모델이 있다면, T-자형 layout으로 별도 학습된 모델을 써야 함. GR00T-Dreams의 2×2 Cosmos 모델을 T-자형 dreamzero에 그냥 쓰면 view 혼동 발생.

참조 포인트

  • dreamzero layout 구현: dreamzero_cotrain.py:318-355
  • GR00T-Dreams layout 구현: scripts/prepare_robocasa_for_cosmos.py:42-64
  • DROID_PROMPT_TEMPLATE 사용처: prepare_robocasa_for_cosmos.py:207, scripts/build_datagen_seeds.py:177-178
  • Cosmos T5 캐시 로드: cosmos_predict2/data/dataset_video.py:124-141