Add pipeline tag and license
#1
by
nielsr
HF Staff
- opened
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
library_name: diffusers
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
# Paint by Inpaint: Learning to Add Image Objects by Removing Them First
|
|
@@ -12,7 +14,6 @@ We offer four different models:
|
|
| 12 |
- Trained on the combined PIPE and InstructPix2Pix datasets, intended for general editing.
|
| 13 |
- The general model fine-tuned on the full MagicBrush dataset.
|
| 14 |
|
| 15 |
-
|
| 16 |
## Resources
|
| 17 |
|
| 18 |
- 💻 [**Visit Project Page**](https://rotsteinnoam.github.io/Paint-by-Inpaint/)
|
|
@@ -23,8 +24,6 @@ We offer four different models:
|
|
| 23 |
|
| 24 |
- 🗂️ [**Use PIPE Dataset**](https://huggingface.co/datasets/paint-by-inpaint/PIPE)
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
#### Running the model
|
| 29 |
|
| 30 |
The model is simple to run using the InstructPix2Pix pipeline:
|
|
@@ -34,8 +33,12 @@ from diffusers import StableDiffusionInstructPix2PixPipeline, EulerAncestralDisc
|
|
| 34 |
import torch
|
| 35 |
import requests
|
| 36 |
from io import BytesIO
|
|
|
|
| 37 |
|
| 38 |
model_name = "paint-by-inpaint/add-base" # addition-base-model
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
diffusion_steps = 50
|
| 41 |
device = "cuda"
|
|
@@ -57,8 +60,6 @@ out_images = pipe(
|
|
| 57 |
|
| 58 |
```
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
## BibTeX
|
| 63 |
|
| 64 |
``` Citation
|
|
@@ -68,4 +69,4 @@ out_images = pipe(
|
|
| 68 |
journal={arXiv preprint arXiv:2404.18212},
|
| 69 |
year={2024}
|
| 70 |
}
|
| 71 |
-
|
|
|
|
| 1 |
---
|
| 2 |
library_name: diffusers
|
| 3 |
+
license: mit
|
| 4 |
+
pipeline_tag: image-to-image
|
| 5 |
---
|
| 6 |
|
| 7 |
# Paint by Inpaint: Learning to Add Image Objects by Removing Them First
|
|
|
|
| 14 |
- Trained on the combined PIPE and InstructPix2Pix datasets, intended for general editing.
|
| 15 |
- The general model fine-tuned on the full MagicBrush dataset.
|
| 16 |
|
|
|
|
| 17 |
## Resources
|
| 18 |
|
| 19 |
- 💻 [**Visit Project Page**](https://rotsteinnoam.github.io/Paint-by-Inpaint/)
|
|
|
|
| 24 |
|
| 25 |
- 🗂️ [**Use PIPE Dataset**](https://huggingface.co/datasets/paint-by-inpaint/PIPE)
|
| 26 |
|
|
|
|
|
|
|
| 27 |
#### Running the model
|
| 28 |
|
| 29 |
The model is simple to run using the InstructPix2Pix pipeline:
|
|
|
|
| 33 |
import torch
|
| 34 |
import requests
|
| 35 |
from io import BytesIO
|
| 36 |
+
from PIL import Image
|
| 37 |
|
| 38 |
model_name = "paint-by-inpaint/add-base" # addition-base-model
|
| 39 |
+
# model_name = "paint-by-inpaint/add-finetuned-mb" # addition-finetuned-model
|
| 40 |
+
# model_name = "paint-by-inpaint/general-base" # general-base-model
|
| 41 |
+
# model_name = "paint-by-inpaint/general-finetuned-mb" # general-finetuned-model
|
| 42 |
|
| 43 |
diffusion_steps = 50
|
| 44 |
device = "cuda"
|
|
|
|
| 60 |
|
| 61 |
```
|
| 62 |
|
|
|
|
|
|
|
| 63 |
## BibTeX
|
| 64 |
|
| 65 |
``` Citation
|
|
|
|
| 69 |
journal={arXiv preprint arXiv:2404.18212},
|
| 70 |
year={2024}
|
| 71 |
}
|
| 72 |
+
```
|