File size: 730 Bytes
3805eff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Qwen3-VL-4B-SAMTok Composite

This directory is a self-contained Hugging Face remote-code model wrapper around
Qwen3-VL-4B-SAMTok and the SAMTok mask decoder.

```python
from transformers import AutoModel

model = AutoModel.from_pretrained(
    "your-org/Qwen3-VL-4B-SAMTok-Composite",
    trust_remote_code=True,
    torch_dtype="auto",
    device_map="auto",
)

result = model.generate_with_masks(
    image="example.jpg",
    question="Please describe the image with interleaved segmentation masks.",
)
print(result["text"])
print(result["masks"].shape if result["masks"] is not None else None)
```

The original Qwen3-VL config is stored as `qwen_config.json`; `config.json`
registers the composite `AutoModel` remote code.