RAEv2 general DINOv3-L k7 representation autoencoder
The exact official DINOv3-L encoder checkpoint, general-domain k7 decoder and matching latent statistics, bundled with pinned native implementations and an offline loader. This is a representation autoencoder, not a low-dimensional stochastic VAE, and not a complete visual-language or text-to-image model.
from huggingface_hub import snapshot_download
import sys,torch
folder=snapshot_download("gatilin/raev2_dinov3l_k7_general_codec")
sys.path.insert(0,folder)
from component import load_model
codec=load_model(folder)
x=torch.linspace(0,1,3*256*256).reshape(1,3,256,256) # RGB NCHW [0,1]
with torch.inference_mode():
latent=codec.encode(x) # [1,1024,16,16]
reconstruction=codec.decode(latent)
The native encoder averages normalized features from layers 11,13,15,17,19,21,23 and adds the final selected layer's spatial mean. The original RAE recipe removes the encoder's final-norm affine parameters at runtime; the original encoder checkpoint is preserved unchanged. The supplied decoder is general k7, not the ImageNet decoder or k23 variant. stats.pt participates in normalization and must not be omitted or mixed with another recipe.
Install requirements and run python validate.py. Tests cover strict original encoder/decoder loading, native layer order, encode/reconstruction, agreement with raw-feature normalization, normalization inversion, original resizing behavior, and full source-file SHA-256 checks. Synthetic-fixture metrics are recorded in validation.json and are not claimed as published reconstruction benchmark scores.
Local pinned DINOv3 source is included so loading does not fetch executable code or encoder weights from the network after snapshot download. The local hubconf exports only the required backbone to avoid unrelated detection/segmentation dependencies; backbone arithmetic is unchanged. Exact code pins and source modifications are recorded in code_provenance.json.
Sources and licensing
RAEv2 implementation carries CC BY-NC 4.0; DINOv3 encoder/code have the separate original DINOv3 License Agreement. Both license texts and the provenance of each unchanged source file are retained. The upstream weight Hub has no standalone model-card license declaration; this bundle does not relabel the original encoder as Apache or MIT. See LICENSES.md.
Model tree for gatilin/raev2_dinov3l_k7_general_codec
Base model
nyu-visionx/RAEv2-models