Instructions to use q-future/one-align with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use q-future/one-align with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="q-future/one-align", trust_remote_code=True) pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("q-future/one-align", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
remove unnecessary import of ice cream
Browse filesas the title says, this get's rid of the ice cream import, which is not used here.
Relevant if I want to run in an environment where icecream is not installed.
- visual_encoder.py +0 -1
visual_encoder.py
CHANGED
|
@@ -9,7 +9,6 @@ import numpy as np
|
|
| 9 |
import torch
|
| 10 |
import torch.nn as nn
|
| 11 |
import torch.utils.checkpoint
|
| 12 |
-
from icecream import ic
|
| 13 |
|
| 14 |
def get_abs_pos(abs_pos, tgt_size):
|
| 15 |
# abs_pos: L, C
|
|
|
|
| 9 |
import torch
|
| 10 |
import torch.nn as nn
|
| 11 |
import torch.utils.checkpoint
|
|
|
|
| 12 |
|
| 13 |
def get_abs_pos(abs_pos, tgt_size):
|
| 14 |
# abs_pos: L, C
|