# Intel Gaudi

Intel Gaudi AI 가속기 제품군에는 [Intel Gaudi 1](https://habana.ai/products/gaudi/), [Intel Gaudi 2](https://habana.ai/products/gaudi2/), [Intel Gaudi 3](https://habana.ai/products/gaudi3/)가 포함됩니다. 각 서버에는 Habana Processing Unit(HPU)으로 알려진 8개의 디바이스가 장착되어 있으며, Gaudi 3의 경우 128GB, Gaudi 2의 경우 96GB, 1세대 Gaudi의 경우 32GB의 메모리를 제공합니다. 기본 하드웨어 아키텍처에 대한 자세한 내용은 [Gaudi Architecture](https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html) 개요를 참고하세요.

Diffusers 파이프라인은 [GPU Migration Toolkit](https://docs.habana.ai/en/latest/PyTorch/PyTorch_Model_Porting/GPU_Migration_Toolkit/GPU_Migration_Toolkit.html)을 사용하면, 해당 파이프라인이 아직 [Optimum for Intel Gaudi](https://huggingface.co/docs/optimum/main/en/habana/index)에 추가되지 않았더라도 HPU 가속을 활용할 수 있습니다.

아래와 같이 Flux의 경우, 파이프라인에 `.to("hpu")`를 호출하여 HPU 장치로 이동합니다:
```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]
> Gaudi 최적화 diffusion pipeline 구현을 위해 [Optimum for Intel Gaudi](https://huggingface.co/docs/optimum/main/en/habana/index) 사용을 권장합니다.

