From e5aea4120e8c4e9057da9a7f999b47f53e7f86ad Mon Sep 17 00:00:00 2001 From: stevhliu Date: Thu, 27 Aug 2026 08:37:13 -0700 Subject: [PATCH] fix --- docs/source/en/api/models/anyflow_far_transformer3d.md | 2 +- docs/source/en/api/models/anyflow_transformer3d.md | 2 +- docs/source/en/api/pipelines/pag.md | 2 +- docs/source/en/modular_diffusers/modular_pipeline.md | 2 +- docs/source/en/optimization/fp16.md | 6 +++--- docs/source/en/training/distributed_inference.md | 2 +- docs/source/en/using-diffusers/callback.md | 2 +- docs/source/en/using-diffusers/cli.md | 7 +++---- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/source/en/api/models/anyflow_far_transformer3d.md b/docs/source/en/api/models/anyflow_far_transformer3d.md index 7f818c44ef20..118d2c8df797 100644 --- a/docs/source/en/api/models/anyflow_far_transformer3d.md +++ b/docs/source/en/api/models/anyflow_far_transformer3d.md @@ -12,7 +12,7 @@ specific language governing permissions and limitations under the License. # AnyFlowFARTransformer3DModel -The causal (FAR) 3D Transformer used by [`AnyFlowFARPipeline`](../pipelines/anyflow#anyflowfarpipeline) — +The causal (FAR) 3D Transformer used by [`AnyFlowFARPipeline`](../pipelines/anyflow#diffusers.AnyFlowFARPipeline) — the FAR variant of [AnyFlow](https://huggingface.co/papers/2605.13724). See the [`AnyFlowFARPipeline`](../pipelines/anyflow) page for paper, authors, and released checkpoints. It extends the v0.35.1 Wan2.1 backbone with three additions: diff --git a/docs/source/en/api/models/anyflow_transformer3d.md b/docs/source/en/api/models/anyflow_transformer3d.md index d37f7fba62fb..87e7fc298bd5 100644 --- a/docs/source/en/api/models/anyflow_transformer3d.md +++ b/docs/source/en/api/models/anyflow_transformer3d.md @@ -12,7 +12,7 @@ specific language governing permissions and limitations under the License. # AnyFlowTransformer3DModel -The bidirectional 3D Transformer used by [`AnyFlowPipeline`](../pipelines/anyflow#anyflowpipeline). It is the +The bidirectional 3D Transformer used by [`AnyFlowPipeline`](../pipelines/anyflow#diffusers.AnyFlowPipeline). It is the v0.35.1 Wan2.1 backbone with one structural change: the timestep embedder is replaced by ``AnyFlowDualTimestepTextImageEmbedding``, so every forward call conditions on both the source timestep ``t`` and the target timestep ``r``. This is the embedding required to learn the flow map diff --git a/docs/source/en/api/pipelines/pag.md b/docs/source/en/api/pipelines/pag.md index 4be5ffb34f50..96026dec06ff 100644 --- a/docs/source/en/api/pipelines/pag.md +++ b/docs/source/en/api/pipelines/pag.md @@ -59,7 +59,7 @@ pipeline.enable_model_cpu_offload() ``` > [!TIP] -> The `pag_applied_layers` argument allows you to specify which layers PAG is applied to. Additionally, you can use `set_pag_applied_layers` method to update these layers after the pipeline has been created. Check out the [pag_applied_layers](#pag_applied_layers) section to learn more about applying PAG to other layers. +> The `pag_applied_layers` argument allows you to specify which layers PAG is applied to. Additionally, you can use `set_pag_applied_layers` method to update these layers after the pipeline has been created. Check out the [pag_applied_layers](#pagappliedlayers) section to learn more about applying PAG to other layers. If you already have a pipeline created and loaded, you can enable PAG on it using the `from_pipe` API with the `enable_pag` flag. Internally, a PAG pipeline is created based on the pipeline and task you specified. In the example below, since we used `AutoPipelineForText2Image` and passed a `StableDiffusionXLPipeline`, a `StableDiffusionXLPAGPipeline` is created accordingly. Note that this does not require additional memory, and you will have both `StableDiffusionXLPipeline` and `StableDiffusionXLPAGPipeline` loaded and ready to use. You can read more about the `from_pipe` API and how to reuse pipelines in diffuser [here](https://huggingface.co/docs/diffusers/using-diffusers/loading#reusing-models-in-multiple-pipelines). diff --git a/docs/source/en/modular_diffusers/modular_pipeline.md b/docs/source/en/modular_diffusers/modular_pipeline.md index 5d521349cae4..07dc30b078ae 100644 --- a/docs/source/en/modular_diffusers/modular_pipeline.md +++ b/docs/source/en/modular_diffusers/modular_pipeline.md @@ -436,4 +436,4 @@ The `config.json` file contains an `auto_map` key that tells [`ModularPipeline`] } ``` -Load custom code repositories with `trust_remote_code=True` as shown in [from_pretrained](#from_pretrained). See [Custom blocks](./custom_blocks) for how to create and share your own. \ No newline at end of file +Load custom code repositories with `trust_remote_code=True` as shown in [from_pretrained](#frompretrained). See [Custom blocks](./custom_blocks) for how to create and share your own. diff --git a/docs/source/en/optimization/fp16.md b/docs/source/en/optimization/fp16.md index e51cd7437cbf..d3a73aac8595 100644 --- a/docs/source/en/optimization/fp16.md +++ b/docs/source/en/optimization/fp16.md @@ -127,7 +127,7 @@ Load and compile the UNet and VAE. There are several different modes you can cho > [!TIP] > With 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. -Changing the memory layout to [channels_last](./memory#torchchannels_last) also optimizes memory and inference speed. +Changing the memory layout to [channels_last](./memory#torchchannelslast) also optimizes memory and inference speed. ```py pipeline = StableDiffusionXLPipeline.from_pretrained( @@ -250,7 +250,7 @@ The [diffusers-torchao](https://github.com/sayakpaul/diffusers-torchao#benchmark ## Kernels -[Kernels](https://huggingface.co/docs/kernels/index) is a library for building, distributing, and loading optimized compute kernels on the [Hub](https://huggingface.co/kernels-community). It supports [attention](./attention_backends#set_attention_backend) kernels and custom CUDA kernels for operations like RMSNorm, GEGLU, RoPE, and AdaLN. +[Kernels](https://huggingface.co/docs/kernels/index) is a library for building, distributing, and loading optimized compute kernels on the [Hub](https://huggingface.co/kernels-community). It supports [attention](./attention_backends#setattentionbackend) kernels and custom CUDA kernels for operations like RMSNorm, GEGLU, RoPE, and AdaLN. The [Diffusers Pipeline Integration](https://github.com/huggingface/kernels/blob/main/skills/cuda-kernels/references/diffusers-integration.md) guide shows how to integrate a kernel with the [add cuda-kernels](https://github.com/huggingface/kernels/blob/main/skills/cuda-kernels/SKILL.md) skill. This skill enables an agent, like Claude or Codex, to write custom kernels targeted towards a specific model and your hardware. @@ -321,4 +321,4 @@ pipeline.fuse_qkv_projections() These recipes support AMD hardware and [Flux.1 Kontext Dev](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev). - Read the [torch.compile and Diffusers: A Hands-On Guide to Peak Performance](https://pytorch.org/blog/torch-compile-and-diffusers-a-hands-on-guide-to-peak-performance/) blog post -to maximize performance when using `torch.compile`. \ No newline at end of file +to maximize performance when using `torch.compile`. diff --git a/docs/source/en/training/distributed_inference.md b/docs/source/en/training/distributed_inference.md index a731844412fe..733b67081983 100644 --- a/docs/source/en/training/distributed_inference.md +++ b/docs/source/en/training/distributed_inference.md @@ -551,7 +551,7 @@ The strategies above solve different problems, and the useful question is not wh | Strategy | Splits | Reduces | Latency for one prompt | Best when | |---|---|---|---|---| | [Accelerate](#accelerate) / [DDP](#pytorch-distributed) | prompts across replicas | nothing — each device holds a full copy | unchanged | the model already fits and you have many prompts | -| [`device_map`](#device_map) | components across devices | weight memory | slightly worse | the model doesn't fit and the interconnect is slow | +| [`device_map`](#devicemap) | components across devices | weight memory | slightly worse | the model doesn't fit and the interconnect is slow | | [Context parallelism](#context-parallelism) | the input sequence | activation memory | lower | sequences are long — high resolution or video | | [Tensor parallelism](#tensor-parallelism) | weight matrices | weight memory | lower | one component's weights don't fit and the interconnect is fast | diff --git a/docs/source/en/using-diffusers/callback.md b/docs/source/en/using-diffusers/callback.md index 37cd8bb55de2..cf088fc731de 100644 --- a/docs/source/en/using-diffusers/callback.md +++ b/docs/source/en/using-diffusers/callback.md @@ -14,7 +14,7 @@ specific language governing permissions and limitations under the License. A callback is a function that modifies [`DiffusionPipeline`] behavior and it is executed at the end of a denoising step. The changes are propagated to subsequent steps in the denoising process. It is useful for adjusting pipeline attributes or tensor variables to support new features without rewriting the underlying pipeline code. -Diffusers provides several callbacks in the pipeline [overview](../api/pipelines/overview#callbacks). +Diffusers provides several callbacks in the pipeline [overview](../api/pipelines/overview#diffusers.callbacks.PipelineCallback). To enable a callback, configure when the callback is executed after a certain number of denoising steps with one of the following arguments. diff --git a/docs/source/en/using-diffusers/cli.md b/docs/source/en/using-diffusers/cli.md index c16653c9ee7c..02be2bd2fd0e 100644 --- a/docs/source/en/using-diffusers/cli.md +++ b/docs/source/en/using-diffusers/cli.md @@ -21,8 +21,8 @@ specific language governing permissions and limitations under the License. | [`env`](#env) | Print environment info for bug reports. | | [`schema`](#schema) | Inspect a pipeline's `__call__` signature without downloading weights. | | [`run`](#run) | Run a pipeline locally or in a Hugging Face Sandbox. | -| [`custom_blocks`](#custom_blocks) | Package a local `ModularPipelineBlocks` subclass for the Hub. | -| [`fp16_safetensors`](#fp16_safetensors) | Convert a checkpoint to fp16 `.safetensors`. | +| [`custom_blocks`](#customblocks) | Package a local `ModularPipelineBlocks` subclass for the Hub. | +| [`fp16_safetensors`](#fp16safetensors) | Convert a checkpoint to fp16 `.safetensors`. | | [`skills`](#skills) | Install pre-authored skill bundles into your AI coding agent. | > [!TIP] @@ -105,7 +105,7 @@ Configure how the CLI loads model weights and custom pipeline code. - `--dtype {auto, bfloat16, bf16, float16, fp16, float32, fp32}` — weight dtype. - `--device-map ` — component placement. Accepts a torch device string (`cuda`, `cuda:0`, `cpu`, `mps`), `balanced` (auto-splits components across visible GPUs), or a JSON dict for explicit per-component placement. - Auto-detected if omitted. See [device_map](../training/distributed_inference#device_map) for more details + Auto-detected if omitted. See [device_map](../training/distributed_inference#devicemap) for more details - `--variant fp16` — pick a weight variant. - `--revision ` — pin a specific model revision. - `--trust-remote-code` — allow custom code from the Hub (required for repos that ship custom pipeline classes @@ -343,4 +343,3 @@ Without a target flag, the CLI installs for whichever agent launched it, or for For Claude Code the skills are written as a plugin bundle at `.claude/skills/diffusers/`, so they are namespaced as `/diffusers:`; Codex and Cursor get `.agents/skills//`. -