# Top-level training config for ZipSplatRefine.
# Trains the iterative refinement module on top of a pretrained, frozen ZipSplat.
defaults:
  - model: zipsplat_refine
  - data: composed_252
  - train: zipsplat_refine
  - benchmarks: re10k_dl3dv
  - _self_

# Path to a pretrained ZipSplat checkpoint (passed through to model).
model:
  base_weights: /mnt/hdd/splatfactory_outputs/outputs/training/zipsplat-v4/checkpoint_best.tar
  # Force r=1.0 in the base — per-position alignment between z and error tokens
  # is only valid at full token rate (no clustering compression).
  base:
    query_sample_ratio: [1.0, 1.0]
    query_ratio_schedule: 0.0
    query_scale_with_views: 0.0
    return_attention: false  # eval-time hack — disable to save memory
  # Refiner architecture — keep tiny to start
  refiner:
    hidden_dim: 256
    num_layers: 2
    num_heads: 8
  K: 2

data:
  # K=2 unrolling triples decoder+render cost per step. With variable views
  # [2, 24] DynamicBatchSampler manages per-batch view counts inside this
  # token budget (full ZipSplat uses 384 — divide by ~3 for K=2's overhead).
  batch_size: 18
  image_num_range: [2, 18]
  view_schedule: 0.0   # full [2,24] range from the start (no curriculum)
  num_target_views: 4
  preprocessing:
    resize: 252
    edge_divisible_by: 14

train:
  seed: 1
  num_steps: 30_000
  lr: 3e-4
