Instructions to use timbrooks/instruct-pix2pix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use timbrooks/instruct-pix2pix 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("timbrooks/instruct-pix2pix", 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
Commit ·
9322455
1
Parent(s): b85fbf3
Update README.md
Browse files
README.md
CHANGED
|
@@ -13,7 +13,7 @@ GitHub: https://github.com/timothybrooks/instruct-pix2pix
|
|
| 13 |
To use `InstructPix2Pix`, install `diffusers` using `main` for now. The pipeline will be available in the next release
|
| 14 |
|
| 15 |
```bash
|
| 16 |
-
pip install
|
| 17 |
```
|
| 18 |
|
| 19 |
```python
|
|
|
|
| 13 |
To use `InstructPix2Pix`, install `diffusers` using `main` for now. The pipeline will be available in the next release
|
| 14 |
|
| 15 |
```bash
|
| 16 |
+
pip install diffusers accelerate safetensors transformers
|
| 17 |
```
|
| 18 |
|
| 19 |
```python
|