Instructions to use KRAFTON/Raon-VisionEncoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KRAFTON/Raon-VisionEncoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="KRAFTON/Raon-VisionEncoder", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("KRAFTON/Raon-VisionEncoder", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download raon_vision_encoder/utils.py from KRAFTON/Raon-VisionEncoder: direct link, hf CLI and curl.
- Browser
- Download file 312 Bytes
-
https://huggingface.co/KRAFTON/Raon-VisionEncoder/resolve/main/raon_vision_encoder/utils.py
- Command line
-
hf download hf://KRAFTON/Raon-VisionEncoder/raon_vision_encoder/utils.py
-
curl -L -o utils.py https://huggingface.co/KRAFTON/Raon-VisionEncoder/resolve/main/raon_vision_encoder/utils.py
312 Bytes
| # Originally from OpenCLIP (https://github.com/mlfoundations/open_clip) | |
| import collections.abc | |
| from itertools import repeat | |
| def _ntuple(n): | |
| def parse(x): | |
| if isinstance(x, collections.abc.Iterable): | |
| return x | |
| return tuple(repeat(x, n)) | |
| return parse | |
| to_2tuple = _ntuple(2) | |