image_encoder=None 분기 이미 trainer에 존재, dataset 변경 최소wan_i2v_robocasa + dataset first_frame_latent slot + config robocasa_i2v.yaml 신설, 7단계 구현 후 S1~S5 smoke test 완료 시 본 학습 제출현재 robocasa 학습은 Wan2.1-T2V-1.3B-Diffusers backbone에서 동작한다. WanT2VSftTrainer.compute_loss는 16ch input의 vanilla T2V 모델에 temporal frame-0 clean clamp trick(apply_first_frame_clean_noise)을 끼워서 I2V-스러운 효과만 흉내내는 구조 — 모델 자체는 unconditional 생성을 학습하면서 frame-0 anchor만 후처리로 박는다.
wan_i2v/sft_trainer.py에 이미 구현됨)가 T2V backbone에서는 불가능.| Variant | Params | VAE | CLIP | 비고 |
|---|---|---|---|---|
| T2V-A14B | 14B×2 | Wan 2.1 호환 | None | T2V 유지 시 I2V 목표와 안 맞음 |
| I2V-A14B | 14B×2 | Wan 2.1 호환 | None | ✓ 선택 — CLIP 없음, dual expert, 최대 capacity |
| I2V-14B (2.1) | 14B×1 | Wan 2.1 | CLIP-G 필요 | dual expert 없음, CLIP 필요 |
| TI2V-5B | 5B×1 | 새 16× VAE | None | latent cache 전체 invalidate |
Wan-AI/Wan2.2-I2V-A14B-Diffusers — transformer/, transformer_2/, vae/, text_encoder/ 한 트리. ~56GB(28B×bf16).core/finetune/models/wan_i2v_robocasa/sft_trainer.py (~350 lines). compute_loss에서 native 36ch I2V conditioning + dual expert dispatch + frame-0 loss skip.RobocasaHDF5Dataset에 first_frame_latent [16,1,H,W] slot 추가. safetensors에 key 병기. cache_root 분리(robocasa_i2v_a14b).configs/robocasa_i2v.yaml. model_name: wan-i2v-robocasa, LoRA rank=64, boundary_ratio=0.875, cache_root 분리.Args.model_type literal에 wan-i2v-robocasa 추가. finetune.py의 get_model_cls에서 신규 trainer로 분기.WanRobocasaI2VPipeline 신설 — 36ch input, dual expert loop, decode 구조. trainer.py의 robocasa_hdf5 분기에서 pipe만 교체.scripts/run_robocasa_i2v.sh — run_robocasa_t2v.sh에서 CONFIG default만 i2v로 변경. 나머지 동일.구현 전 계획 단계이므로 실측 수치 없음. 아래는 설계 분석 기반 예상치.
| 항목 | 현재 (T2V 1.3B) | 목표 (I2V A14B) |
|---|---|---|
| 모델 파라미터 | 1.3B (single expert) | 28B (14B×2 dual expert) |
| Conditioning | frame-0 clamp trick (16ch) | native I2V (36ch = 16 noise + 4 mask + 16 cond) |
| CLIP 의존 | 없음 | 없음 (A14B CLIP-free) |
| VRAM (smoke test 기준) | ~40GB (1.3B LoRA) | ~81GB (A14B LoRA rank=64, HCPT Option F 기준) |
| Input channels | 16ch | 36ch |
| LoRA rank | 128 | 64 (A14B base param 많아 동등 효과) |
| Cache invalidation | — | 신규 cache_root — 기존 T2V cache 보존 |
find_unused_parameters=True 강제 (trainer.py:101 자동 활성화). ~10-15% 속도 손실 불가피.
Wan2.2-I2V-A14B 선택의 핵심은 VAE 호환성이다 — Wan 2.1과 동일한 VAE weight를 써서 latent shape/scale이 그대로 유지되므로, 기존 T2V cache의 encoded_exo_ego_gt_video를 이론상 재사용 가능하다(안전을 위해 별도 cache_root로 분리). TI2V-5B는 새 16× VAE를 써서 latent 전체 invalidate 가 불가피했으므로 기각.
CLIP-free 선택(A14B)은 dataset 구조 단순화에도 기여한다 — image_embedding cache slot 불필요, collate_fn에서 image_embedding=None으로 처리. 이미 sft_trainer.py:751-769에 None 분기 존재.
trainer.py:101, 298-321), CLIP-free 분기, validation grid composition 모두 그대로. 신규 작성 최소화.| 단계 | 확인 항목 | 성공 기준 |
|---|---|---|
| S1 모델 로드 | load_components 동작, dual expert 인식 | transformer_2 is not None, image_encoder is None, in_channels==36 |
| S2 Forward shape | batch_size=1, compute_loss 1 step | latent_model_input.shape == [1, 36, 21, 54, 96] |
| S3 Cache 빌드 | task 1개 latent + first_frame cache 생성 | safetensors에 두 key 모두 존재 |
| S4 Validation pipeline | 1-step checkpoint로 50-step inference | output mp4 생성 (F,H_total,W_total,3 형태) |
| S5 학습 안정성 | 4 GPU LoRA 100 steps | loss 발산 없음, grad_norm ~0.1-1.0 범위 |
sbm "bash scripts/run_robocasa_i2v.sh" --gres=gpu:8 -c 112 --mem 1600GB)plan-latent_cache_rgb_pt_split.md) 적용 — I2V 마이그레이션 이후 cache 구조가 확정되면 split 적용.build_robocasa_first_frame_latent이 현재 start_frame=0 고정 → Phase 3에서 start_frame 파라미터 추가 필요. 또한 T2V cache를 I2V cache로 symlink 최적화는 VAE 동일성 smoke 확인 후 결정.