Diffusers documentation

Intel Gaudi

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.43.0).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Intel Gaudi

Intel Gaudi AI 加速器家族包括 Intel Gaudi 1、Intel Gaudi 2 和 Intel Gaudi 3。每台服务器均配备 8 个被称为 Habana 处理单元(HPU)的设备,其中 Gaudi 3 提供 128GB 内存,Gaudi 2 提供 96GB,初代 Gaudi 提供 32GB。有关底层硬件架构的更多详细信息,请参阅 Gaudi 架构 概览。

借助 GPU Migration Toolkit,Diffusers 流水线可以利用 HPU 加速,即使该流水线尚未被添加到 Optimum for Intel Gaudi 中。

对您的 pipeline 调用 .to("hpu"),将其移至 HPU 设备,如下面的 Flux 示例所示:

import torch
from diffusers import DiffusionPipeline

pipeline = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", dtype=torch.bfloat16)
pipeline.to("hpu")

image = pipeline("An image of a squirrel in Picasso style").images[0]

对于 Gaudi 优化的扩散流水线实现,我们建议使用 Optimum for Intel Gaudi。

Update on GitHub