Instructions to use Xenova/moondream2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/moondream2 with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'Xenova/moondream2');
Download preprocessor_config.json from Xenova/moondream2: direct link, hf CLI and curl.
- Browser
- Download file 367 Bytes
-
https://huggingface.co/Xenova/moondream2/resolve/refs%2Fpr%2F2/preprocessor_config.json
- Command line
-
hf download hf://Xenova/moondream2@refs/pr/2/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/Xenova/moondream2/resolve/refs%2Fpr%2F2/preprocessor_config.json
367 Bytes
| { | |
| "do_normalize": true, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "image_mean": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "image_processor_type": "SiglipImageProcessor", | |
| "image_std": [ | |
| 0.5, | |
| 0.5, | |
| 0.5 | |
| ], | |
| "processor_class": "SiglipProcessor", | |
| "resample": 3, | |
| "rescale_factor": 0.00392156862745098, | |
| "size": { | |
| "height": 378, | |
| "width": 378 | |
| } | |
| } |