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
* Remove bogus file
* [Docs] Remove mentioning of gated access since no longer exsits
* add docs to index
* Apply suggestions from code review
Co-authored-by: Pedro Cuenca <[email protected]>
Co-authored-by: Pedro Cuenca <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+11-33Lines changed: 11 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,19 +79,13 @@ In order to get started, we recommend taking a look at two notebooks:
79
79
Stable Diffusion is a text-to-image latent diffusion model created by the researchers and engineers from [CompVis](https://github.com/CompVis), [Stability AI](https://stability.ai/), [LAION](https://laion.ai/) and [RunwayML](https://runwayml.com/). It's trained on 512x512 images from a subset of the [LAION-5B](https://laion.ai/blog/laion-5b/) database. This model uses a frozen CLIP ViT-L/14 text encoder to condition the model on text prompts. With its 860M UNet and 123M text encoder, the model is relatively lightweight and runs on a GPU with at least 4GB VRAM.
80
80
See the [model card](https://huggingface.co/CompVis/stable-diffusion) for more information.
81
81
82
-
You need to accept the model license before downloading or using the Stable Diffusion weights. Please, visit the [model card](https://huggingface.co/runwayml/stable-diffusion-v1-5), 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.
83
-
84
82
85
83
### Text-to-Image generation with Stable Diffusion
Run this command to log in with your HF Hub token if you haven't before (you can skip this step if you prefer to run the model locally, follow [this](#running-the-model-locally) instead)
We recommend using the model in [half-precision (`fp16`)](https://pytorch.org/blog/accelerating-training-on-nvidia-gpus-with-pytorch-automatic-mixed-precision/) as it gives almost always the same results as full
@@ -101,25 +95,24 @@ precision while being roughly twice as fast and requiring half the amount of GPU
# or download via git clone https://huggingface.co/runwayml/stable-diffusion-v1-5
271
256
# and pass `model_id_or_path="./stable-diffusion-v1-5"`.
272
257
pipe = pipe.to(device)
@@ -288,10 +273,7 @@ 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.
294
-
276
+
The `StableDiffusionInpaintPipeline` lets you edit specific parts of an image by providing a mask and a text prompt.
The [`DiffusionPipeline`] downloads and caches all modeling, tokenization, and scheduling components.
@@ -66,40 +76,14 @@ You can save the image by simply calling:
66
76
>>> image.save("image_of_squirrel_painting.png")
67
77
```
68
78
69
-
More advanced models, like [Stable Diffusion](https://huggingface.co/CompVis/stable-diffusion) require you to accept a [license](https://huggingface.co/spaces/CompVis/stable-diffusion-license) before running the model.
70
-
This is due to the improved image generation capabilities of the model and the potentially harmful content that could be produced with it.
71
-
Please, head over to your stable diffusion model of choice, *e.g.*[`runwayml/stable-diffusion-v1-5`](https://huggingface.co/runwayml/stable-diffusion-v1-5), read the license carefully and tick the checkbox if you agree.
72
-
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 of the documentation](https://huggingface.co/docs/hub/security-tokens).
73
-
Having "click-accepted" the license, you can save your token:
74
-
75
-
```python
76
-
AUTH_TOKEN="<please-fill-with-your-token>"
77
-
```
78
-
79
-
You can then load [`runwayml/stable-diffusion-v1-5`](https://huggingface.co/runwayml/stable-diffusion-v1-5)
80
-
just like we did before only that now you need to pass your `AUTH_TOKEN`:
0 commit comments