YiYiXu commited on
Commit
debab73
1 Parent(s): f8f34e3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -14
README.md CHANGED
@@ -96,6 +96,20 @@ image.save("cat_with_hat.png")
96
  ```
97
  ![img](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/kandinsky-docs/inpaint_cat_hat.png)
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
  ### Interpolate
101
 
@@ -138,20 +152,6 @@ image.save("starry_cat.png")
138
  ```
139
  ![img](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/kandinsky-docs/starry_cat.png)
140
 
141
- __<font color=red>Breaking change on the mask input:</font>__
142
-
143
- We introduced a breaking change for Kandinsky inpainting pipeline in the following pull request: https://github.com/huggingface/diffusers/pull/4207. Previously we accepted a mask format where black pixels represent the masked-out area. We have changed to use white pixels to represent masks instead in order to have a unified mask format across all our pipelines.
144
- Please upgrade your inpainting code to follow the above. If you are using Kandinsky Inpaint in production. You now need to change the mask to:
145
-
146
- ```python
147
- # For PIL input
148
- import PIL.ImageOps
149
- mask = PIL.ImageOps.invert(mask)
150
-
151
- # For PyTorch and Numpy input
152
- mask = 1 - mask
153
- ```
154
-
155
 
156
  ## Model Architecture
157
 
 
96
  ```
97
  ![img](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/kandinsky-docs/inpaint_cat_hat.png)
98
 
99
+ __<font color=red>Breaking change on the mask input:</font>__
100
+
101
+ We introduced a breaking change for Kandinsky inpainting pipeline in the following pull request: https://github.com/huggingface/diffusers/pull/4207. Previously we accepted a mask format where black pixels represent the masked-out area. We have changed to use white pixels to represent masks instead in order to have a unified mask format across all our pipelines.
102
+ Please upgrade your inpainting code to follow the above. If you are using Kandinsky Inpaint in production. You now need to change the mask to:
103
+
104
+ ```python
105
+ # For PIL input
106
+ import PIL.ImageOps
107
+ mask = PIL.ImageOps.invert(mask)
108
+
109
+ # For PyTorch and Numpy input
110
+ mask = 1 - mask
111
+ ```
112
+
113
 
114
  ### Interpolate
115
 
 
152
  ```
153
  ![img](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/kandinsky-docs/starry_cat.png)
154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
  ## Model Architecture
157