Diffusers documentation
How to use OpenVINO for inference
Get started
Tutorials
Using Diffusers
Loading & Hub
OverviewLoad pipelines, models, and schedulersLoad and compare different schedulersLoad community pipelinesLoad KerasCV Stable Diffusion checkpoints
Pipelines for Inference
OverviewUnconditional image generationText-to-image generationText-guided image-to-imageText-guided image-inpaintingText-guided depth-to-imageImprove image quality with deterministic generationCreate reproducible pipelinesCommunity pipelinesHow to contribute a community pipelineUsing safetensorsStable Diffusion in JAX/FlaxWeighting Prompts
Training
OverviewUnconditional image generationTextual InversionDreamBoothText-to-imageLow-Rank Adaptation of Large Language Models (LoRA)ControlNetInstructPix2Pix TrainingCustom Diffusion
Taking Diffusers Beyond Images
Optimization/Special Hardware
Conceptual Guides
PhilosophyControlled generationHow to contribute?Diffusers' Ethical GuidelinesEvaluating Diffusion Models
API
Main Classes
Pipelines
OverviewAltDiffusionAudio DiffusionAudioLDMCycle DiffusionDance DiffusionDDIMDDPMDiTIFLatent DiffusionPaintByExamplePNDMRePaintSafe Stable DiffusionScore SDE VESemantic GuidanceSpectrogram Diffusion
Stable Diffusion
OverviewText-to-ImageImage-to-ImageInpaintDepth-to-ImageImage-VariationSuper-ResolutionStable-Diffusion-Latent-UpscalerInstructPix2PixAttend and ExcitePix2Pix ZeroSelf-Attention GuidanceMultiDiffusion PanoramaText-to-Image Generation with ControlNet ConditioningText-to-Image Model Editing
Stable Diffusion 2Stable unCLIPStochastic Karras VEText-to-VideoText-to-Video ZeroUnCLIPUnconditional Latent DiffusionVersatile DiffusionVQ DiffusionSchedulers
OverviewDDIMDDIMInverseDDPMDEISDPM Discrete SchedulerDPM Discrete Scheduler with ancestral samplingEuler Ancestral SchedulerEuler schedulerHeun SchedulerIPNDMLinear MultistepMultistep DPM-SolverPNDMRePaint SchedulerSinglestep DPM-SolverStochastic Kerras VEUniPCMultistepSchedulerVE-SDEVP-SDEVQDiffusionScheduler
Experimental Features
You are viewing v0.16.0 version. A newer version v0.38.0 is available.
How to use OpenVINO for inference
🤗 Optimum provides a Stable Diffusion pipeline compatible with OpenVINO. You can now easily perform inference with OpenVINO Runtime on a variety of Intel processors (see the full list of supported devices).
Installation
Install 🤗 Optimum Intel with the following command:
pip install optimum["openvino"]Stable Diffusion Inference
To load an OpenVINO model and run inference with OpenVINO Runtime, you need to replace StableDiffusionPipeline with OVStableDiffusionPipeline. In case you want to load a PyTorch model and convert it to the OpenVINO format on-the-fly, you can set export=True.
from optimum.intel.openvino import OVStableDiffusionPipeline
model_id = "runwayml/stable-diffusion-v1-5"
pipe = OVStableDiffusionPipeline.from_pretrained(model_id, export=True)
prompt = "a photo of an astronaut riding a horse on mars"
images = pipe(prompt).images[0]You can find more examples (such as static reshaping and model compilation) in optimum documentation.