-
Notifications
You must be signed in to change notification settings - Fork 6k
updated doc for stable diffusion pipelines #1770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yiyixuxu
merged 23 commits into
huggingface:main
from
yiyixuxu:update-stablediffusion-doc
Jan 2, 2023
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fafc352
add a doc page for each pipeline under api/pipelines/stable_diffusion
ab8928c
make style
897c7db
updated default markdown syntax to list methods based on https://gith…
b8a51f7
edit
63b3ad6
Update docs/source/api/pipelines/stable_diffusion/depth2img.mdx
yiyixuxu a08fe86
Update docs/source/api/pipelines/stable_diffusion/image_variation.mdx
yiyixuxu 851b828
Update docs/source/api/pipelines/stable_diffusion/img2img.mdx
yiyixuxu 268fca0
Update docs/source/api/pipelines/stable_diffusion/inpaint.mdx
yiyixuxu fd133b8
Update docs/source/api/pipelines/stable_diffusion/text2img.mdx
yiyixuxu 39cc898
Update docs/source/api/pipelines/stable_diffusion/upscale.mdx
yiyixuxu 51509e4
Update docs/source/api/pipelines/stable_diffusion/text2img.mdx
yiyixuxu 0cfa4ac
Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffu…
yiyixuxu d3f9c39
Update src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffu…
yiyixuxu be35fda
Update src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_i…
yiyixuxu 18f1056
Update src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py
yiyixuxu b5cb05e
Update src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py
yiyixuxu c36684d
Update docs/source/api/pipelines/stable_diffusion_safe.mdx
yiyixuxu 0aa62e0
Update docs/source/api/pipelines/stable_diffusion/inpaint.mdx
yiyixuxu fcb860a
Update docs/source/api/pipelines/stable_diffusion/img2img.mdx
yiyixuxu c0cbc97
fix
89c59db
add function decorator
patrickvonplaten 963ea63
use replace_example_docstring
d397d98
make style
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!--Copyright 2022 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# Depth-to-Image Generation | ||
|
||
## StableDiffusionDepth2ImgPipeline | ||
|
||
The depth-guided stable diffusion model was created by the researchers and engineers from [CompVis](https://github.com/CompVis), [Stability AI](https://stability.ai/), and [LAION](https://laion.ai/), as part of Stable Diffusion 2.0. It uses [MiDas](https://github.com/isl-org/MiDaS) to infer depth based on an image. | ||
|
||
[`StableDiffusionDepth2ImgPipeline`] lets you pass a text prompt and an initial image to condition the generation of new images as well as a `depth_map` to preserve the images’ structure. | ||
|
||
The original codebase can be found here: | ||
- *Stable Diffusion v2*: [Stability-AI/stablediffusion](https://github.com/Stability-AI/stablediffusion#depth-conditional-stable-diffusion) | ||
|
||
Available Checkpoints are: | ||
- *stable-diffusion-2-depth*: [stabilityai/stable-diffusion-2-depth](https://huggingface.co/stabilityai/stable-diffusion-2-depth) | ||
|
||
[[autodoc]] StableDiffusionDepth2ImgPipeline | ||
- all | ||
- __call__ | ||
yiyixuxu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- enable_attention_slicing | ||
- disable_attention_slicing | ||
- enable_xformers_memory_efficient_attention | ||
- disable_xformers_memory_efficient_attention |
31 changes: 31 additions & 0 deletions
31
docs/source/api/pipelines/stable_diffusion/image_variation.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!--Copyright 2022 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# Image Variation | ||
patrickvonplaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## StableDiffusionImageVariationPipeline | ||
|
||
[`StableDiffusionImageVariationPipeline`] lets you generate variations from an input image using Stable Diffusion. It uses a fine-tuned version of Stable Diffusion model, trained by [Justin Pinkney](https://www.justinpinkney.com/) (@Buntworthy) at [Lambda](https://lambdalabs.com/) | ||
|
||
The original codebase can be found here: | ||
[Stable Diffusion Image Variations](https://github.com/LambdaLabsML/lambda-diffusers#stable-diffusion-image-variations) | ||
|
||
Available Checkpoints are: | ||
- *sd-image-variations-diffusers*: [lambdalabs/sd-image-variations-diffusers](https://huggingface.co/lambdalabs/sd-image-variations-diffusers) | ||
|
||
[[autodoc]] StableDiffusionImageVariationPipeline | ||
- all | ||
- __call__ | ||
yiyixuxu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- enable_attention_slicing | ||
- disable_attention_slicing | ||
- enable_xformers_memory_efficient_attention | ||
- disable_xformers_memory_efficient_attention |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!--Copyright 2022 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# Image-to-Image Generation | ||
|
||
## StableDiffusionImg2ImgPipeline | ||
|
||
The Stable Diffusion model was created by the researchers and engineers from [CompVis](https://github.com/CompVis), [Stability AI](https://stability.ai/), [runway](https://github.com/runwayml), and [LAION](https://laion.ai/). The [`StableDiffusionImg2ImgPipeline`] lets you pass a text prompt and an initial image to condition the generation of new images using Stable Diffusion. | ||
|
||
The original codebase can be found here: [CampVis/stable-diffusion](https://github.com/CompVis/stable-diffusion/blob/main/scripts/img2img.py) | ||
|
||
[`StableDiffusionImg2ImgPipeline`] is compatible with all Stable Diffusion checkpoints for [Text-to-Image](./text2img) | ||
|
||
[[autodoc]] StableDiffusionImg2ImgPipeline | ||
patrickvonplaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- all | ||
- __call__ | ||
yiyixuxu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- enable_attention_slicing | ||
- disable_attention_slicing | ||
- enable_xformers_memory_efficient_attention | ||
- disable_xformers_memory_efficient_attention |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!--Copyright 2022 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# Text-Guided Image Inpainting | ||
|
||
## StableDiffusionInpaintPipeline | ||
|
||
The Stable Diffusion model was created by the researchers and engineers from [CompVis](https://github.com/CompVis), [Stability AI](https://stability.ai/), [runway](https://github.com/runwayml), and [LAION](https://laion.ai/). The [`StableDiffusionInpaintPipeline`] lets you edit specific parts of an image by providing a mask and a text prompt using Stable Diffusion. | ||
|
||
The original codebase can be found here: | ||
- *Stable Diffusion V1*: [CampVis/stable-diffusion](https://github.com/runwayml/stable-diffusion#inpainting-with-stable-diffusion) | ||
- *Stable Diffusion V2*: [Stability-AI/stablediffusion](https://github.com/Stability-AI/stablediffusion#image-inpainting-with-stable-diffusion) | ||
|
||
Available checkpoints are: | ||
- *stable-diffusion-inpainting (512x512 resolution)*: [runwayml/stable-diffusion-inpainting](https://huggingface.co/runwayml/stable-diffusion-inpainting) | ||
- *stable-diffusion-2-inpainting (512x512 resolution)*: [stabilityai/stable-diffusion-2-inpainting](https://huggingface.co/stabilityai/stable-diffusion-2-inpainting) | ||
|
||
[[autodoc]] StableDiffusionInpaintPipeline | ||
patrickvonplaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- all | ||
- __call__ | ||
yiyixuxu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- enable_attention_slicing | ||
- disable_attention_slicing | ||
- enable_xformers_memory_efficient_attention | ||
- disable_xformers_memory_efficient_attention |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!--Copyright 2022 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# Text-to-Image Generation | ||
patrickvonplaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## StableDiffusionPipeline | ||
|
||
The Stable Diffusion model was created by the researchers and engineers from [CompVis](https://github.com/CompVis), [Stability AI](https://stability.ai/), [runway](https://github.com/runwayml), and [LAION](https://laion.ai/). The [`StableDiffusionPipeline`] is capable of generating photo-realistic images given any text input using Stable Diffusion. | ||
|
||
The original codebase can be found here: | ||
- *Stable Diffusion V1*: [CampVis/stable-diffusion](https://github.com/CompVis/stable-diffusion) | ||
- *Stable Diffusion v2*: [Stability-AI/stablediffusion](https://github.com/Stability-AI/stablediffusion) | ||
|
||
Available Checkpoints are: | ||
patrickvonplaten marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- *stable-diffusion-v1-4 (512x512 resolution)* [CompVis/stable-diffusion-v1-4](https://huggingface.co/CompVis/stable-diffusion-v1-4) | ||
- *stable-diffusion-v1-5 (512x512 resolution)* [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) | ||
- *stable-diffusion-2-base (512x512 resolution)*: [stabilityai/stable-diffusion-2-base](https://huggingface.co/stabilityai/stable-diffusion-2-base) | ||
- *stable-diffusion-2 (768x768 resolution)*: [stabilityai/stable-diffusion-2](https://huggingface.co/stabilityai/stable-diffusion-2) | ||
- *stable-diffusion-2-1-base (512x512 resolution)* [stabilityai/stable-diffusion-2-1-base](https://huggingface.co/stabilityai/stable-diffusion-2-1-base) | ||
- *stable-diffusion-2-1 (768x768 resolution)*: [stabilityai/stable-diffusion-2-1](https://huggingface.co/stabilityai/stable-diffusion-2-1) | ||
|
||
[[autodoc]] StableDiffusionPipeline | ||
- all | ||
- __call__ | ||
yiyixuxu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- enable_attention_slicing | ||
- disable_attention_slicing | ||
- enable_vae_slicing | ||
- disable_vae_slicing | ||
- enable_xformers_memory_efficient_attention | ||
- disable_xformers_memory_efficient_attention |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!--Copyright 2022 The HuggingFace Team. All rights reserved. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
--> | ||
|
||
# Super-Resolution | ||
|
||
## StableDiffusionUpscalePipeline | ||
|
||
The upscaler diffusion model was created by the researchers and engineers from [CompVis](https://github.com/CompVis), [Stability AI](https://stability.ai/), and [LAION](https://laion.ai/), as part of Stable Diffusion 2.0. [`StableDiffusionUpscalePipeline`] can be used to enhance the resolution of input images by a factor of 4. | ||
|
||
The original codebase can be found here: | ||
- *Stable Diffusion v2*: [Stability-AI/stablediffusion](https://github.com/Stability-AI/stablediffusion#image-upscaling-with-stable-diffusion) | ||
|
||
Available Checkpoints are: | ||
- *stabilityai/stable-diffusion-x4-upscaler (x4 resolution resolution)*: [stable-diffusion-x4-upscaler](https://huggingface.co/stabilityai/stable-diffusion-x4-upscaler) | ||
|
||
|
||
[[autodoc]] StableDiffusionUpscalePipeline | ||
- all | ||
- __call__ | ||
yiyixuxu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- enable_attention_slicing | ||
- disable_attention_slicing | ||
- enable_xformers_memory_efficient_attention | ||
- disable_xformers_memory_efficient_attention |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.