Downloads · 30 days
0
A03HCY/Codon-Motif-vision-1
Codon-Motif-vision-1 is a machine learning model from A03HCY. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Codon Motif Vision 1 is an experimental Visual Tokenizer model that supports images of arbitrary scales.
Downloads · 30 days
0
Access
Public
Updated Jan 30, 2026
Repo size
170 MB
Likes
0
Public
Click a slice to open those files.
.safetensors170 MB · 100%
From the Hugging Face model README
Codon Motif Vision 1 is an experimental Visual Tokenizer model that supports images of arbitrary scales.
The model is based on the VQ-GAN architecture and integrates the following key technologies:
| Filename | Size | Description |
|---|---|---|
motif-v1.safetensors | 84.92MB | Full model weights |
motif-v1_encoder.safetensors | 43.32MB | Encoder weights only |
motif-v1_decoder.safetensors | 41.56MB | Decoder weights only |
motif-v1_quantizer.safetensors | 34.37KB | Quantizer weights only |
The following are the default initialization parameters (i.e., v1 standard configuration):
Ensure the orbit-torch library is installed:
pip install orbit-torch
Use the load_pretrained method to load weights. Weights are divided into full weights and partial weights (Encoder, Decoder, Quantizer).
from orbit.model.motif.vision.v1 import MotifV1
model = MotifV1()
model.load_pretrained('motif-v1.safetensors')
Note: When using the Encoder to extract Tokens, you must also load the Quantizer. Load via submodules of the MotifV1 instance.
# 1. Instantiate the main model
model = MotifV1()
# 2. Load weights separately
model.encoder.load_pretrained('motif-v1_encoder.safetensors')
model.quantizer.load_pretrained('motif-v1_quantizer.safetensors')
# 3. Usage example (using the wrapped encode method)
# x = torch.randn(1, 3, 256, 256) # [B, 3, H, W]
# indices, mask, z_q = model.encode(x)
# print(indices.shape) # [B, H, W]
Note: When using the Decoder to reconstruct images, you must also load the Quantizer (used to restore vectors from indices).
# 1. Instantiate the main model
model = MotifV1()
# 2. Load weights separately
model.decoder.load_pretrained('motif-v1_decoder.safetensors')
model.quantizer.load_pretrained('motif-v1_quantizer.safetensors')
# 3. Usage example (using the wrapped decode method)
# indices = ... # [B, H, W]
# reconstruction = model.decode(indices)