Instructions to use openai/imagegpt-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/imagegpt-small with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openai/imagegpt-small", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Sample code doesnt work
#1
by LemonScript - opened
Hey, the sample doesnt work. Im getting the following output:
ValueError: The following model_kwargs are not used by the model: ['pixel_value'] (note: typos in the generate arguments will also show up in this list)
Removing the "pixel_values" arg leads to following:
"only integer scalar arrays can be converted to a scalar index"
Which probs has to do with clusters[s]
Replacing:
clusters = processor.clusters
n_px = processor.size
With
clusters = np.array(processor.clusters)
n_px = processor.size["width"]
and removing
pixel_values=
Seemed to work.