Skip to content

Commit 7071b74

Browse files
Errata: Fix typos & \s+$ (huggingface#9008)
* Fix typos * chore: Fix typos * chore: Update README.md for promptdiffusion example * Trim trailing white spaces * Fix a typo * update number * chore: update number * Trim trailing white space * Update README.md Co-authored-by: Steven Liu <[email protected]> * Update README.md Co-authored-by: Steven Liu <[email protected]> --------- Co-authored-by: Steven Liu <[email protected]>
1 parent a054c78 commit 7071b74

36 files changed

+80
-81
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ env:
1313

1414
jobs:
1515
torch_pipelines_cuda_benchmark_tests:
16-
env:
16+
env:
1717
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_BENCHMARK }}
1818
name: Torch Core Pipelines CUDA Benchmarking Tests
1919
strategy:
2020
fail-fast: false
2121
max-parallel: 1
22-
runs-on:
22+
runs-on:
2323
group: aws-g6-4xlarge-plus
2424
container:
2525
image: diffusers/diffusers-pytorch-compile-cuda
@@ -59,7 +59,7 @@ jobs:
5959
if: ${{ success() }}
6060
run: |
6161
pip install requests && python utils/notify_benchmarking_status.py --status=success
62-
62+
6363
- name: Report failure status
6464
if: ${{ failure() }}
6565
run: |

.github/workflows/mirror_community_pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
mirror_community_pipeline:
2525
env:
2626
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_COMMUNITY_MIRROR }}
27-
27+
2828
runs-on: ubuntu-latest
2929
steps:
3030
# Checkout to correct ref
@@ -95,7 +95,7 @@ jobs:
9595
if: ${{ success() }}
9696
run: |
9797
pip install requests && python utils/notify_community_pipelines_mirror.py --status=success
98-
98+
9999
- name: Report failure status
100100
if: ${{ failure() }}
101101
run: |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ In the same spirit, you are of immense help to the community by answering such q
6363

6464
**Please** keep in mind that the more effort you put into asking or answering a question, the higher
6565
the quality of the publicly documented knowledge. In the same way, well-posed and well-answered questions create a high-quality knowledge database accessible to everybody, while badly posed questions or answers reduce the overall quality of the public knowledge database.
66-
In short, a high quality question or answer is *precise*, *concise*, *relevant*, *easy-to-understand*, *accessible*, and *well-formated/well-posed*. For more information, please have a look through the [How to write a good issue](#how-to-write-a-good-issue) section.
66+
In short, a high quality question or answer is *precise*, *concise*, *relevant*, *easy-to-understand*, *accessible*, and *well-formatted/well-posed*. For more information, please have a look through the [How to write a good issue](#how-to-write-a-good-issue) section.
6767

6868
**NOTE about channels**:
6969
[*The forum*](https://discuss.huggingface.co/c/discussion-related-to-httpsgithubcomhuggingfacediffusers/63) is much better indexed by search engines, such as Google. Posts are ranked by popularity rather than chronologically. Hence, it's easier to look up questions and answers that we posted some time ago.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Please refer to the [How to use Stable Diffusion in Apple Silicon](https://huggi
6767

6868
## Quickstart
6969

70-
Generating outputs is super easy with 🤗 Diffusers. To generate an image from text, use the `from_pretrained` method to load any pretrained diffusion model (browse the [Hub](https://huggingface.co/models?library=diffusers&sort=downloads) for 27.000+ checkpoints):
70+
Generating outputs is super easy with 🤗 Diffusers. To generate an image from text, use the `from_pretrained` method to load any pretrained diffusion model (browse the [Hub](https://huggingface.co/models?library=diffusers&sort=downloads) for 30,000+ checkpoints):
7171

7272
```python
7373
from diffusers import DiffusionPipeline
@@ -209,7 +209,7 @@ Also, say 👋 in our public Discord channel <a href="https://discord.gg/G7tWnz9
209209
- https://github.com/deep-floyd/IF
210210
- https://github.com/bentoml/BentoML
211211
- https://github.com/bmaltais/kohya_ss
212-
- +12.000 other amazing GitHub repositories 💪
212+
- +14,000 other amazing GitHub repositories 💪
213213

214214
Thank you for using us ❤️.
215215

docs/source/en/api/pipelines/aura_flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ It was developed by the Fal team and more details about it can be found in [this
1818

1919
<Tip>
2020

21-
AuraFlow can be quite expensive to run on consumer hardware devices. However, you can perform a suite of optimizations to run it faster and in a more memory-friendly manner. Check out [this section](https://huggingface.co/blog/sd3#memory-optimizations-for-sd3) for more details.
21+
AuraFlow can be quite expensive to run on consumer hardware devices. However, you can perform a suite of optimizations to run it faster and in a more memory-friendly manner. Check out [this section](https://huggingface.co/blog/sd3#memory-optimizations-for-sd3) for more details.
2222

2323
</Tip>
2424

docs/source/en/api/pipelines/flux.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ specific language governing permissions and limitations under the License.
1212

1313
# Flux
1414

15-
Flux is a series of text-to-image generation models based on diffusion transformers. To know more about Flux, check out the original [blog post](https://blackforestlabs.ai/announcing-black-forest-labs/) by the creators of Flux, Black Forest Labs.
15+
Flux is a series of text-to-image generation models based on diffusion transformers. To know more about Flux, check out the original [blog post](https://blackforestlabs.ai/announcing-black-forest-labs/) by the creators of Flux, Black Forest Labs.
1616

1717
Original model checkpoints for Flux can be found [here](https://huggingface.co/black-forest-labs). Original inference code can be found [here](https://github.com/black-forest-labs/flux).
1818

1919
<Tip>
2020

21-
Flux can be quite expensive to run on consumer hardware devices. However, you can perform a suite of optimizations to run it faster and in a more memory-friendly manner. Check out [this section](https://huggingface.co/blog/sd3#memory-optimizations-for-sd3) for more details. Additionally, Flux can benefit from quantization for memory efficiency with a trade-off in inference latency. Refer to [this blog post](https://huggingface.co/blog/quanto-diffusers) to learn more.
21+
Flux can be quite expensive to run on consumer hardware devices. However, you can perform a suite of optimizations to run it faster and in a more memory-friendly manner. Check out [this section](https://huggingface.co/blog/sd3#memory-optimizations-for-sd3) for more details. Additionally, Flux can benefit from quantization for memory efficiency with a trade-off in inference latency. Refer to [this blog post](https://huggingface.co/blog/quanto-diffusers) to learn more.
2222

2323
</Tip>
2424

@@ -27,11 +27,11 @@ Flux comes in two variants:
2727
* Timestep-distilled (`black-forest-labs/FLUX.1-schnell`)
2828
* Guidance-distilled (`black-forest-labs/FLUX.1-dev`)
2929

30-
Both checkpoints have slightly difference usage which we detail below.
30+
Both checkpoints have slightly difference usage which we detail below.
3131

3232
### Timestep-distilled
3333

34-
* `max_sequence_length` cannot be more than 256.
34+
* `max_sequence_length` cannot be more than 256.
3535
* `guidance_scale` needs to be 0.
3636
* As this is a timestep-distilled model, it benefits from fewer sampling steps.
3737

@@ -44,11 +44,11 @@ pipe.enable_model_cpu_offload()
4444

4545
prompt = "A cat holding a sign that says hello world"
4646
out = pipe(
47-
prompt=prompt,
48-
guidance_scale=0.,
49-
height=768,
50-
width=1360,
51-
num_inference_steps=4,
47+
prompt=prompt,
48+
guidance_scale=0.,
49+
height=768,
50+
width=1360,
51+
num_inference_steps=4,
5252
max_sequence_length=256,
5353
).images[0]
5454
out.save("image.png")
@@ -57,7 +57,7 @@ out.save("image.png")
5757
### Guidance-distilled
5858

5959
* The guidance-distilled variant takes about 50 sampling steps for good-quality generation.
60-
* It doesn't have any limitations around the `max_sequence_length`.
60+
* It doesn't have any limitations around the `max_sequence_length`.
6161

6262
```python
6363
import torch
@@ -68,10 +68,10 @@ pipe.enable_model_cpu_offload()
6868

6969
prompt = "a tiny astronaut hatching from an egg on the moon"
7070
out = pipe(
71-
prompt=prompt,
72-
guidance_scale=3.5,
73-
height=768,
74-
width=1360,
71+
prompt=prompt,
72+
guidance_scale=3.5,
73+
height=768,
74+
width=1360,
7575
num_inference_steps=50,
7676
).images[0]
7777
out.save("image.png")

docs/source/en/api/pipelines/lumina.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ First, load the pipeline:
5959

6060
```python
6161
from diffusers import LuminaText2ImgPipeline
62-
import torch
62+
import torch
6363

6464
pipeline = LuminaText2ImgPipeline.from_pretrained(
6565
"Alpha-VLLM/Lumina-Next-SFT-diffusers", torch_dtype=torch.bfloat16
@@ -87,4 +87,4 @@ image = pipeline(prompt="Upper body of a young woman in a Victorian-era outfit w
8787
[[autodoc]] LuminaText2ImgPipeline
8888
- all
8989
- __call__
90-
90+

docs/source/en/api/pipelines/stable_audio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Stable Audio was proposed in [Stable Audio Open](https://arxiv.org/abs/2407.1435
1616

1717
Stable Audio Open generates variable-length (up to 47s) stereo audio at 44.1kHz from text prompts. It comprises three components: an autoencoder that compresses waveforms into a manageable sequence length, a T5-based text embedding for text conditioning, and a transformer-based diffusion (DiT) model that operates in the latent space of the autoencoder.
1818

19-
Stable Audio is trained on a corpus of around 48k audio recordings, where around 47k are from Freesound and the rest are from the Free Music Archive (FMA). All audio files are licensed under CC0, CC BY, or CC Sampling+. This data is used to train the autoencoder and the DiT.
19+
Stable Audio is trained on a corpus of around 48k audio recordings, where around 47k are from Freesound and the rest are from the Free Music Archive (FMA). All audio files are licensed under CC0, CC BY, or CC Sampling+. This data is used to train the autoencoder and the DiT.
2020

2121
The abstract of the paper is the following:
2222
*Open generative models are vitally important for the community, allowing for fine-tunes and serving as baselines when presenting new models. However, most current text-to-audio models are private and not accessible for artists and researchers to build upon. Here we describe the architecture and training process of a new open-weights text-to-audio model trained with Creative Commons data. Our evaluation shows that the model's performance is competitive with the state-of-the-art across various metrics. Notably, the reported FDopenl3 results (measuring the realism of the generations) showcase its potential for high-quality stereo sound synthesis at 44.1kHz.*

docs/source/en/tutorials/fast_diffusion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu
3535
```
3636

3737
> [!TIP]
38-
> The results reported below are from a 80GB 400W A100 with its clock rate set to the maximum.
38+
> The results reported below are from a 80GB 400W A100 with its clock rate set to the maximum.
3939
> If you're interested in the full benchmarking code, take a look at [huggingface/diffusion-fast](https://github.com/huggingface/diffusion-fast).
4040
4141

@@ -168,7 +168,7 @@ Using SDPA attention and compiling both the UNet and VAE cuts the latency from 3
168168
</div>
169169

170170
> [!TIP]
171-
> From PyTorch 2.3.1, you can control the caching behavior of `torch.compile()`. This is particularly beneficial for compilation modes like `"max-autotune"` which performs a grid-search over several compilation flags to find the optimal configuration. Learn more in the [Compile Time Caching in torch.compile](https://pytorch.org/tutorials/recipes/torch_compile_caching_tutorial.html) tutorial.
171+
> From PyTorch 2.3.1, you can control the caching behavior of `torch.compile()`. This is particularly beneficial for compilation modes like `"max-autotune"` which performs a grid-search over several compilation flags to find the optimal configuration. Learn more in the [Compile Time Caching in torch.compile](https://pytorch.org/tutorials/recipes/torch_compile_caching_tutorial.html) tutorial.
172172
173173
### Prevent graph breaks
174174

docs/source/en/tutorials/inference_with_big_models.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ A modern diffusion model, like [Stable Diffusion XL (SDXL)](../using-diffusers/s
1818
* Two text encoders
1919
* A UNet for denoising
2020

21-
Usually, the text encoders and the denoiser are much larger compared to the VAE.
21+
Usually, the text encoders and the denoiser are much larger compared to the VAE.
2222

2323
As models get bigger and better, it’s possible your model is so big that even a single copy won’t fit in memory. But that doesn’t mean it can’t be loaded. If you have more than one GPU, there is more memory available to store your model. In this case, it’s better to split your model checkpoint into several smaller *checkpoint shards*.
2424

2525
When a text encoder checkpoint has multiple shards, like [T5-xxl for SD3](https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers/tree/main/text_encoder_3), it is automatically handled by the [Transformers](https://huggingface.co/docs/transformers/index) library as it is a required dependency of Diffusers when using the [`StableDiffusion3Pipeline`]. More specifically, Transformers will automatically handle the loading of multiple shards within the requested model class and get it ready so that inference can be performed.
2626

27-
The denoiser checkpoint can also have multiple shards and supports inference thanks to the [Accelerate](https://huggingface.co/docs/accelerate/index) library.
27+
The denoiser checkpoint can also have multiple shards and supports inference thanks to the [Accelerate](https://huggingface.co/docs/accelerate/index) library.
2828

2929
> [!TIP]
3030
> Refer to the [Handling big models for inference](https://huggingface.co/docs/accelerate/main/en/concept_guides/big_model_inference) guide for general guidance when working with big models that are hard to fit into memory.
@@ -43,7 +43,7 @@ unet.save_pretrained("sdxl-unet-sharded", max_shard_size="5GB")
4343
The size of the fp32 variant of the SDXL UNet checkpoint is ~10.4GB. Set the `max_shard_size` parameter to 5GB to create 3 shards. After saving, you can load them in [`StableDiffusionXLPipeline`]:
4444

4545
```python
46-
from diffusers import UNet2DConditionModel, StableDiffusionXLPipeline
46+
from diffusers import UNet2DConditionModel, StableDiffusionXLPipeline
4747
import torch
4848

4949
unet = UNet2DConditionModel.from_pretrained(
@@ -57,14 +57,14 @@ image = pipeline("a cute dog running on the grass", num_inference_steps=30).imag
5757
image.save("dog.png")
5858
```
5959

60-
If placing all the model-level components on the GPU at once is not feasible, use [`~DiffusionPipeline.enable_model_cpu_offload`] to help you:
60+
If placing all the model-level components on the GPU at once is not feasible, use [`~DiffusionPipeline.enable_model_cpu_offload`] to help you:
6161

6262
```diff
6363
- pipeline.to("cuda")
6464
+ pipeline.enable_model_cpu_offload()
6565
```
6666

67-
In general, we recommend sharding when a checkpoint is more than 5GB (in fp32).
67+
In general, we recommend sharding when a checkpoint is more than 5GB (in fp32).
6868

6969
## Device placement
7070

0 commit comments

Comments
 (0)