huggingface/diffusers
🤗 Diffusers: State-of-the-art diffusion models for image, video, and audio generation in PyTorch.
https://skillcdn.ai/gh/huggingface/diffusersConnect this address to your AI to use these skills. How to connect
- Unverified
- Default branch
main - Commit
2232c16 - License
Apache-2.0 - Searchwords
Explore this repository
Searches the original text of skills and documents, and the translations of skills when you search in their language.
Documents
- 缓存缓存通过存储和重用不同层的中间输出(如注意力层和前馈层)来加速推理,而不是在每个推理步骤执行整个计算。它显著提高了生成速度,但以更多内存为代价,并且不需要额外的训练。docs/source/zh/optimization/cache.md
- 如何使用 Core ML 运行 Stable DiffusionCore ML 是 Apple 框架支持的模型格式和机器学习库。如果您有兴趣在 macOS 或 iOS/iPadOS 应用中运行 Stable Diffusion 模型,本指南将展示如何将现有的 PyTorch 检查点转换为 Core ML 格式,并使用 Python 或 Swift 进行推理。docs/source/zh/optimization/coreml.md
- DeepCacheDeepCache 通过策略性地缓存和重用高级特征,同时利用 U-Net 架构高效更新低级特征,来加速 [StableDiffusionPipeline] 和 [StableDiffusionXLPipeline]。docs/source/zh/optimization/deepcache.md
- 加速推理Diffusion模型在推理时速度较慢,因为生成是一个迭代过程,需要经过一定数量的"步数"逐步将噪声细化为图像或视频。要加速这一过程,您可以尝试使用不同的调度器、降低模型权重的精度以加快计算、使用更高效的内存注意力机制等方法。docs/source/zh/optimization/fp16.md
- Intel GaudiIntel Gaudi AI 加速器系列包括 Intel Gaudi 1、Intel Gaudi 2 和 Intel Gaudi 3。每台服务器配备 8 个设备,称为 Habana 处理单元 (HPU),在 Gaudi 3 上提供 128GB 内存,在 Gaudi 2 上提供 96GB 内存,在第一代 Gaudi 上提供 32GB 内存。有关底层硬件架构的更多详细信息,请查看 Gaudi 架构…docs/source/zh/optimization/habana.md
- 减少内存使用现代diffusion models,如 Flux 和 Wan,拥有数十亿参数,在您的硬件上进行推理时会占用大量内存。这是一个挑战,因为常见的 GPU 通常没有足够的内存。为了克服内存限制,您可以使用多个 GPU(如果可用)、将一些管道组件卸载到 CPU 等。docs/source/zh/optimization/memory.md
- Metal Performance Shaders (MPS)🤗 Diffusers 与 Apple silicon(M1/M2 芯片)兼容,使用 PyTorch 的 mps 设备,该设备利用 Metal 框架来发挥 MacOS 设备上 GPU 的性能。您需要具备:docs/source/zh/optimization/mps.md
- AWS NeuronDiffusers 功能可在 AWS Inf2 实例上使用,这些是由 Neuron 机器学习加速器驱动的 EC2 实例。这些实例旨在提供更好的计算性能(更高的吞吐量、更低的延迟)和良好的成本效益,使其成为 AWS 用户将扩散模型部署到生产环境的良好选择。docs/source/zh/optimization/neuron.md
- OpenVINO🤗 Optimum 提供与 OpenVINO 兼容的 Stable Diffusion 管道,可在各种 Intel 处理器上执行推理(请参阅支持的设备完整列表)。docs/source/zh/optimization/open_vino.md
- ParaAttention大型图像和视频生成模型,如 FLUX.1-dev 和 HunyuanVideo,由于其规模,可能对实时应用和部署构成推理挑战。docs/source/zh/optimization/para_attn.md
- PrunaPruna 是一个模型优化框架,提供多种优化方法——量化、剪枝、缓存、编译——以加速推理并减少内存使用。以下是优化方法的概览。docs/source/zh/optimization/pruna.md
- 编译和卸载量化模型优化模型通常涉及推理速度和内存使用之间的权衡。例如,虽然缓存可以提高推理速度,但它也会增加内存消耗,因为它需要存储中间注意力层的输出。一种更平衡的优化策略结合了量化模型、torch.compile 和各种卸载方法。docs/source/zh/optimization/speed-memory-optims.md
- T-GATET-GATE 通过跳过交叉注意力计算一旦收敛,加速了 Stable Diffusion、PixArt 和 Latency Consistency Model 管道的推理。此方法不需要任何额外训练,可以将推理速度提高 10-50%。T-GATE 还与 DeepCache 等其他优化方法兼容。docs/source/zh/optimization/tgate.md
- 令牌合并令牌合并(ToMe)在基于 Transformer 的网络的前向传递中逐步合并冗余令牌/补丁,这可以加速 [StableDiffusionPipeline] 的推理延迟。docs/source/zh/optimization/tome.md
- xDiTxDiT 是一个推理引擎,专为大规模并行部署扩散变换器(DiTs)而设计。xDiT 提供了一套用于扩散模型的高效并行方法,以及 GPU 内核加速。docs/source/zh/optimization/xdit.md
- xFormers我们推荐在推理和训练过程中使用xFormers。在我们的测试中,其对注意力模块的优化能同时提升运行速度并降低内存消耗。docs/source/zh/optimization/xformers.md
Skipped (50)
These manifests were not served. Fix them and push: the next commit is indexed again.
.ai/skills/model-integration/SKILL.mdlink_missing5 links name no file of the repository (references/modular.md, references/models.md, references/pipelines.md, ...)docs/source/en/advanced_inference/outpaint.mdlink_missing2 links name no file of the repository (../using-diffusers/inpaint, ../api/pipelines/stable_diffusion/stable_diffusion_xl)docs/source/en/api/loaders/ip_adapter.mdlink_missinga link names no file of the repository (../../using-diffusers/ip_adapter)docs/source/en/api/loaders/lora.mdlink_missing25 links name no file of the repository (../../api/pipelines/stable_diffusion/stable_diffusion_xl, ../pipelines/flux, ../pipelines/cogvideox, ...)docs/source/en/api/loaders/peft.mdlink_missinga link names no file of the repository (../../tutorials/using_peft_for_inference)docs/source/en/api/loaders/single_file.mdlink_missinga link names no file of the repository (../../using-diffusers/other-formats)docs/source/en/api/loaders/textual_inversion.mdlink_missinga link names no file of the repository (../../using-diffusers/legacy_adapters#textual-inversion)docs/source/en/api/loaders/transformer_sd3.mdlink_missing2 links name no file of the repository (lora#diffusers.loaders.SD3LoraLoaderMixin, ../../tutorials/using_peft_for_inference)docs/source/en/api/loaders/unet.mdlink_missinga link names no file of the repository (../../tutorials/using_peft_for_inference)docs/source/en/api/models/anyflow_far_transformer3d.mdlink_missing3 links name no file of the repository (../pipelines/anyflow#diffusers.AnyFlowFARPipeline, ../pipelines/anyflow, anyflow_transformer3d)docs/source/en/api/models/anyflow_transformer3d.mdlink_missing3 links name no file of the repository (../pipelines/anyflow#diffusers.AnyFlowPipeline, ../pipelines/anyflow, anyflow_far_transformer3d)docs/source/en/api/models/autoencoderkl_p_image_oss.mdlink_missinga link names no file of the repository (./autoencoderkl_minimax_h3)docs/source/en/api/models/rfd4_proteina_autoencoder.mdlink_missinga link names no file of the repository (../pipelines/rfd4_proteina)docs/source/en/api/models/rfd4_proteina_transformer.mdlink_missinga link names no file of the repository (../pipelines/rfd4_proteina)docs/source/en/api/parallel.mdlink_missinga link names no file of the repository (../training/distributed_inference)docs/source/en/api/pipelines/allegro.mdlink_missing3 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines, ../../quantization/overview)docs/source/en/api/pipelines/animatediff.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/anyflow.mdlink_missing2 links name no file of the repository (../models/anyflow_transformer3d, ../models/anyflow_far_transformer3d)docs/source/en/api/pipelines/audioldm2.mdlink_missing6 links name no file of the repository (./stable_diffusion/overview, ./audioldm2#diffusers.AudioLDM2ProjectionModel, ./audioldm2#diffusers.AudioLDM2UNet2DConditionModel, ...)docs/source/en/api/pipelines/aura_flow.mdlink_missing3 links name no file of the repository (../pipelines/stable_diffusion/stable_diffusion_3, ../../quantization/overview, ../../quantization/gguf)docs/source/en/api/pipelines/auto_pipeline.mdlink_missinga link names no file of the repository (../../tutorials/autopipeline)docs/source/en/api/pipelines/bria_fibo2.mdlink_missinga link names no file of the repository (../../optimization/attention_backends)docs/source/en/api/pipelines/cogvideox.mdlink_missing2 links name no file of the repository (../../optimization/memory, ../../optimization/fp16#torchcompile)docs/source/en/api/pipelines/cogview3.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/cogview4.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/controlnet.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/controlnet_flux.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/controlnet_hunyuandit.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/controlnet_sd3.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/controlnet_sdxl.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/cosmos.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/cosmos3.mdlink_missing4 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines, ../../quantization/modelopt, ...)docs/source/en/api/pipelines/ddpm.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/deepfloyd_if.mdlink_missing2 links name no file of the repository (../../optimization/memory#model-offloading, ../../optimization/fp16#torchcompile)docs/source/en/api/pipelines/dit.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/easyanimate.mdlink_missinga link names no file of the repository (../../quantization/overview)docs/source/en/api/pipelines/flux.mdlink_missing4 links name no file of the repository (../../optimization/cache, ../../using-diffusers/ip_adapter, ../../optimization/memory#group-offloading, ...)docs/source/en/api/pipelines/flux2.mdlink_missinga link names no file of the repository (../../optimization/cache)docs/source/en/api/pipelines/flux3.mdlink_missing7 links name no file of the repository (../../modular_diffusers/overview, ../../modular_diffusers/quickstart, ../../modular_diffusers/coming_from_diffusion_pipeline, ...)docs/source/en/api/pipelines/framepack.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/helios.mdlink_missing5 links name no file of the repository (../../optimization/memory, ../../optimization/fp16#torchcompile, ../../optimization/attention_backends, ...)docs/source/en/api/pipelines/hidream.mdlink_missinga link names no file of the repository (../../optimization/cache)docs/source/en/api/pipelines/hunyuan_video.mdlink_missing2 links name no file of the repository (../../optimization/memory, ../../optimization/fp16#torchcompile)docs/source/en/api/pipelines/hunyuan_video15.mdlink_missing3 links name no file of the repository (../../optimization/memory, ../../optimization/attention_backends, ../../using-diffusers/guiders)docs/source/en/api/pipelines/hunyuandit.mdlink_missing5 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines, ./stable_diffusion/stable_diffusion_xl#base-to-refiner-model, ...)docs/source/en/api/pipelines/hunyuanimage21.mdlink_missing2 links name no file of the repository (../../optimization/cache, ../../using-diffusers/guiders)docs/source/en/api/pipelines/kandinsky.mdlink_missing4 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines, ./stable_diffusion/stable_diffusion_xl, ...)docs/source/en/api/pipelines/kandinsky3.mdlink_missing2 links name no file of the repository (../../using-diffusers/schedulers, ../../using-diffusers/loading#reusing-models-in-multiple-pipelines)docs/source/en/api/pipelines/kandinsky6.mdlink_missing4 links name no file of the repository (../../optimization/memory, ../../optimization/memory#model-offloading, ../../optimization/memory#cpu-offloading, ...)docs/source/en/api/pipelines/kandinsky_s2v.mdlink_missinga link names no file of the repository (../../modular_diffusers/overview)