Feature Extraction
Transformers
Safetensors
f2p_decoder
vision
image-reconstruction
siglip2
custom_code
Instructions to use toilaluan/f2p_decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use toilaluan/f2p_decoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="toilaluan/f2p_decoder", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("toilaluan/f2p_decoder", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from toilaluan/f2p_decoder: direct link, hf CLI and curl.
- Browser
- Download file 750 Bytes
-
https://huggingface.co/toilaluan/f2p_decoder/resolve/main/README.md
- Command line
-
hf download hf://toilaluan/f2p_decoder/README.md
-
curl -L -o README.md https://huggingface.co/toilaluan/f2p_decoder/resolve/main/README.md
750 Bytes
| library_name: transformers | |
| tags: | |
| - vision | |
| - image-reconstruction | |
| - siglip2 | |
| - safetensors | |
| # F2P Decoder | |
| Hugging Face `AutoModel` wrapper for the SigLIP2 feature-to-pixel decoder used in this repository. | |
| ```python | |
| import torch | |
| from transformers import AutoModel | |
| model = AutoModel.from_pretrained( | |
| "toilaluan/f2p_decoder", | |
| trust_remote_code=True, | |
| ).eval() | |
| features = torch.randn(1, 257, 1152) | |
| reconstruction = model(features) | |
| print(reconstruction.shape) # (1, 3, 224, 224) | |
| ``` | |
| The model expects SigLIP2 patch features with a CLS token, for example from | |
| `google/siglip2-so400m-patch14-224`. The output is an image tensor in the | |
| decoder's reconstructed pixel space. | |
| Source `.pt` checkpoint: `nyu-visionx/siglip2_decoder/model.pt`. | |