Instructions to use OFA-Sys/ofa-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OFA-Sys/ofa-base with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OFA-Sys/ofa-base", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
f7fd166
1
Parent(s): 2ecc0b9
Update README.md
Browse files
README.md
CHANGED
|
@@ -21,7 +21,7 @@ After, refer the path to OFA-base to `ckpt_dir`, and prepare an image for the te
|
|
| 21 |
>>> from transformers import OFATokenizer, OFAForConditionalGeneration
|
| 22 |
|
| 23 |
>>> mean, std = [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]
|
| 24 |
-
>>> resolution =
|
| 25 |
>>> patch_resize_transform = transforms.Compose([
|
| 26 |
lambda image: image.convert("RGB"),
|
| 27 |
transforms.Resize((resolution, resolution), interpolation=Image.BICUBIC),
|
|
|
|
| 21 |
>>> from transformers import OFATokenizer, OFAForConditionalGeneration
|
| 22 |
|
| 23 |
>>> mean, std = [0.5, 0.5, 0.5], [0.5, 0.5, 0.5]
|
| 24 |
+
>>> resolution = 384
|
| 25 |
>>> patch_resize_transform = transforms.Compose([
|
| 26 |
lambda image: image.convert("RGB"),
|
| 27 |
transforms.Resize((resolution, resolution), interpolation=Image.BICUBIC),
|