Diffusers documentation
Utilities
Get started
Tutorials
Using Diffusers
Loading & Hub
OverviewLoad pipelines, models, and schedulersLoad and compare different schedulersLoad community pipelinesLoad safetensorsLoad different Stable Diffusion formatsPush files to the Hub
Tasks
Techniques
Textual inversionDistributed inference with multiple GPUsImprove image quality with deterministic generationControl image brightnessPrompt weighting
Pipelines for Inference
OverviewStable Diffusion XLControlNetShap-EDiffEditDistilled Stable Diffusion inferenceCreate reproducible pipelinesCommunity pipelinesHow to contribute a community pipeline
Training
OverviewCreate a dataset for trainingAdapt a model to a new taskUnconditional image generationTextual InversionDreamBoothText-to-imageLow-Rank Adaptation of Large Language Models (LoRA)ControlNetInstructPix2Pix TrainingCustom DiffusionT2I-Adapters
Taking Diffusers Beyond Images
Optimization/Special Hardware
OverviewMemory and SpeedTorch2.0 supportStable Diffusion in JAX/FlaxxFormersONNXOpenVINOCore MLMPSHabana GaudiToken Merging
Conceptual Guides
PhilosophyControlled generationHow to contribute?Diffusers' Ethical GuidelinesEvaluating Diffusion Models
API
Main Classes
Models
OverviewUNet1DModelUNet2DModelUNet2DConditionModelUNet3DConditionModelVQModelAutoencoderKLAsymmetricAutoencoderKLTiny AutoEncoderTransformer2DTransformer TemporalPrior TransformerControlNet
Pipelines
OverviewAltDiffusionAttend-and-ExciteAudio DiffusionAudioLDMAudioLDM 2AutoPipelineConsistency ModelsControlNetControlNet with Stable Diffusion XLCycle DiffusionDance DiffusionDDIMDDPMDeepFloyd IFDiffEditDiTInstructPix2PixKandinskyKandinsky 2.2Latent DiffusionMultiDiffusionMusicLDMPaintByExampleParallel Sampling of Diffusion ModelsPix2Pix ZeroPNDMRePaintScore SDE VESelf-Attention GuidanceSemantic GuidanceShap-ESpectrogram Diffusion
Stable Diffusion
OverviewText-to-imageImage-to-imageInpaintingDepth-to-imageImage variationSafe Stable DiffusionStable Diffusion 2Stable Diffusion XLLatent upscalerSuper-resolutionLDM3D Text-to-(RGB, Depth)Stable Diffusion T2I-adapterGLIGEN (Grounded Language-to-Image Generation)
Stable unCLIPStochastic Karras VEText-to-image model editingText-to-videoText2Video-ZeroUnCLIPUnconditional Latent DiffusionUniDiffuserValue-guided samplingVersatile DiffusionVQ DiffusionWuerstchenSchedulers
OverviewCMStochasticIterativeSchedulerDDIMInverseSchedulerDDIMSchedulerDDPMSchedulerDEISMultistepSchedulerDPMSolverMultistepInverseDPMSolverMultistepSchedulerDPMSolverSDESchedulerDPMSolverSinglestepSchedulerEulerAncestralDiscreteSchedulerEulerDiscreteSchedulerHeunDiscreteSchedulerIPNDMSchedulerKarrasVeSchedulerKDPM2AncestralDiscreteSchedulerKDPM2DiscreteSchedulerLMSDiscreteSchedulerPNDMSchedulerRePaintSchedulerScoreSdeVeSchedulerScoreSdeVpSchedulerUniPCMultistepSchedulerVQDiffusionScheduler
You are viewing v0.21.0 version. A newer version v0.38.0 is available.
Utilities
Utility and helper functions for working with 🤗 Diffusers.
numpy_to_pil
Convert a numpy image or a batch of images to a PIL image.
pt_to_pil
Convert a torch image to a PIL image.
load_image
diffusers.utils.load_image
< source >(
image: typing.Union[str, PIL.Image.Image]
)
→
PIL.Image.Image
Loads image to a PIL Image.
export_to_gif
diffusers.utils.export_to_gif
< source >( image: typing.List[PIL.Image.Image] output_gif_path: str = None )
export_to_video
diffusers.utils.export_to_video
< source >( video_frames: typing.List[numpy.ndarray] output_video_path: str = None )
make_image_grid
diffusers.utils.make_image_grid
< source >( images: typing.List[PIL.Image.Image] rows: int cols: int resize: int = None )
Prepares a single grid of images. Useful for visualization purposes.