Kanana-2 Vision Encoder Medium
Powered by Kanana
Community mirror of Kakao's Kanana-2 Vision Encoder Medium, revision f97bf1d13da09f46f3afc7374ebedf86e17bd6e1. This is a standalone 426M-parameter visual feature extractor, not a full multimodal language model. The safetensors file is byte-identical to the official file and was checked against its source LFS SHA-256. The original configuration, processor and model implementation are included unmodified; component.py is the added convenience loader.
Loading
Install PyTorch, torchvision, Transformers, accelerate, safetensors and Pillow. Download the repository and use:
import sys, torch
from PIL import Image
from huggingface_hub import snapshot_download
root = snapshot_download('gatilin/kanana-2-vision-encoder-medium')
sys.path.insert(0, root)
from component import load_model, load_processor
model = load_model(root)
processor = load_processor(root)
inputs = processor(images=Image.open('image.jpg').convert('RGB'), return_tensors='pt')
inputs['pixel_values'] = inputs['pixel_values'].to(next(model.parameters()).dtype)
with torch.inference_mode():
features = model(**inputs).last_hidden_state
See validation.json for the real-image CPU smoke test; it is not an end-to-end VLM or GPU parity evaluation.
License and use restrictions
The Kanana Open License Agreement applies, including its prohibited-use policy and redistribution conditions. Uses must comply with applicable laws and Kakao's Guidelines for Responsible AI as required by section 2.2. Certain commercial services require a separate license. The required copyright notice is included in NOTICE.