Complete continuous HYDRA-TOK codec with base/GAN generation halves and a shared semantic half.

Encodes ImageNet-normalized RGB at 448x448 to raw 64x32x32 mu; computes 1024-d semantics; reconstructs pixels using the native flow decoder. The wrapper normalizes raw mu exactly once before native decoding. Both variants are included. The HYDRA language backbone is not included.

Source and conversion

Model/weights: Xuerui123/HYdra, fixed revision eaba85d79bb12998be9815c57777e62b2a78314c. Native code: Tencent-Hunyuan/HYdra, fixed revision ca3e71d9356dee02cc13ac6cc02a73090e40f781.

All selected tensor names, shapes, dtypes and payload bytes are preserved, except the explicit IBQ EMA shadow-name mapping. See extraction.json, provenance.json and tensor/conversion mappings. This repository contains component weights and a local native loader, not an AutoModel.from_pretrained checkpoint.

Load

Install requirements.txt in a compatible environment, then:

from huggingface_hub import snapshot_download
import sys
import torch
root = snapshot_download("gatilin/hydra_tok_base_gan")
sys.path.insert(0, root)
from component import load_model
model = load_model(root, dtype=torch.float32, device="cpu")

The model is returned in evaluation mode. Run inference under torch.inference_mode(). Inputs are native tensors/patches, not arbitrary PIL images; inspect component.py and the included validation script for the exact layout. CPU float32 was tested; CUDA/MPS and full end-to-end benchmarks were not tested.

Validation

See validation.json for the executed component tests, shapes and limitations. Source payload equality and native strict loading are required before release. Component tests do not establish full-model generation or understanding quality. Original stochastic decoding settings and normalization conventions must be retained.

License and attribution

Original upstream notices and license files are retained. Reused third-party components keep their original terms. This extraction does not claim authorship of the underlying trained model.

encode returns raw mu by default; decode accepts raw mu by default and applies the required normalization once. semantic_features accepts raw mu. Use variant="gan" for the alternate generative half. See native_patches.json for the CUDA allocation adaptation and exact saved buffer shapes.

Replay python validate.py and python validate_gan.py for both variants. The GAN/base encoders agree exactly on the 448px integration fixture; no dataset-level quality comparison is asserted.

Downloads last month
31
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including gatilin/hydra_tok_base_gan