You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Sets up miniconda in your ${RUNNER_TEMP} environment and gives you the ${CONDA_RUN} environment variable so you don't have to worry about polluting non-empeheral runners anymore
4
+
5
+
inputs:
6
+
python-version:
7
+
description: If set to any value, dont use sudo to clean the workspace
8
+
required: false
9
+
type: string
10
+
default: "3.9"
11
+
miniconda-version:
12
+
description: Miniconda version to install
13
+
required: false
14
+
type: string
15
+
default: "4.12.0"
16
+
environment-file:
17
+
description: Environment file to install dependencies from
18
+
required: false
19
+
type: string
20
+
default: ""
21
+
22
+
runs:
23
+
using: composite
24
+
steps:
25
+
# Use the same trick from https://github.com/marketplace/actions/setup-miniconda
26
+
# to refresh the cache daily. This is kind of optional though
if [ "$AVAIL" -lt "$MINIMUM_AVAILABLE_SPACE_IN_KB" ]; then
140
+
echo "There is only ${AVAIL}KB free space left in $MOUNT, which is less than the minimum requirement of ${MINIMUM_AVAILABLE_SPACE_IN_KB}KB. Please help create an issue to PyTorch Release Engineering via https://github.com/pytorch/test-infra/issues and provide the link to the workflow run."
141
+
exit 1;
142
+
else
143
+
echo "There is ${AVAIL}KB free space left in $MOUNT, continue"
Copy file name to clipboardExpand all lines: README.md
+12-16Lines changed: 12 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,14 +210,16 @@ You can also run this example on colab [, read the license carefully and tick the checkbox if you agree. Note that this is an additional license, you need to accept it even if you accepted the text-to-image Stable Diffusion license in the past. You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need to use an access token for the code to work. For more information on access tokens, please refer to [this section](https://huggingface.co/docs/hub/security-tokens) of the documentation.
217
216
218
-
import torch
219
-
import requests
217
+
218
+
```python
220
219
importPIL
220
+
import requests
221
+
import torch
222
+
from io import BytesIO
221
223
222
224
from diffusers import StableDiffusionInpaintPipeline
You can also run this example on colab [](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb)
Note that this model is distributed separately from the regular Stable Diffusion model, so you have to accept its license even if you accepted the Stable Diffusion one in the past.
19
19
20
-
importrequests
20
+
Please, visit the [model card](https://huggingface.co/runwayml/stable-diffusion-inpainting), read the license carefully and tick the checkbox if you agree. You have to be a registered user in 🤗 Hugging Face Hub, and you'll also need to use an access token for the code to work. For more information on access tokens, please refer to [this section](https://huggingface.co/docs/hub/security-tokens) of the documentation.
21
+
</Tip>
22
+
23
+
```python
21
24
importPIL
25
+
import requests
26
+
import torch
27
+
from io import BytesIO
22
28
23
29
from diffusers import StableDiffusionInpaintPipeline
<imgsrc="https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"alt="drawing"width="250"/> | <imgsrc="https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"alt="drawing"width="250"/> | ***Face of a yellow cat, high resolution, sitting on a park bench*** | <imgsrc="https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/test.png"alt="drawing"width="250"/> |
44
57
45
-
images[0].save("cat_on_bench.png")
46
-
```
47
58
48
59
You can also run this example on colab [](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb)
60
+
61
+
<Tipwarning={true}>
62
+
A previous experimental implementation of in-painting used a different, lower-quality process. To ensure backwards compatibility, loading a pretrained pipeline that doesn't contain the new model will still apply the old in-painting method.
0 commit comments