Habana Gaudi
Last updated
Last updated
π Diffusers is compatible with Habana Gaudi through π .
Optimum Habana 1.6 or later, is how to install it.
SynapseAI 1.10.
To generate images with Stable Diffusion 1 and 2 on Gaudi, you need to instantiate two instances:
A pipeline with . This pipeline supports text-to-image generation.
A scheduler with . This scheduler has been optimized for Habana Gaudi.
When initializing the pipeline, you have to specify use_habana=True
to deploy it on HPUs. Furthermore, in order to get the fastest possible generations you should enable HPU graphs with use_hpu_graphs=True
. Finally, you will need to specify a which can be downloaded from the .
Copied
You can then call the pipeline to generate images by batches from one or several prompts:
Copied
first-generation Gaudi
3.80s
0.308 images/s
Gaudi2
1.33s
1.081 images/s
first-generation Gaudi
10.2s
0.108 images/s (batch size = 4)
Gaudi2
3.17s
0.379 images/s (batch size = 8)
For more information, check out Optimum Habanaβs and the provided in the official Github repository.
Here are the latencies for Habana first-generation Gaudi and Gaudi2 with the and Gaudi configurations (mixed precision bf16/fp32):
(512x512 resolution):
(768x768 resolution):