Instructions to use openai/shap-e-img2img with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use openai/shap-e-img2img with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("openai/shap-e-img2img", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Download image_encoder/pytorch_model.bin from openai/shap-e-img2img: direct link, hf CLI and curl.
- Browser
- Download file 1.21 GB
-
https://huggingface.co/openai/shap-e-img2img/resolve/refs%2Fpr%2F6/image_encoder/pytorch_model.bin
- Command line
-
hf download hf://openai/shap-e-img2img@refs/pr/6/image_encoder/pytorch_model.bin
-
curl -L -o pytorch_model.bin https://huggingface.co/openai/shap-e-img2img/resolve/refs%2Fpr%2F6/image_encoder/pytorch_model.bin
1.21 GB
- Xet hash:
- f3f812f4ae1c1f792ec1a27cd75d5b603d3450b60b8fda6500a9a988e4fe8b6c
- Size of remote file:
- 1.21 GB
- SHA256:
- 49767fbe1b9ea4688056a86db9404053b9a34c3f6a95776cb85622e7ea8a35ae
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.