Optimum documentation
IPU Diffusers
IPU Diffusers
A few π€ diffusers have been adapted for use with IPUs. The available IPU diffusers are:
API reference
IPUStableDiffusionPipeline class
This class is based on the π€ StableDiffusionPipeline pipeline.
Run the following notebooks to see how this pipeline is used:
- Stable Diffusion Text-to-Image Generation on IPUs
- Text-to-Image Generation on IPUs using Stable Diffusion 2.0 - Inference
IPUStableDiffusionImg2ImgPipeline class
This class is based on the π€ StableDiffusionImg2ImgPipeline pipeline.
Run the Stable Diffusion Image-to-Image Generation on IPUs notebook for an example of how this pipeline is used.
class optimum.graphcore.diffusers.IPUStableDiffusionImg2ImgPipeline
< source >( vae text_encoder tokenizer unet scheduler safety_checker feature_extractor requires_safety_checker = True n_ipu = 4 num_prompts = 1 num_images_per_prompt = 1 unet_ipu_config = None text_encoder_ipu_config = None vae_ipu_config = None safety_checker_ipu_config = None common_ipu_config_kwargs = None )
IPUStableDiffusionInpaintPipeline class
Based on the π€ StableDiffusionInpaintPipeline pipeline.
Run the Text-guided Inpainting on IPUs using Stable Diffusion - Inference notebook for an example of how this pipeline is used.
class optimum.graphcore.diffusers.IPUStableDiffusionInpaintPipeline
< source >( vae text_encoder tokenizer unet scheduler safety_checker feature_extractor requires_safety_checker = True n_ipu = 4 num_prompts = 1 num_images_per_prompt = 1 unet_ipu_config = None text_encoder_ipu_config = None vae_ipu_config = None safety_checker_ipu_config = None common_ipu_config_kwargs = None )