# Intel Gaudi

Họ gia tốc AI Intel Gaudi bao gồm [Intel Gaudi 1](https://habana.ai/products/gaudi/), [Intel Gaudi 2](https://habana.ai/products/gaudi2/) và [Intel Gaudi 3](https://habana.ai/products/gaudi3/). Mỗi máy chủ được trang bị 8 thiết bị, được gọi là Habana Processing Units (HPU), cung cấp 128GB bộ nhớ trên Gaudi 3, 96GB trên Gaudi 2 và 32GB trên Gaudi thế hệ đầu. Để biết thêm chi tiết về kiến trúc phần cứng cơ bản, hãy xem phần tổng quan về [Gaudi Architecture](https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html).

Các pipeline của Diffusers có thể tận dụng khả năng tăng tốc HPU, ngay cả khi pipeline đó chưa được thêm vào [Optimum for Intel Gaudi](https://huggingface.co/docs/optimum/main/en/habana/index), nhờ vào [GPU Migration Toolkit](https://docs.habana.ai/en/latest/PyTorch/PyTorch_Model_Porting/GPU_Migration_Toolkit/GPU_Migration_Toolkit.html).

Gọi `.to("hpu")` trên pipeline của bạn để chuyển nó sang thiết bị HPU như minh họa bên dưới cho Flux:
```py
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]
```

> [!TIP]
> Đối với các triển khai pipeline khuếch tán được tối ưu hóa cho Gaudi, chúng tôi khuyến nghị sử dụng [Optimum for Intel Gaudi](https://huggingface.co/docs/optimum/main/en/habana/index).

