WeVisOne-VL-2B Vision Encoder and Mask Decoder
This bundle extracts the vision tower and includes the original mask decoder from tencent/WeVisOne-VL-2B, revision fcf8c8ca7fa481b514005ef591c8b72bed39618a. The language model and tokenizer are not included. The mask decoder requires multi-level visual features, an object-query hidden state and a normalized bounding box; the bundle alone does not generate queries or perform text-prompted segmentation.
model.safetensors: all 315model.visual.*BF16 tensors, 406,957,056 parameters, including 24 visual blocks, merger and three DeepStack mergers. Source keys are preserved. SHA-256:2df658bb9737ffc32a85ccece13c71b21fb0cabbc83933f83521d93ecc92eedb.mask_decoder.pt: byte-identical source sidecar, loaded for validation withtorch.load(..., weights_only=True). The checkpoint contains 296 state entries and constructs a decoder with 9,511,460 parameters in the tested upstream implementation; the current source model card gives 9,609,764. SHA-256:5d42d641f5c493e1d3f48869d36f9d74ac2ba2fbd5146db8de513f19084a469f.mask_native_source/: the official decoder implementation pinned at the GitHub revision recorded insource_manifest.json. Full model code and language backbone are separate dependencies.
Load
Install requirements.txt and download the snapshot. The encoder component returns pre-merger patch features, merged features and DeepStack outputs.
from huggingface_hub import snapshot_download
import importlib.util, sys, torch
root = snapshot_download('gatilin/wevisone-vl-2b-vision-encoder')
sys.path.insert(0, root)
spec = importlib.util.spec_from_file_location('wevisone_visual', root + '/component.py')
component = importlib.util.module_from_spec(spec)
spec.loader.exec_module(component)
vision = component.load_model(root, dtype=torch.float32, device='cpu')
# Input must follow the original Qwen2VLImageProcessor convention.
For the mask decoder, load mask_decoder.pt with weights_only=True, instantiate Qwen3VLSegConfig from the sidecar's cfg, and strictly load its state_dict into WeVisOneMaskDecoder. See validate_mask_decoder.py for feature capture and wiring. Use original model code and preprocessing for full inference.
Verification
The vision export's payload was compared byte-for-byte with cached HTTP source ranges; complete original shards were not independently downloaded or hashed. The decoder file SHA-256 matches upstream LFS metadata. Two COCO128 images passed vision inference and attention parity checks at layers 0, 11 and 23; see validation.json. The decoder strictly loaded and produced finite outputs using four intermediate feature maps from a COCO image, with a synthetic zero object query, a fixed box and a 256 ร 256 canvas. This wiring test does not establish segmentation quality or end-to-end equivalence; the upstream production canvas is 1024 ร 1024. See mask_validation.json.
License
The model card identifies Apache-2.0 and the upstream license file is included. Third-party components retain their own notices; consult the source repositories.
- Downloads last month
- 23
Model tree for gatilin/wevisone-vl-2b-vision-encoder
Base model
tencent/WeVisOne-VL-2B