+
+## Popular libraries using 🧨 Diffusers
+
+- https://github.com/microsoft/TaskMatrix
+- https://github.com/invoke-ai/InvokeAI
+- https://github.com/apple/ml-stable-diffusion
+- https://github.com/Sanster/lama-cleaner
+- https://github.com/IDEA-Research/Grounded-Segment-Anything
+- https://github.com/ashawkey/stable-dreamfusion
+- https://github.com/deep-floyd/IF
+- https://github.com/bentoml/BentoML
+- https://github.com/bmaltais/kohya_ss
+- +14,000 other amazing GitHub repositories 💪
+
+Thank you for using us ❤️.
+
+## Credits
+
+This library concretizes previous work by many different authors and would not have been possible without their great research and implementations. We'd like to thank, in particular, the following implementations which have helped us in our development and without which the API could not have been as polished today:
+
+- @CompVis' latent diffusion models library, available [here](https://github.com/CompVis/latent-diffusion)
+- @hojonathanho original DDPM implementation, available [here](https://github.com/hojonathanho/diffusion) as well as the extremely useful translation into PyTorch by @pesser, available [here](https://github.com/pesser/pytorch_diffusion)
+- @ermongroup's DDIM implementation, available [here](https://github.com/ermongroup/ddim)
+- @yang-song's Score-VE and Score-VP implementations, available [here](https://github.com/yang-song/score_sde_pytorch)
+
+We also want to thank @heejkoo for the very helpful overview of papers, code and resources on diffusion models, available [here](https://github.com/heejkoo/Awesome-Diffusion-Models) as well as @crowsonkb and @rromb for useful discussions and insights.
+
+## Citation
+
+```bibtex
+@misc{von-platen-etal-2022-diffusers,
+ author = {Patrick von Platen and Suraj Patil and Anton Lozhkov and Pedro Cuenca and Nathan Lambert and Kashif Rasul and Mishig Davaadorj and Dhruv Nair and Sayak Paul and William Berman and Yiyi Xu and Steven Liu and Thomas Wolf},
+ title = {Diffusers: State-of-the-art diffusion models},
+ year = {2022},
+ publisher = {GitHub},
+ journal = {GitHub repository},
+ howpublished = {\url{https://github.com/huggingface/diffusers}}
+}
+```
diff --git a/src/diffusers.egg-info/SOURCES.txt b/src/diffusers.egg-info/SOURCES.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d4d83cb6ea637b7de8db778916d225f27fe877cb
--- /dev/null
+++ b/src/diffusers.egg-info/SOURCES.txt
@@ -0,0 +1,477 @@
+LICENSE
+MANIFEST.in
+README.md
+pyproject.toml
+setup.py
+src/diffusers/__init__.py
+src/diffusers/callbacks.py
+src/diffusers/configuration_utils.py
+src/diffusers/dependency_versions_check.py
+src/diffusers/dependency_versions_table.py
+src/diffusers/image_processor.py
+src/diffusers/optimization.py
+src/diffusers/py.typed
+src/diffusers/training_utils.py
+src/diffusers/video_processor.py
+src/diffusers.egg-info/PKG-INFO
+src/diffusers.egg-info/SOURCES.txt
+src/diffusers.egg-info/dependency_links.txt
+src/diffusers.egg-info/entry_points.txt
+src/diffusers.egg-info/requires.txt
+src/diffusers.egg-info/top_level.txt
+src/diffusers/commands/__init__.py
+src/diffusers/commands/diffusers_cli.py
+src/diffusers/commands/env.py
+src/diffusers/commands/fp16_safetensors.py
+src/diffusers/experimental/__init__.py
+src/diffusers/experimental/rl/__init__.py
+src/diffusers/experimental/rl/value_guided_sampling.py
+src/diffusers/loaders/__init__.py
+src/diffusers/loaders/ip_adapter.py
+src/diffusers/loaders/lora_base.py
+src/diffusers/loaders/lora_conversion_utils.py
+src/diffusers/loaders/lora_pipeline.py
+src/diffusers/loaders/peft.py
+src/diffusers/loaders/single_file.py
+src/diffusers/loaders/single_file_model.py
+src/diffusers/loaders/single_file_utils.py
+src/diffusers/loaders/textual_inversion.py
+src/diffusers/loaders/unet.py
+src/diffusers/loaders/unet_loader_utils.py
+src/diffusers/loaders/utils.py
+src/diffusers/models/__init__.py
+src/diffusers/models/activations.py
+src/diffusers/models/adapter.py
+src/diffusers/models/attention.py
+src/diffusers/models/attention_flax.py
+src/diffusers/models/attention_processor.py
+src/diffusers/models/controlnet.py
+src/diffusers/models/controlnet_flax.py
+src/diffusers/models/controlnet_hunyuan.py
+src/diffusers/models/controlnet_sd3.py
+src/diffusers/models/controlnet_sparsectrl.py
+src/diffusers/models/controlnet_xs.py
+src/diffusers/models/downsampling.py
+src/diffusers/models/embeddings.py
+src/diffusers/models/embeddings_flax.py
+src/diffusers/models/lora.py
+src/diffusers/models/model_loading_utils.py
+src/diffusers/models/modeling_flax_pytorch_utils.py
+src/diffusers/models/modeling_flax_utils.py
+src/diffusers/models/modeling_outputs.py
+src/diffusers/models/modeling_pytorch_flax_utils.py
+src/diffusers/models/modeling_utils.py
+src/diffusers/models/normalization.py
+src/diffusers/models/resnet.py
+src/diffusers/models/resnet_flax.py
+src/diffusers/models/upsampling.py
+src/diffusers/models/vae_flax.py
+src/diffusers/models/vq_model.py
+src/diffusers/models/autoencoders/__init__.py
+src/diffusers/models/autoencoders/autoencoder_asym_kl.py
+src/diffusers/models/autoencoders/autoencoder_kl.py
+src/diffusers/models/autoencoders/autoencoder_kl_cogvideox.py
+src/diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py
+src/diffusers/models/autoencoders/autoencoder_oobleck.py
+src/diffusers/models/autoencoders/autoencoder_tiny.py
+src/diffusers/models/autoencoders/consistency_decoder_vae.py
+src/diffusers/models/autoencoders/vae.py
+src/diffusers/models/autoencoders/vq_model.py
+src/diffusers/models/transformers/__init__.py
+src/diffusers/models/transformers/auraflow_transformer_2d.py
+src/diffusers/models/transformers/cogvideox_transformer_3d.py
+src/diffusers/models/transformers/dit_transformer_2d.py
+src/diffusers/models/transformers/dual_transformer_2d.py
+src/diffusers/models/transformers/hunyuan_transformer_2d.py
+src/diffusers/models/transformers/latte_transformer_3d.py
+src/diffusers/models/transformers/lumina_nextdit2d.py
+src/diffusers/models/transformers/pixart_transformer_2d.py
+src/diffusers/models/transformers/prior_transformer.py
+src/diffusers/models/transformers/stable_audio_transformer.py
+src/diffusers/models/transformers/t5_film_transformer.py
+src/diffusers/models/transformers/transformer_2d.py
+src/diffusers/models/transformers/transformer_flux.py
+src/diffusers/models/transformers/transformer_sd3.py
+src/diffusers/models/transformers/transformer_temporal.py
+src/diffusers/models/unets/__init__.py
+src/diffusers/models/unets/unet_1d.py
+src/diffusers/models/unets/unet_1d_blocks.py
+src/diffusers/models/unets/unet_2d.py
+src/diffusers/models/unets/unet_2d_blocks.py
+src/diffusers/models/unets/unet_2d_blocks_flax.py
+src/diffusers/models/unets/unet_2d_condition.py
+src/diffusers/models/unets/unet_2d_condition_flax.py
+src/diffusers/models/unets/unet_3d_blocks.py
+src/diffusers/models/unets/unet_3d_condition.py
+src/diffusers/models/unets/unet_i2vgen_xl.py
+src/diffusers/models/unets/unet_kandinsky3.py
+src/diffusers/models/unets/unet_motion_model.py
+src/diffusers/models/unets/unet_spatio_temporal_condition.py
+src/diffusers/models/unets/unet_stable_cascade.py
+src/diffusers/models/unets/uvit_2d.py
+src/diffusers/pipelines/__init__.py
+src/diffusers/pipelines/auto_pipeline.py
+src/diffusers/pipelines/free_init_utils.py
+src/diffusers/pipelines/free_noise_utils.py
+src/diffusers/pipelines/onnx_utils.py
+src/diffusers/pipelines/pipeline_flax_utils.py
+src/diffusers/pipelines/pipeline_loading_utils.py
+src/diffusers/pipelines/pipeline_utils.py
+src/diffusers/pipelines/amused/__init__.py
+src/diffusers/pipelines/amused/pipeline_amused.py
+src/diffusers/pipelines/amused/pipeline_amused_img2img.py
+src/diffusers/pipelines/amused/pipeline_amused_inpaint.py
+src/diffusers/pipelines/animatediff/__init__.py
+src/diffusers/pipelines/animatediff/pipeline_animatediff.py
+src/diffusers/pipelines/animatediff/pipeline_animatediff_controlnet.py
+src/diffusers/pipelines/animatediff/pipeline_animatediff_sdxl.py
+src/diffusers/pipelines/animatediff/pipeline_animatediff_sparsectrl.py
+src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py
+src/diffusers/pipelines/animatediff/pipeline_output.py
+src/diffusers/pipelines/audioldm/__init__.py
+src/diffusers/pipelines/audioldm/pipeline_audioldm.py
+src/diffusers/pipelines/audioldm2/__init__.py
+src/diffusers/pipelines/audioldm2/modeling_audioldm2.py
+src/diffusers/pipelines/audioldm2/pipeline_audioldm2.py
+src/diffusers/pipelines/aura_flow/__init__.py
+src/diffusers/pipelines/aura_flow/pipeline_aura_flow.py
+src/diffusers/pipelines/blip_diffusion/__init__.py
+src/diffusers/pipelines/blip_diffusion/blip_image_processing.py
+src/diffusers/pipelines/blip_diffusion/modeling_blip2.py
+src/diffusers/pipelines/blip_diffusion/modeling_ctx_clip.py
+src/diffusers/pipelines/blip_diffusion/pipeline_blip_diffusion.py
+src/diffusers/pipelines/cogvideo/__init__.py
+src/diffusers/pipelines/cogvideo/pipeline_cogvideox.py
+src/diffusers/pipelines/consistency_models/__init__.py
+src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py
+src/diffusers/pipelines/controlnet/__init__.py
+src/diffusers/pipelines/controlnet/multicontrolnet.py
+src/diffusers/pipelines/controlnet/pipeline_controlnet.py
+src/diffusers/pipelines/controlnet/pipeline_controlnet_blip_diffusion.py
+src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py
+src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py
+src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py
+src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py
+src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
+src/diffusers/pipelines/controlnet/pipeline_flax_controlnet.py
+src/diffusers/pipelines/controlnet_hunyuandit/__init__.py
+src/diffusers/pipelines/controlnet_hunyuandit/pipeline_hunyuandit_controlnet.py
+src/diffusers/pipelines/controlnet_sd3/__init__.py
+src/diffusers/pipelines/controlnet_sd3/pipeline_stable_diffusion_3_controlnet.py
+src/diffusers/pipelines/controlnet_xs/__init__.py
+src/diffusers/pipelines/controlnet_xs/pipeline_controlnet_xs.py
+src/diffusers/pipelines/controlnet_xs/pipeline_controlnet_xs_sd_xl.py
+src/diffusers/pipelines/dance_diffusion/__init__.py
+src/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py
+src/diffusers/pipelines/ddim/__init__.py
+src/diffusers/pipelines/ddim/pipeline_ddim.py
+src/diffusers/pipelines/ddpm/__init__.py
+src/diffusers/pipelines/ddpm/pipeline_ddpm.py
+src/diffusers/pipelines/deepfloyd_if/__init__.py
+src/diffusers/pipelines/deepfloyd_if/pipeline_if.py
+src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py
+src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py
+src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py
+src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py
+src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py
+src/diffusers/pipelines/deepfloyd_if/pipeline_output.py
+src/diffusers/pipelines/deepfloyd_if/safety_checker.py
+src/diffusers/pipelines/deepfloyd_if/timesteps.py
+src/diffusers/pipelines/deepfloyd_if/watermark.py
+src/diffusers/pipelines/deprecated/__init__.py
+src/diffusers/pipelines/deprecated/alt_diffusion/__init__.py
+src/diffusers/pipelines/deprecated/alt_diffusion/modeling_roberta_series.py
+src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py
+src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py
+src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_output.py
+src/diffusers/pipelines/deprecated/audio_diffusion/__init__.py
+src/diffusers/pipelines/deprecated/audio_diffusion/mel.py
+src/diffusers/pipelines/deprecated/audio_diffusion/pipeline_audio_diffusion.py
+src/diffusers/pipelines/deprecated/latent_diffusion_uncond/__init__.py
+src/diffusers/pipelines/deprecated/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py
+src/diffusers/pipelines/deprecated/pndm/__init__.py
+src/diffusers/pipelines/deprecated/pndm/pipeline_pndm.py
+src/diffusers/pipelines/deprecated/repaint/__init__.py
+src/diffusers/pipelines/deprecated/repaint/pipeline_repaint.py
+src/diffusers/pipelines/deprecated/score_sde_ve/__init__.py
+src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py
+src/diffusers/pipelines/deprecated/spectrogram_diffusion/__init__.py
+src/diffusers/pipelines/deprecated/spectrogram_diffusion/continuous_encoder.py
+src/diffusers/pipelines/deprecated/spectrogram_diffusion/midi_utils.py
+src/diffusers/pipelines/deprecated/spectrogram_diffusion/notes_encoder.py
+src/diffusers/pipelines/deprecated/spectrogram_diffusion/pipeline_spectrogram_diffusion.py
+src/diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py
+src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py
+src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_onnx_stable_diffusion_inpaint_legacy.py
+src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py
+src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py
+src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py
+src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py
+src/diffusers/pipelines/deprecated/stochastic_karras_ve/__init__.py
+src/diffusers/pipelines/deprecated/stochastic_karras_ve/pipeline_stochastic_karras_ve.py
+src/diffusers/pipelines/deprecated/versatile_diffusion/__init__.py
+src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py
+src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion.py
+src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py
+src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py
+src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py
+src/diffusers/pipelines/deprecated/vq_diffusion/__init__.py
+src/diffusers/pipelines/deprecated/vq_diffusion/pipeline_vq_diffusion.py
+src/diffusers/pipelines/dit/__init__.py
+src/diffusers/pipelines/dit/pipeline_dit.py
+src/diffusers/pipelines/flux/__init__.py
+src/diffusers/pipelines/flux/pipeline_flux.py
+src/diffusers/pipelines/flux/pipeline_output.py
+src/diffusers/pipelines/hunyuandit/__init__.py
+src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py
+src/diffusers/pipelines/i2vgen_xl/__init__.py
+src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py
+src/diffusers/pipelines/kandinsky/__init__.py
+src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py
+src/diffusers/pipelines/kandinsky/pipeline_kandinsky_combined.py
+src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py
+src/diffusers/pipelines/kandinsky/pipeline_kandinsky_inpaint.py
+src/diffusers/pipelines/kandinsky/pipeline_kandinsky_prior.py
+src/diffusers/pipelines/kandinsky/text_encoder.py
+src/diffusers/pipelines/kandinsky2_2/__init__.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet_img2img.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_img2img.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py
+src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior_emb2emb.py
+src/diffusers/pipelines/kandinsky3/__init__.py
+src/diffusers/pipelines/kandinsky3/convert_kandinsky3_unet.py
+src/diffusers/pipelines/kandinsky3/pipeline_kandinsky3.py
+src/diffusers/pipelines/kandinsky3/pipeline_kandinsky3_img2img.py
+src/diffusers/pipelines/kolors/__init__.py
+src/diffusers/pipelines/kolors/pipeline_kolors.py
+src/diffusers/pipelines/kolors/pipeline_kolors_img2img.py
+src/diffusers/pipelines/kolors/pipeline_output.py
+src/diffusers/pipelines/kolors/text_encoder.py
+src/diffusers/pipelines/kolors/tokenizer.py
+src/diffusers/pipelines/latent_consistency_models/__init__.py
+src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py
+src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py
+src/diffusers/pipelines/latent_diffusion/__init__.py
+src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py
+src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py
+src/diffusers/pipelines/latte/__init__.py
+src/diffusers/pipelines/latte/pipeline_latte.py
+src/diffusers/pipelines/ledits_pp/__init__.py
+src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py
+src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion_xl.py
+src/diffusers/pipelines/ledits_pp/pipeline_output.py
+src/diffusers/pipelines/lumina/__init__.py
+src/diffusers/pipelines/lumina/pipeline_lumina.py
+src/diffusers/pipelines/marigold/__init__.py
+src/diffusers/pipelines/marigold/marigold_image_processing.py
+src/diffusers/pipelines/marigold/pipeline_marigold_depth.py
+src/diffusers/pipelines/marigold/pipeline_marigold_normals.py
+src/diffusers/pipelines/musicldm/__init__.py
+src/diffusers/pipelines/musicldm/pipeline_musicldm.py
+src/diffusers/pipelines/pag/__init__.py
+src/diffusers/pipelines/pag/pag_utils.py
+src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd.py
+src/diffusers/pipelines/pag/pipeline_pag_controlnet_sd_xl.py
+src/diffusers/pipelines/pag/pipeline_pag_hunyuandit.py
+src/diffusers/pipelines/pag/pipeline_pag_kolors.py
+src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py
+src/diffusers/pipelines/pag/pipeline_pag_sd.py
+src/diffusers/pipelines/pag/pipeline_pag_sd_3.py
+src/diffusers/pipelines/pag/pipeline_pag_sd_animatediff.py
+src/diffusers/pipelines/pag/pipeline_pag_sd_xl.py
+src/diffusers/pipelines/pag/pipeline_pag_sd_xl_img2img.py
+src/diffusers/pipelines/pag/pipeline_pag_sd_xl_inpaint.py
+src/diffusers/pipelines/paint_by_example/__init__.py
+src/diffusers/pipelines/paint_by_example/image_encoder.py
+src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py
+src/diffusers/pipelines/pia/__init__.py
+src/diffusers/pipelines/pia/pipeline_pia.py
+src/diffusers/pipelines/pixart_alpha/__init__.py
+src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py
+src/diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py
+src/diffusers/pipelines/semantic_stable_diffusion/__init__.py
+src/diffusers/pipelines/semantic_stable_diffusion/pipeline_output.py
+src/diffusers/pipelines/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py
+src/diffusers/pipelines/shap_e/__init__.py
+src/diffusers/pipelines/shap_e/camera.py
+src/diffusers/pipelines/shap_e/pipeline_shap_e.py
+src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py
+src/diffusers/pipelines/shap_e/renderer.py
+src/diffusers/pipelines/stable_audio/__init__.py
+src/diffusers/pipelines/stable_audio/modeling_stable_audio.py
+src/diffusers/pipelines/stable_audio/pipeline_stable_audio.py
+src/diffusers/pipelines/stable_cascade/__init__.py
+src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade.py
+src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py
+src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_prior.py
+src/diffusers/pipelines/stable_diffusion/__init__.py
+src/diffusers/pipelines/stable_diffusion/clip_image_project_model.py
+src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py
+src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py
+src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_img2img.py
+src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py
+src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py
+src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py
+src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py
+src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py
+src/diffusers/pipelines/stable_diffusion/pipeline_output.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py
+src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py
+src/diffusers/pipelines/stable_diffusion/safety_checker.py
+src/diffusers/pipelines/stable_diffusion/safety_checker_flax.py
+src/diffusers/pipelines/stable_diffusion/stable_unclip_image_normalizer.py
+src/diffusers/pipelines/stable_diffusion_3/__init__.py
+src/diffusers/pipelines/stable_diffusion_3/pipeline_output.py
+src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3.py
+src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_img2img.py
+src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py
+src/diffusers/pipelines/stable_diffusion_attend_and_excite/__init__.py
+src/diffusers/pipelines/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py
+src/diffusers/pipelines/stable_diffusion_diffedit/__init__.py
+src/diffusers/pipelines/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py
+src/diffusers/pipelines/stable_diffusion_gligen/__init__.py
+src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py
+src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py
+src/diffusers/pipelines/stable_diffusion_k_diffusion/__init__.py
+src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_k_diffusion.py
+src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_xl_k_diffusion.py
+src/diffusers/pipelines/stable_diffusion_ldm3d/__init__.py
+src/diffusers/pipelines/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py
+src/diffusers/pipelines/stable_diffusion_panorama/__init__.py
+src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py
+src/diffusers/pipelines/stable_diffusion_safe/__init__.py
+src/diffusers/pipelines/stable_diffusion_safe/pipeline_output.py
+src/diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py
+src/diffusers/pipelines/stable_diffusion_safe/safety_checker.py
+src/diffusers/pipelines/stable_diffusion_sag/__init__.py
+src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py
+src/diffusers/pipelines/stable_diffusion_xl/__init__.py
+src/diffusers/pipelines/stable_diffusion_xl/pipeline_flax_stable_diffusion_xl.py
+src/diffusers/pipelines/stable_diffusion_xl/pipeline_output.py
+src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py
+src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py
+src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py
+src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py
+src/diffusers/pipelines/stable_diffusion_xl/watermark.py
+src/diffusers/pipelines/stable_video_diffusion/__init__.py
+src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py
+src/diffusers/pipelines/t2i_adapter/__init__.py
+src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py
+src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py
+src/diffusers/pipelines/text_to_video_synthesis/__init__.py
+src/diffusers/pipelines/text_to_video_synthesis/pipeline_output.py
+src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py
+src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py
+src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py
+src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py
+src/diffusers/pipelines/unclip/__init__.py
+src/diffusers/pipelines/unclip/pipeline_unclip.py
+src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py
+src/diffusers/pipelines/unclip/text_proj.py
+src/diffusers/pipelines/unidiffuser/__init__.py
+src/diffusers/pipelines/unidiffuser/modeling_text_decoder.py
+src/diffusers/pipelines/unidiffuser/modeling_uvit.py
+src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py
+src/diffusers/pipelines/wuerstchen/__init__.py
+src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py
+src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py
+src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_diffnext.py
+src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_prior.py
+src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py
+src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py
+src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py
+src/diffusers/schedulers/__init__.py
+src/diffusers/schedulers/scheduling_amused.py
+src/diffusers/schedulers/scheduling_consistency_decoder.py
+src/diffusers/schedulers/scheduling_consistency_models.py
+src/diffusers/schedulers/scheduling_cosine_dpmsolver_multistep.py
+src/diffusers/schedulers/scheduling_ddim.py
+src/diffusers/schedulers/scheduling_ddim_cogvideox.py
+src/diffusers/schedulers/scheduling_ddim_flax.py
+src/diffusers/schedulers/scheduling_ddim_inverse.py
+src/diffusers/schedulers/scheduling_ddim_parallel.py
+src/diffusers/schedulers/scheduling_ddpm.py
+src/diffusers/schedulers/scheduling_ddpm_flax.py
+src/diffusers/schedulers/scheduling_ddpm_parallel.py
+src/diffusers/schedulers/scheduling_ddpm_wuerstchen.py
+src/diffusers/schedulers/scheduling_deis_multistep.py
+src/diffusers/schedulers/scheduling_dpm_cogvideox.py
+src/diffusers/schedulers/scheduling_dpmsolver_multistep.py
+src/diffusers/schedulers/scheduling_dpmsolver_multistep_flax.py
+src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py
+src/diffusers/schedulers/scheduling_dpmsolver_sde.py
+src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py
+src/diffusers/schedulers/scheduling_edm_dpmsolver_multistep.py
+src/diffusers/schedulers/scheduling_edm_euler.py
+src/diffusers/schedulers/scheduling_euler_ancestral_discrete.py
+src/diffusers/schedulers/scheduling_euler_discrete.py
+src/diffusers/schedulers/scheduling_euler_discrete_flax.py
+src/diffusers/schedulers/scheduling_flow_match_euler_discrete.py
+src/diffusers/schedulers/scheduling_flow_match_heun_discrete.py
+src/diffusers/schedulers/scheduling_heun_discrete.py
+src/diffusers/schedulers/scheduling_ipndm.py
+src/diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py
+src/diffusers/schedulers/scheduling_k_dpm_2_discrete.py
+src/diffusers/schedulers/scheduling_karras_ve_flax.py
+src/diffusers/schedulers/scheduling_lcm.py
+src/diffusers/schedulers/scheduling_lms_discrete.py
+src/diffusers/schedulers/scheduling_lms_discrete_flax.py
+src/diffusers/schedulers/scheduling_pndm.py
+src/diffusers/schedulers/scheduling_pndm_flax.py
+src/diffusers/schedulers/scheduling_repaint.py
+src/diffusers/schedulers/scheduling_sasolver.py
+src/diffusers/schedulers/scheduling_sde_ve.py
+src/diffusers/schedulers/scheduling_sde_ve_flax.py
+src/diffusers/schedulers/scheduling_tcd.py
+src/diffusers/schedulers/scheduling_unclip.py
+src/diffusers/schedulers/scheduling_unipc_multistep.py
+src/diffusers/schedulers/scheduling_utils.py
+src/diffusers/schedulers/scheduling_utils_flax.py
+src/diffusers/schedulers/scheduling_vq_diffusion.py
+src/diffusers/schedulers/deprecated/__init__.py
+src/diffusers/schedulers/deprecated/scheduling_karras_ve.py
+src/diffusers/schedulers/deprecated/scheduling_sde_vp.py
+src/diffusers/utils/__init__.py
+src/diffusers/utils/accelerate_utils.py
+src/diffusers/utils/constants.py
+src/diffusers/utils/deprecation_utils.py
+src/diffusers/utils/doc_utils.py
+src/diffusers/utils/dummy_flax_and_transformers_objects.py
+src/diffusers/utils/dummy_flax_objects.py
+src/diffusers/utils/dummy_note_seq_objects.py
+src/diffusers/utils/dummy_onnx_objects.py
+src/diffusers/utils/dummy_pt_objects.py
+src/diffusers/utils/dummy_torch_and_librosa_objects.py
+src/diffusers/utils/dummy_torch_and_scipy_objects.py
+src/diffusers/utils/dummy_torch_and_torchsde_objects.py
+src/diffusers/utils/dummy_torch_and_transformers_and_k_diffusion_objects.py
+src/diffusers/utils/dummy_torch_and_transformers_and_onnx_objects.py
+src/diffusers/utils/dummy_torch_and_transformers_and_sentencepiece_objects.py
+src/diffusers/utils/dummy_torch_and_transformers_objects.py
+src/diffusers/utils/dummy_transformers_and_torch_and_note_seq_objects.py
+src/diffusers/utils/dynamic_modules_utils.py
+src/diffusers/utils/export_utils.py
+src/diffusers/utils/hub_utils.py
+src/diffusers/utils/import_utils.py
+src/diffusers/utils/loading_utils.py
+src/diffusers/utils/logging.py
+src/diffusers/utils/model_card_template.md
+src/diffusers/utils/outputs.py
+src/diffusers/utils/peft_utils.py
+src/diffusers/utils/pil_utils.py
+src/diffusers/utils/state_dict_utils.py
+src/diffusers/utils/testing_utils.py
+src/diffusers/utils/torch_utils.py
+src/diffusers/utils/versions.py
\ No newline at end of file
diff --git a/src/diffusers.egg-info/dependency_links.txt b/src/diffusers.egg-info/dependency_links.txt
new file mode 100644
index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc
--- /dev/null
+++ b/src/diffusers.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/src/diffusers.egg-info/entry_points.txt b/src/diffusers.egg-info/entry_points.txt
new file mode 100644
index 0000000000000000000000000000000000000000..4d8cdefa4968bbed7a122fa7a34940bf9a15360b
--- /dev/null
+++ b/src/diffusers.egg-info/entry_points.txt
@@ -0,0 +1,2 @@
+[console_scripts]
+diffusers-cli = diffusers.commands.diffusers_cli:main
diff --git a/src/diffusers.egg-info/requires.txt b/src/diffusers.egg-info/requires.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9663bbe8b6c7596458141b3ce2fcc3f5f27cc284
--- /dev/null
+++ b/src/diffusers.egg-info/requires.txt
@@ -0,0 +1,84 @@
+importlib_metadata
+filelock
+huggingface-hub>=0.23.2
+numpy
+regex!=2019.12.17
+requests
+safetensors>=0.3.1
+Pillow
+
+[dev]
+urllib3<=2.0.0
+isort>=5.5.4
+ruff==0.1.5
+hf-doc-builder>=0.3.0
+compel==0.1.8
+GitPython<3.1.19
+datasets
+Jinja2
+invisible-watermark>=0.2.0
+k-diffusion>=0.0.12
+librosa
+parameterized
+pytest
+pytest-timeout
+pytest-xdist
+requests-mock==1.10.0
+safetensors>=0.3.1
+sentencepiece!=0.1.92,>=0.1.91
+scipy
+torchvision
+transformers>=4.41.2
+accelerate>=0.31.0
+protobuf<4,>=3.20.3
+tensorboard
+peft>=0.6.0
+torch>=1.4
+jax>=0.4.1
+jaxlib>=0.4.1
+flax>=0.4.1
+
+[docs]
+hf-doc-builder>=0.3.0
+
+[flax]
+jax>=0.4.1
+jaxlib>=0.4.1
+flax>=0.4.1
+
+[quality]
+urllib3<=2.0.0
+isort>=5.5.4
+ruff==0.1.5
+hf-doc-builder>=0.3.0
+
+[test]
+compel==0.1.8
+GitPython<3.1.19
+datasets
+Jinja2
+invisible-watermark>=0.2.0
+k-diffusion>=0.0.12
+librosa
+parameterized
+pytest
+pytest-timeout
+pytest-xdist
+requests-mock==1.10.0
+safetensors>=0.3.1
+sentencepiece!=0.1.92,>=0.1.91
+scipy
+torchvision
+transformers>=4.41.2
+
+[torch]
+torch>=1.4
+accelerate>=0.31.0
+
+[training]
+accelerate>=0.31.0
+datasets
+protobuf<4,>=3.20.3
+tensorboard
+Jinja2
+peft>=0.6.0
diff --git a/src/diffusers.egg-info/top_level.txt b/src/diffusers.egg-info/top_level.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6033efb6dbaaff9bc81792fd75a6b39d9f195aeb
--- /dev/null
+++ b/src/diffusers.egg-info/top_level.txt
@@ -0,0 +1 @@
+diffusers
diff --git a/src/diffusers/__init__.py b/src/diffusers/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..8c9fc47e564238c1c141704de04cb809a07b0338
--- /dev/null
+++ b/src/diffusers/__init__.py
@@ -0,0 +1,959 @@
+__version__ = "0.32.0.dev0"
+
+from typing import TYPE_CHECKING
+
+from .utils import (
+ DIFFUSERS_SLOW_IMPORT,
+ OptionalDependencyNotAvailable,
+ _LazyModule,
+ is_flax_available,
+ is_k_diffusion_available,
+ is_librosa_available,
+ is_note_seq_available,
+ is_onnx_available,
+ is_scipy_available,
+ is_sentencepiece_available,
+ is_torch_available,
+ is_torchsde_available,
+ is_transformers_available,
+)
+
+
+# Lazy Import based on
+# https://github.com/huggingface/transformers/blob/main/src/transformers/__init__.py
+
+# When adding a new object to this init, please add it to `_import_structure`. The `_import_structure` is a dictionary submodule to list of object names,
+# and is used to defer the actual importing for when the objects are requested.
+# This way `import diffusers` provides the names in the namespace without actually importing anything (and especially none of the backends).
+
+_import_structure = {
+ "configuration_utils": ["ConfigMixin"],
+ "loaders": ["FromOriginalModelMixin"],
+ "models": [],
+ "pipelines": [],
+ "quantizers.quantization_config": ["BitsAndBytesConfig"],
+ "schedulers": [],
+ "utils": [
+ "OptionalDependencyNotAvailable",
+ "is_flax_available",
+ "is_inflect_available",
+ "is_invisible_watermark_available",
+ "is_k_diffusion_available",
+ "is_k_diffusion_version",
+ "is_librosa_available",
+ "is_note_seq_available",
+ "is_onnx_available",
+ "is_scipy_available",
+ "is_torch_available",
+ "is_torchsde_available",
+ "is_transformers_available",
+ "is_transformers_version",
+ "is_unidecode_available",
+ "logging",
+ ],
+}
+
+try:
+ if not is_onnx_available():
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_onnx_objects # noqa F403
+
+ _import_structure["utils.dummy_onnx_objects"] = [
+ name for name in dir(dummy_onnx_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["pipelines"].extend(["OnnxRuntimeModel"])
+
+try:
+ if not is_torch_available():
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_pt_objects # noqa F403
+
+ _import_structure["utils.dummy_pt_objects"] = [name for name in dir(dummy_pt_objects) if not name.startswith("_")]
+
+else:
+ _import_structure["models"].extend(
+ [
+ "AsymmetricAutoencoderKL",
+ "AuraFlowTransformer2DModel",
+ "AutoencoderKL",
+ "AutoencoderKLCogVideoX",
+ "AutoencoderKLTemporalDecoder",
+ "AutoencoderOobleck",
+ "AutoencoderTiny",
+ "CogVideoXTransformer3DModel",
+ "CogView3PlusTransformer2DModel",
+ "ConsistencyDecoderVAE",
+ "ControlNetModel",
+ "ControlNetXSAdapter",
+ "DiTTransformer2DModel",
+ "FluxControlNetModel",
+ "FluxMultiControlNetModel",
+ "FluxTransformer2DModel",
+ "HunyuanDiT2DControlNetModel",
+ "HunyuanDiT2DModel",
+ "HunyuanDiT2DMultiControlNetModel",
+ "I2VGenXLUNet",
+ "Kandinsky3UNet",
+ "LatteTransformer3DModel",
+ "LuminaNextDiT2DModel",
+ "ModelMixin",
+ "MotionAdapter",
+ "MultiAdapter",
+ "PixArtTransformer2DModel",
+ "PriorTransformer",
+ "SD3ControlNetModel",
+ "SD3MultiControlNetModel",
+ "SD3Transformer2DModel",
+ "SparseControlNetModel",
+ "StableAudioDiTModel",
+ "StableCascadeUNet",
+ "T2IAdapter",
+ "T5FilmDecoder",
+ "Transformer2DModel",
+ "UNet1DModel",
+ "UNet2DConditionModel",
+ "UNet2DModel",
+ "UNet3DConditionModel",
+ "UNetControlNetXSModel",
+ "UNetMotionModel",
+ "UNetSpatioTemporalConditionModel",
+ "UVit2DModel",
+ "VQModel",
+ ]
+ )
+ _import_structure["optimization"] = [
+ "get_constant_schedule",
+ "get_constant_schedule_with_warmup",
+ "get_cosine_schedule_with_warmup",
+ "get_cosine_with_hard_restarts_schedule_with_warmup",
+ "get_linear_schedule_with_warmup",
+ "get_polynomial_decay_schedule_with_warmup",
+ "get_scheduler",
+ ]
+ _import_structure["pipelines"].extend(
+ [
+ "AudioPipelineOutput",
+ "AutoPipelineForImage2Image",
+ "AutoPipelineForInpainting",
+ "AutoPipelineForText2Image",
+ "ConsistencyModelPipeline",
+ "DanceDiffusionPipeline",
+ "DDIMPipeline",
+ "DDPMPipeline",
+ "DiffusionPipeline",
+ "DiTPipeline",
+ "ImagePipelineOutput",
+ "KarrasVePipeline",
+ "LDMPipeline",
+ "LDMSuperResolutionPipeline",
+ "PNDMPipeline",
+ "RePaintPipeline",
+ "ScoreSdeVePipeline",
+ "StableDiffusionMixin",
+ ]
+ )
+ _import_structure["quantizers"] = ["DiffusersQuantizer"]
+ _import_structure["schedulers"].extend(
+ [
+ "AmusedScheduler",
+ "CMStochasticIterativeScheduler",
+ "CogVideoXDDIMScheduler",
+ "CogVideoXDPMScheduler",
+ "DDIMInverseScheduler",
+ "DDIMParallelScheduler",
+ "DDIMScheduler",
+ "DDPMParallelScheduler",
+ "DDPMScheduler",
+ "DDPMWuerstchenScheduler",
+ "DEISMultistepScheduler",
+ "DPMSolverMultistepInverseScheduler",
+ "DPMSolverMultistepScheduler",
+ "DPMSolverSinglestepScheduler",
+ "EDMDPMSolverMultistepScheduler",
+ "EDMEulerScheduler",
+ "EulerAncestralDiscreteScheduler",
+ "EulerDiscreteScheduler",
+ "FlowMatchEulerDiscreteScheduler",
+ "FlowMatchHeunDiscreteScheduler",
+ "HeunDiscreteScheduler",
+ "IPNDMScheduler",
+ "KarrasVeScheduler",
+ "KDPM2AncestralDiscreteScheduler",
+ "KDPM2DiscreteScheduler",
+ "LCMScheduler",
+ "PNDMScheduler",
+ "RePaintScheduler",
+ "SASolverScheduler",
+ "SchedulerMixin",
+ "ScoreSdeVeScheduler",
+ "TCDScheduler",
+ "UnCLIPScheduler",
+ "UniPCMultistepScheduler",
+ "VQDiffusionScheduler",
+ ]
+ )
+ _import_structure["training_utils"] = ["EMAModel"]
+
+try:
+ if not (is_torch_available() and is_scipy_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_torch_and_scipy_objects # noqa F403
+
+ _import_structure["utils.dummy_torch_and_scipy_objects"] = [
+ name for name in dir(dummy_torch_and_scipy_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["schedulers"].extend(["LMSDiscreteScheduler"])
+
+try:
+ if not (is_torch_available() and is_torchsde_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_torch_and_torchsde_objects # noqa F403
+
+ _import_structure["utils.dummy_torch_and_torchsde_objects"] = [
+ name for name in dir(dummy_torch_and_torchsde_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["schedulers"].extend(["CosineDPMSolverMultistepScheduler", "DPMSolverSDEScheduler"])
+
+try:
+ if not (is_torch_available() and is_transformers_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_torch_and_transformers_objects # noqa F403
+
+ _import_structure["utils.dummy_torch_and_transformers_objects"] = [
+ name for name in dir(dummy_torch_and_transformers_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["pipelines"].extend(
+ [
+ "AltDiffusionImg2ImgPipeline",
+ "AltDiffusionPipeline",
+ "AmusedImg2ImgPipeline",
+ "AmusedInpaintPipeline",
+ "AmusedPipeline",
+ "AnimateDiffControlNetPipeline",
+ "AnimateDiffPAGPipeline",
+ "AnimateDiffPipeline",
+ "AnimateDiffSDXLPipeline",
+ "AnimateDiffSparseControlNetPipeline",
+ "AnimateDiffVideoToVideoControlNetPipeline",
+ "AnimateDiffVideoToVideoPipeline",
+ "AudioLDM2Pipeline",
+ "AudioLDM2ProjectionModel",
+ "AudioLDM2UNet2DConditionModel",
+ "AudioLDMPipeline",
+ "AuraFlowPipeline",
+ "BlipDiffusionControlNetPipeline",
+ "BlipDiffusionPipeline",
+ "CLIPImageProjection",
+ "CogVideoXFunControlPipeline",
+ "CogVideoXImageToVideoPipeline",
+ "CogVideoXPipeline",
+ "CogVideoXVideoToVideoPipeline",
+ "CogView3PlusPipeline",
+ "CycleDiffusionPipeline",
+ "FluxControlNetImg2ImgPipeline",
+ "FluxControlNetInpaintPipeline",
+ "FluxControlNetPipeline",
+ "FluxImg2ImgPipeline",
+ "FluxInpaintPipeline",
+ "FluxPipeline",
+ "HunyuanDiTControlNetPipeline",
+ "HunyuanDiTPAGPipeline",
+ "HunyuanDiTPipeline",
+ "I2VGenXLPipeline",
+ "IFImg2ImgPipeline",
+ "IFImg2ImgSuperResolutionPipeline",
+ "IFInpaintingPipeline",
+ "IFInpaintingSuperResolutionPipeline",
+ "IFPipeline",
+ "IFSuperResolutionPipeline",
+ "ImageTextPipelineOutput",
+ "Kandinsky3Img2ImgPipeline",
+ "Kandinsky3Pipeline",
+ "KandinskyCombinedPipeline",
+ "KandinskyImg2ImgCombinedPipeline",
+ "KandinskyImg2ImgPipeline",
+ "KandinskyInpaintCombinedPipeline",
+ "KandinskyInpaintPipeline",
+ "KandinskyPipeline",
+ "KandinskyPriorPipeline",
+ "KandinskyV22CombinedPipeline",
+ "KandinskyV22ControlnetImg2ImgPipeline",
+ "KandinskyV22ControlnetPipeline",
+ "KandinskyV22Img2ImgCombinedPipeline",
+ "KandinskyV22Img2ImgPipeline",
+ "KandinskyV22InpaintCombinedPipeline",
+ "KandinskyV22InpaintPipeline",
+ "KandinskyV22Pipeline",
+ "KandinskyV22PriorEmb2EmbPipeline",
+ "KandinskyV22PriorPipeline",
+ "LatentConsistencyModelImg2ImgPipeline",
+ "LatentConsistencyModelPipeline",
+ "LattePipeline",
+ "LDMTextToImagePipeline",
+ "LEditsPPPipelineStableDiffusion",
+ "LEditsPPPipelineStableDiffusionXL",
+ "LuminaText2ImgPipeline",
+ "MarigoldDepthPipeline",
+ "MarigoldNormalsPipeline",
+ "MusicLDMPipeline",
+ "PaintByExamplePipeline",
+ "PIAPipeline",
+ "PixArtAlphaPipeline",
+ "PixArtSigmaPAGPipeline",
+ "PixArtSigmaPipeline",
+ "SemanticStableDiffusionPipeline",
+ "ShapEImg2ImgPipeline",
+ "ShapEPipeline",
+ "StableAudioPipeline",
+ "StableAudioProjectionModel",
+ "StableCascadeCombinedPipeline",
+ "StableCascadeDecoderPipeline",
+ "StableCascadePriorPipeline",
+ "StableDiffusion3ControlNetInpaintingPipeline",
+ "StableDiffusion3ControlNetPipeline",
+ "StableDiffusion3Img2ImgPipeline",
+ "StableDiffusion3InpaintPipeline",
+ "StableDiffusion3PAGPipeline",
+ "StableDiffusion3Pipeline",
+ "StableDiffusion3InvEnhancePipeline",
+ "StableDiffusionAdapterPipeline",
+ "StableDiffusionAttendAndExcitePipeline",
+ "StableDiffusionControlNetImg2ImgPipeline",
+ "StableDiffusionControlNetInpaintPipeline",
+ "StableDiffusionControlNetPAGInpaintPipeline",
+ "StableDiffusionControlNetPAGPipeline",
+ "StableDiffusionControlNetPipeline",
+ "StableDiffusionControlNetXSPipeline",
+ "StableDiffusionDepth2ImgPipeline",
+ "StableDiffusionDiffEditPipeline",
+ "StableDiffusionGLIGENPipeline",
+ "StableDiffusionGLIGENTextImagePipeline",
+ "StableDiffusionImageVariationPipeline",
+ "StableDiffusionImg2ImgPipeline",
+ "StableDiffusionInpaintPipeline",
+ "StableDiffusionInpaintPipelineLegacy",
+ "StableDiffusionInstructPix2PixPipeline",
+ "StableDiffusionLatentUpscalePipeline",
+ "StableDiffusionLDM3DPipeline",
+ "StableDiffusionModelEditingPipeline",
+ "StableDiffusionPAGImg2ImgPipeline",
+ "StableDiffusionPAGPipeline",
+ "StableDiffusionPanoramaPipeline",
+ "StableDiffusionParadigmsPipeline",
+ "StableDiffusionPipeline",
+ "StableDiffusionInvEnhancePipeline",
+ "StableDiffusionPipelineSafe",
+ "StableDiffusionPix2PixZeroPipeline",
+ "StableDiffusionSAGPipeline",
+ "StableDiffusionUpscalePipeline",
+ "StableDiffusionXLAdapterPipeline",
+ "StableDiffusionXLControlNetImg2ImgPipeline",
+ "StableDiffusionXLControlNetInpaintPipeline",
+ "StableDiffusionXLControlNetPAGImg2ImgPipeline",
+ "StableDiffusionXLControlNetPAGPipeline",
+ "StableDiffusionXLControlNetPipeline",
+ "StableDiffusionXLControlNetXSPipeline",
+ "StableDiffusionXLImg2ImgPipeline",
+ "StableDiffusionXLInpaintPipeline",
+ "StableDiffusionXLInstructPix2PixPipeline",
+ "StableDiffusionXLPAGImg2ImgPipeline",
+ "StableDiffusionXLPAGInpaintPipeline",
+ "StableDiffusionXLPAGPipeline",
+ "StableDiffusionXLPipeline",
+ "StableDiffusionXLInvEnhancePipeline",
+ "StableUnCLIPImg2ImgPipeline",
+ "StableUnCLIPPipeline",
+ "StableVideoDiffusionPipeline",
+ "TextToVideoSDPipeline",
+ "TextToVideoZeroPipeline",
+ "TextToVideoZeroSDXLPipeline",
+ "UnCLIPImageVariationPipeline",
+ "UnCLIPPipeline",
+ "UniDiffuserModel",
+ "UniDiffuserPipeline",
+ "UniDiffuserTextDecoder",
+ "VersatileDiffusionDualGuidedPipeline",
+ "VersatileDiffusionImageVariationPipeline",
+ "VersatileDiffusionPipeline",
+ "VersatileDiffusionTextToImagePipeline",
+ "VideoToVideoSDPipeline",
+ "VQDiffusionPipeline",
+ "WuerstchenCombinedPipeline",
+ "WuerstchenDecoderPipeline",
+ "WuerstchenPriorPipeline",
+ ]
+ )
+
+try:
+ if not (is_torch_available() and is_transformers_available() and is_k_diffusion_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_torch_and_transformers_and_k_diffusion_objects # noqa F403
+
+ _import_structure["utils.dummy_torch_and_transformers_and_k_diffusion_objects"] = [
+ name for name in dir(dummy_torch_and_transformers_and_k_diffusion_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["pipelines"].extend(["StableDiffusionKDiffusionPipeline", "StableDiffusionXLKDiffusionPipeline"])
+
+try:
+ if not (is_torch_available() and is_transformers_available() and is_sentencepiece_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_torch_and_transformers_and_sentencepiece_objects # noqa F403
+
+ _import_structure["utils.dummy_torch_and_transformers_and_sentencepiece_objects"] = [
+ name for name in dir(dummy_torch_and_transformers_and_sentencepiece_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["pipelines"].extend(["KolorsImg2ImgPipeline", "KolorsPAGPipeline", "KolorsPipeline"])
+
+try:
+ if not (is_torch_available() and is_transformers_available() and is_onnx_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_torch_and_transformers_and_onnx_objects # noqa F403
+
+ _import_structure["utils.dummy_torch_and_transformers_and_onnx_objects"] = [
+ name for name in dir(dummy_torch_and_transformers_and_onnx_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["pipelines"].extend(
+ [
+ "OnnxStableDiffusionImg2ImgPipeline",
+ "OnnxStableDiffusionInpaintPipeline",
+ "OnnxStableDiffusionInpaintPipelineLegacy",
+ "OnnxStableDiffusionPipeline",
+ "OnnxStableDiffusionUpscalePipeline",
+ "StableDiffusionOnnxPipeline",
+ ]
+ )
+
+try:
+ if not (is_torch_available() and is_librosa_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_torch_and_librosa_objects # noqa F403
+
+ _import_structure["utils.dummy_torch_and_librosa_objects"] = [
+ name for name in dir(dummy_torch_and_librosa_objects) if not name.startswith("_")
+ ]
+
+else:
+ _import_structure["pipelines"].extend(["AudioDiffusionPipeline", "Mel"])
+
+try:
+ if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_transformers_and_torch_and_note_seq_objects # noqa F403
+
+ _import_structure["utils.dummy_transformers_and_torch_and_note_seq_objects"] = [
+ name for name in dir(dummy_transformers_and_torch_and_note_seq_objects) if not name.startswith("_")
+ ]
+
+
+else:
+ _import_structure["pipelines"].extend(["SpectrogramDiffusionPipeline"])
+
+try:
+ if not is_flax_available():
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_flax_objects # noqa F403
+
+ _import_structure["utils.dummy_flax_objects"] = [
+ name for name in dir(dummy_flax_objects) if not name.startswith("_")
+ ]
+
+
+else:
+ _import_structure["models.controlnet_flax"] = ["FlaxControlNetModel"]
+ _import_structure["models.modeling_flax_utils"] = ["FlaxModelMixin"]
+ _import_structure["models.unets.unet_2d_condition_flax"] = ["FlaxUNet2DConditionModel"]
+ _import_structure["models.vae_flax"] = ["FlaxAutoencoderKL"]
+ _import_structure["pipelines"].extend(["FlaxDiffusionPipeline"])
+ _import_structure["schedulers"].extend(
+ [
+ "FlaxDDIMScheduler",
+ "FlaxDDPMScheduler",
+ "FlaxDPMSolverMultistepScheduler",
+ "FlaxEulerDiscreteScheduler",
+ "FlaxKarrasVeScheduler",
+ "FlaxLMSDiscreteScheduler",
+ "FlaxPNDMScheduler",
+ "FlaxSchedulerMixin",
+ "FlaxScoreSdeVeScheduler",
+ ]
+ )
+
+
+try:
+ if not (is_flax_available() and is_transformers_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_flax_and_transformers_objects # noqa F403
+
+ _import_structure["utils.dummy_flax_and_transformers_objects"] = [
+ name for name in dir(dummy_flax_and_transformers_objects) if not name.startswith("_")
+ ]
+
+
+else:
+ _import_structure["pipelines"].extend(
+ [
+ "FlaxStableDiffusionControlNetPipeline",
+ "FlaxStableDiffusionImg2ImgPipeline",
+ "FlaxStableDiffusionInpaintPipeline",
+ "FlaxStableDiffusionPipeline",
+ "FlaxStableDiffusionXLPipeline",
+ ]
+ )
+
+try:
+ if not (is_note_seq_available()):
+ raise OptionalDependencyNotAvailable()
+except OptionalDependencyNotAvailable:
+ from .utils import dummy_note_seq_objects # noqa F403
+
+ _import_structure["utils.dummy_note_seq_objects"] = [
+ name for name in dir(dummy_note_seq_objects) if not name.startswith("_")
+ ]
+
+
+else:
+ _import_structure["pipelines"].extend(["MidiProcessor"])
+
+if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
+ from .configuration_utils import ConfigMixin
+ from .quantizers.quantization_config import BitsAndBytesConfig
+
+ try:
+ if not is_onnx_available():
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_onnx_objects import * # noqa F403
+ else:
+ from .pipelines import OnnxRuntimeModel
+
+ try:
+ if not is_torch_available():
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_pt_objects import * # noqa F403
+ else:
+ from .models import (
+ AsymmetricAutoencoderKL,
+ AuraFlowTransformer2DModel,
+ AutoencoderKL,
+ AutoencoderKLCogVideoX,
+ AutoencoderKLTemporalDecoder,
+ AutoencoderOobleck,
+ AutoencoderTiny,
+ CogVideoXTransformer3DModel,
+ CogView3PlusTransformer2DModel,
+ ConsistencyDecoderVAE,
+ ControlNetModel,
+ ControlNetXSAdapter,
+ DiTTransformer2DModel,
+ FluxControlNetModel,
+ FluxMultiControlNetModel,
+ FluxTransformer2DModel,
+ HunyuanDiT2DControlNetModel,
+ HunyuanDiT2DModel,
+ HunyuanDiT2DMultiControlNetModel,
+ I2VGenXLUNet,
+ Kandinsky3UNet,
+ LatteTransformer3DModel,
+ LuminaNextDiT2DModel,
+ ModelMixin,
+ MotionAdapter,
+ MultiAdapter,
+ PixArtTransformer2DModel,
+ PriorTransformer,
+ SD3ControlNetModel,
+ SD3MultiControlNetModel,
+ SD3Transformer2DModel,
+ SparseControlNetModel,
+ StableAudioDiTModel,
+ T2IAdapter,
+ T5FilmDecoder,
+ Transformer2DModel,
+ UNet1DModel,
+ UNet2DConditionModel,
+ UNet2DModel,
+ UNet3DConditionModel,
+ UNetControlNetXSModel,
+ UNetMotionModel,
+ UNetSpatioTemporalConditionModel,
+ UVit2DModel,
+ VQModel,
+ )
+ from .optimization import (
+ get_constant_schedule,
+ get_constant_schedule_with_warmup,
+ get_cosine_schedule_with_warmup,
+ get_cosine_with_hard_restarts_schedule_with_warmup,
+ get_linear_schedule_with_warmup,
+ get_polynomial_decay_schedule_with_warmup,
+ get_scheduler,
+ )
+ from .pipelines import (
+ AudioPipelineOutput,
+ AutoPipelineForImage2Image,
+ AutoPipelineForInpainting,
+ AutoPipelineForText2Image,
+ BlipDiffusionControlNetPipeline,
+ BlipDiffusionPipeline,
+ CLIPImageProjection,
+ ConsistencyModelPipeline,
+ DanceDiffusionPipeline,
+ DDIMPipeline,
+ DDPMPipeline,
+ DiffusionPipeline,
+ DiTPipeline,
+ ImagePipelineOutput,
+ KarrasVePipeline,
+ LDMPipeline,
+ LDMSuperResolutionPipeline,
+ PNDMPipeline,
+ RePaintPipeline,
+ ScoreSdeVePipeline,
+ StableDiffusionMixin,
+ )
+ from .quantizers import DiffusersQuantizer
+ from .schedulers import (
+ AmusedScheduler,
+ CMStochasticIterativeScheduler,
+ CogVideoXDDIMScheduler,
+ CogVideoXDPMScheduler,
+ DDIMInverseScheduler,
+ DDIMParallelScheduler,
+ DDIMScheduler,
+ DDPMParallelScheduler,
+ DDPMScheduler,
+ DDPMWuerstchenScheduler,
+ DEISMultistepScheduler,
+ DPMSolverMultistepInverseScheduler,
+ DPMSolverMultistepScheduler,
+ DPMSolverSinglestepScheduler,
+ EDMDPMSolverMultistepScheduler,
+ EDMEulerScheduler,
+ EulerAncestralDiscreteScheduler,
+ EulerDiscreteScheduler,
+ FlowMatchEulerDiscreteScheduler,
+ FlowMatchHeunDiscreteScheduler,
+ HeunDiscreteScheduler,
+ IPNDMScheduler,
+ KarrasVeScheduler,
+ KDPM2AncestralDiscreteScheduler,
+ KDPM2DiscreteScheduler,
+ LCMScheduler,
+ PNDMScheduler,
+ RePaintScheduler,
+ SASolverScheduler,
+ SchedulerMixin,
+ ScoreSdeVeScheduler,
+ TCDScheduler,
+ UnCLIPScheduler,
+ UniPCMultistepScheduler,
+ VQDiffusionScheduler,
+ )
+ from .training_utils import EMAModel
+
+ try:
+ if not (is_torch_available() and is_scipy_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_torch_and_scipy_objects import * # noqa F403
+ else:
+ from .schedulers import LMSDiscreteScheduler
+
+ try:
+ if not (is_torch_available() and is_torchsde_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_torch_and_torchsde_objects import * # noqa F403
+ else:
+ from .schedulers import CosineDPMSolverMultistepScheduler, DPMSolverSDEScheduler
+
+ try:
+ if not (is_torch_available() and is_transformers_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_torch_and_transformers_objects import * # noqa F403
+ else:
+ from .pipelines import (
+ AltDiffusionImg2ImgPipeline,
+ AltDiffusionPipeline,
+ AmusedImg2ImgPipeline,
+ AmusedInpaintPipeline,
+ AmusedPipeline,
+ AnimateDiffControlNetPipeline,
+ AnimateDiffPAGPipeline,
+ AnimateDiffPipeline,
+ AnimateDiffSDXLPipeline,
+ AnimateDiffSparseControlNetPipeline,
+ AnimateDiffVideoToVideoControlNetPipeline,
+ AnimateDiffVideoToVideoPipeline,
+ AudioLDM2Pipeline,
+ AudioLDM2ProjectionModel,
+ AudioLDM2UNet2DConditionModel,
+ AudioLDMPipeline,
+ AuraFlowPipeline,
+ CLIPImageProjection,
+ CogVideoXFunControlPipeline,
+ CogVideoXImageToVideoPipeline,
+ CogVideoXPipeline,
+ CogVideoXVideoToVideoPipeline,
+ CogView3PlusPipeline,
+ CycleDiffusionPipeline,
+ FluxControlNetImg2ImgPipeline,
+ FluxControlNetInpaintPipeline,
+ FluxControlNetPipeline,
+ FluxImg2ImgPipeline,
+ FluxInpaintPipeline,
+ FluxPipeline,
+ HunyuanDiTControlNetPipeline,
+ HunyuanDiTPAGPipeline,
+ HunyuanDiTPipeline,
+ I2VGenXLPipeline,
+ IFImg2ImgPipeline,
+ IFImg2ImgSuperResolutionPipeline,
+ IFInpaintingPipeline,
+ IFInpaintingSuperResolutionPipeline,
+ IFPipeline,
+ IFSuperResolutionPipeline,
+ ImageTextPipelineOutput,
+ Kandinsky3Img2ImgPipeline,
+ Kandinsky3Pipeline,
+ KandinskyCombinedPipeline,
+ KandinskyImg2ImgCombinedPipeline,
+ KandinskyImg2ImgPipeline,
+ KandinskyInpaintCombinedPipeline,
+ KandinskyInpaintPipeline,
+ KandinskyPipeline,
+ KandinskyPriorPipeline,
+ KandinskyV22CombinedPipeline,
+ KandinskyV22ControlnetImg2ImgPipeline,
+ KandinskyV22ControlnetPipeline,
+ KandinskyV22Img2ImgCombinedPipeline,
+ KandinskyV22Img2ImgPipeline,
+ KandinskyV22InpaintCombinedPipeline,
+ KandinskyV22InpaintPipeline,
+ KandinskyV22Pipeline,
+ KandinskyV22PriorEmb2EmbPipeline,
+ KandinskyV22PriorPipeline,
+ LatentConsistencyModelImg2ImgPipeline,
+ LatentConsistencyModelPipeline,
+ LattePipeline,
+ LDMTextToImagePipeline,
+ LEditsPPPipelineStableDiffusion,
+ LEditsPPPipelineStableDiffusionXL,
+ LuminaText2ImgPipeline,
+ MarigoldDepthPipeline,
+ MarigoldNormalsPipeline,
+ MusicLDMPipeline,
+ PaintByExamplePipeline,
+ PIAPipeline,
+ PixArtAlphaPipeline,
+ PixArtSigmaPAGPipeline,
+ PixArtSigmaPipeline,
+ SemanticStableDiffusionPipeline,
+ ShapEImg2ImgPipeline,
+ ShapEPipeline,
+ StableAudioPipeline,
+ StableAudioProjectionModel,
+ StableCascadeCombinedPipeline,
+ StableCascadeDecoderPipeline,
+ StableCascadePriorPipeline,
+ StableDiffusion3ControlNetPipeline,
+ StableDiffusion3Img2ImgPipeline,
+ StableDiffusion3InpaintPipeline,
+ StableDiffusion3PAGPipeline,
+ StableDiffusion3Pipeline,
+ StableDiffusion3InvEnhancePipeline,
+ StableDiffusionAdapterPipeline,
+ StableDiffusionAttendAndExcitePipeline,
+ StableDiffusionControlNetImg2ImgPipeline,
+ StableDiffusionControlNetInpaintPipeline,
+ StableDiffusionControlNetPAGInpaintPipeline,
+ StableDiffusionControlNetPAGPipeline,
+ StableDiffusionControlNetPipeline,
+ StableDiffusionControlNetXSPipeline,
+ StableDiffusionDepth2ImgPipeline,
+ StableDiffusionDiffEditPipeline,
+ StableDiffusionGLIGENPipeline,
+ StableDiffusionGLIGENTextImagePipeline,
+ StableDiffusionImageVariationPipeline,
+ StableDiffusionImg2ImgPipeline,
+ StableDiffusionInpaintPipeline,
+ StableDiffusionInpaintPipelineLegacy,
+ StableDiffusionInstructPix2PixPipeline,
+ StableDiffusionLatentUpscalePipeline,
+ StableDiffusionLDM3DPipeline,
+ StableDiffusionModelEditingPipeline,
+ StableDiffusionPAGImg2ImgPipeline,
+ StableDiffusionPAGPipeline,
+ StableDiffusionPanoramaPipeline,
+ StableDiffusionParadigmsPipeline,
+ StableDiffusionPipeline,
+ StableDiffusionInvEnhancePipeline,
+ StableDiffusionPipelineSafe,
+ StableDiffusionPix2PixZeroPipeline,
+ StableDiffusionSAGPipeline,
+ StableDiffusionUpscalePipeline,
+ StableDiffusionXLAdapterPipeline,
+ StableDiffusionXLControlNetImg2ImgPipeline,
+ StableDiffusionXLControlNetInpaintPipeline,
+ StableDiffusionXLControlNetPAGImg2ImgPipeline,
+ StableDiffusionXLControlNetPAGPipeline,
+ StableDiffusionXLControlNetPipeline,
+ StableDiffusionXLControlNetXSPipeline,
+ StableDiffusionXLImg2ImgPipeline,
+ StableDiffusionXLInpaintPipeline,
+ StableDiffusionXLInstructPix2PixPipeline,
+ StableDiffusionXLPAGImg2ImgPipeline,
+ StableDiffusionXLPAGInpaintPipeline,
+ StableDiffusionXLPAGPipeline,
+ StableDiffusionXLPipeline,
+ StableDiffusionXLInvEnhancePipeline,
+ StableUnCLIPImg2ImgPipeline,
+ StableUnCLIPPipeline,
+ StableVideoDiffusionPipeline,
+ TextToVideoSDPipeline,
+ TextToVideoZeroPipeline,
+ TextToVideoZeroSDXLPipeline,
+ UnCLIPImageVariationPipeline,
+ UnCLIPPipeline,
+ UniDiffuserModel,
+ UniDiffuserPipeline,
+ UniDiffuserTextDecoder,
+ VersatileDiffusionDualGuidedPipeline,
+ VersatileDiffusionImageVariationPipeline,
+ VersatileDiffusionPipeline,
+ VersatileDiffusionTextToImagePipeline,
+ VideoToVideoSDPipeline,
+ VQDiffusionPipeline,
+ WuerstchenCombinedPipeline,
+ WuerstchenDecoderPipeline,
+ WuerstchenPriorPipeline,
+ )
+
+ try:
+ if not (is_torch_available() and is_transformers_available() and is_k_diffusion_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_torch_and_transformers_and_k_diffusion_objects import * # noqa F403
+ else:
+ from .pipelines import StableDiffusionKDiffusionPipeline, StableDiffusionXLKDiffusionPipeline
+
+ try:
+ if not (is_torch_available() and is_transformers_available() and is_sentencepiece_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_torch_and_transformers_and_sentencepiece_objects import * # noqa F403
+ else:
+ from .pipelines import KolorsImg2ImgPipeline, KolorsPAGPipeline, KolorsPipeline
+ try:
+ if not (is_torch_available() and is_transformers_available() and is_onnx_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_torch_and_transformers_and_onnx_objects import * # noqa F403
+ else:
+ from .pipelines import (
+ OnnxStableDiffusionImg2ImgPipeline,
+ OnnxStableDiffusionInpaintPipeline,
+ OnnxStableDiffusionInpaintPipelineLegacy,
+ OnnxStableDiffusionPipeline,
+ OnnxStableDiffusionUpscalePipeline,
+ StableDiffusionOnnxPipeline,
+ )
+
+ try:
+ if not (is_torch_available() and is_librosa_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_torch_and_librosa_objects import * # noqa F403
+ else:
+ from .pipelines import AudioDiffusionPipeline, Mel
+
+ try:
+ if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_transformers_and_torch_and_note_seq_objects import * # noqa F403
+ else:
+ from .pipelines import SpectrogramDiffusionPipeline
+
+ try:
+ if not is_flax_available():
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_flax_objects import * # noqa F403
+ else:
+ from .models.controlnet_flax import FlaxControlNetModel
+ from .models.modeling_flax_utils import FlaxModelMixin
+ from .models.unets.unet_2d_condition_flax import FlaxUNet2DConditionModel
+ from .models.vae_flax import FlaxAutoencoderKL
+ from .pipelines import FlaxDiffusionPipeline
+ from .schedulers import (
+ FlaxDDIMScheduler,
+ FlaxDDPMScheduler,
+ FlaxDPMSolverMultistepScheduler,
+ FlaxEulerDiscreteScheduler,
+ FlaxKarrasVeScheduler,
+ FlaxLMSDiscreteScheduler,
+ FlaxPNDMScheduler,
+ FlaxSchedulerMixin,
+ FlaxScoreSdeVeScheduler,
+ )
+
+ try:
+ if not (is_flax_available() and is_transformers_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_flax_and_transformers_objects import * # noqa F403
+ else:
+ from .pipelines import (
+ FlaxStableDiffusionControlNetPipeline,
+ FlaxStableDiffusionImg2ImgPipeline,
+ FlaxStableDiffusionInpaintPipeline,
+ FlaxStableDiffusionPipeline,
+ FlaxStableDiffusionXLPipeline,
+ )
+
+ try:
+ if not (is_note_seq_available()):
+ raise OptionalDependencyNotAvailable()
+ except OptionalDependencyNotAvailable:
+ from .utils.dummy_note_seq_objects import * # noqa F403
+ else:
+ from .pipelines import MidiProcessor
+
+else:
+ import sys
+
+ sys.modules[__name__] = _LazyModule(
+ __name__,
+ globals()["__file__"],
+ _import_structure,
+ module_spec=__spec__,
+ extra_objects={"__version__": __version__},
+ )
diff --git a/src/diffusers/__pycache__/__init__.cpython-310.pyc b/src/diffusers/__pycache__/__init__.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c118f6ae509dc43994ee3c1a52f83b820ee9392c
Binary files /dev/null and b/src/diffusers/__pycache__/__init__.cpython-310.pyc differ
diff --git a/src/diffusers/__pycache__/configuration_utils.cpython-310.pyc b/src/diffusers/__pycache__/configuration_utils.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d6da5e0b0b616b5e9546c69ef2cfea1d457f2ab9
Binary files /dev/null and b/src/diffusers/__pycache__/configuration_utils.cpython-310.pyc differ
diff --git a/src/diffusers/__pycache__/dependency_versions_check.cpython-310.pyc b/src/diffusers/__pycache__/dependency_versions_check.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ac64597c6b4c48936a2c87bcb9a5f80f31019598
Binary files /dev/null and b/src/diffusers/__pycache__/dependency_versions_check.cpython-310.pyc differ
diff --git a/src/diffusers/__pycache__/dependency_versions_table.cpython-310.pyc b/src/diffusers/__pycache__/dependency_versions_table.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..af04bcc176f08ebbbc6527b179b35418d999d28f
Binary files /dev/null and b/src/diffusers/__pycache__/dependency_versions_table.cpython-310.pyc differ
diff --git a/src/diffusers/__pycache__/image_processor.cpython-310.pyc b/src/diffusers/__pycache__/image_processor.cpython-310.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2d9a9c5c46bbb0a443b86a7fe4149b014e6278c5
Binary files /dev/null and b/src/diffusers/__pycache__/image_processor.cpython-310.pyc differ
diff --git a/src/diffusers/callbacks.py b/src/diffusers/callbacks.py
new file mode 100644
index 0000000000000000000000000000000000000000..38542407e31fa1255eb26b563632c7a9f3d2fded
--- /dev/null
+++ b/src/diffusers/callbacks.py
@@ -0,0 +1,156 @@
+from typing import Any, Dict, List
+
+from .configuration_utils import ConfigMixin, register_to_config
+from .utils import CONFIG_NAME
+
+
+class PipelineCallback(ConfigMixin):
+ """
+ Base class for all the official callbacks used in a pipeline. This class provides a structure for implementing
+ custom callbacks and ensures that all callbacks have a consistent interface.
+
+ Please implement the following:
+ `tensor_inputs`: This should return a list of tensor inputs specific to your callback. You will only be able to
+ include
+ variables listed in the `._callback_tensor_inputs` attribute of your pipeline class.
+ `callback_fn`: This method defines the core functionality of your callback.
+ """
+
+ config_name = CONFIG_NAME
+
+ @register_to_config
+ def __init__(self, cutoff_step_ratio=1.0, cutoff_step_index=None):
+ super().__init__()
+
+ if (cutoff_step_ratio is None and cutoff_step_index is None) or (
+ cutoff_step_ratio is not None and cutoff_step_index is not None
+ ):
+ raise ValueError("Either cutoff_step_ratio or cutoff_step_index should be provided, not both or none.")
+
+ if cutoff_step_ratio is not None and (
+ not isinstance(cutoff_step_ratio, float) or not (0.0 <= cutoff_step_ratio <= 1.0)
+ ):
+ raise ValueError("cutoff_step_ratio must be a float between 0.0 and 1.0.")
+
+ @property
+ def tensor_inputs(self) -> List[str]:
+ raise NotImplementedError(f"You need to set the attribute `tensor_inputs` for {self.__class__}")
+
+ def callback_fn(self, pipeline, step_index, timesteps, callback_kwargs) -> Dict[str, Any]:
+ raise NotImplementedError(f"You need to implement the method `callback_fn` for {self.__class__}")
+
+ def __call__(self, pipeline, step_index, timestep, callback_kwargs) -> Dict[str, Any]:
+ return self.callback_fn(pipeline, step_index, timestep, callback_kwargs)
+
+
+class MultiPipelineCallbacks:
+ """
+ This class is designed to handle multiple pipeline callbacks. It accepts a list of PipelineCallback objects and
+ provides a unified interface for calling all of them.
+ """
+
+ def __init__(self, callbacks: List[PipelineCallback]):
+ self.callbacks = callbacks
+
+ @property
+ def tensor_inputs(self) -> List[str]:
+ return [input for callback in self.callbacks for input in callback.tensor_inputs]
+
+ def __call__(self, pipeline, step_index, timestep, callback_kwargs) -> Dict[str, Any]:
+ """
+ Calls all the callbacks in order with the given arguments and returns the final callback_kwargs.
+ """
+ for callback in self.callbacks:
+ callback_kwargs = callback(pipeline, step_index, timestep, callback_kwargs)
+
+ return callback_kwargs
+
+
+class SDCFGCutoffCallback(PipelineCallback):
+ """
+ Callback function for Stable Diffusion Pipelines. After certain number of steps (set by `cutoff_step_ratio` or
+ `cutoff_step_index`), this callback will disable the CFG.
+
+ Note: This callback mutates the pipeline by changing the `_guidance_scale` attribute to 0.0 after the cutoff step.
+ """
+
+ tensor_inputs = ["prompt_embeds"]
+
+ def callback_fn(self, pipeline, step_index, timestep, callback_kwargs) -> Dict[str, Any]:
+ cutoff_step_ratio = self.config.cutoff_step_ratio
+ cutoff_step_index = self.config.cutoff_step_index
+
+ # Use cutoff_step_index if it's not None, otherwise use cutoff_step_ratio
+ cutoff_step = (
+ cutoff_step_index if cutoff_step_index is not None else int(pipeline.num_timesteps * cutoff_step_ratio)
+ )
+
+ if step_index == cutoff_step:
+ prompt_embeds = callback_kwargs[self.tensor_inputs[0]]
+ prompt_embeds = prompt_embeds[-1:] # "-1" denotes the embeddings for conditional text tokens.
+
+ pipeline._guidance_scale = 0.0
+
+ callback_kwargs[self.tensor_inputs[0]] = prompt_embeds
+ return callback_kwargs
+
+
+class SDXLCFGCutoffCallback(PipelineCallback):
+ """
+ Callback function for Stable Diffusion XL Pipelines. After certain number of steps (set by `cutoff_step_ratio` or
+ `cutoff_step_index`), this callback will disable the CFG.
+
+ Note: This callback mutates the pipeline by changing the `_guidance_scale` attribute to 0.0 after the cutoff step.
+ """
+
+ tensor_inputs = ["prompt_embeds", "add_text_embeds", "add_time_ids"]
+
+ def callback_fn(self, pipeline, step_index, timestep, callback_kwargs) -> Dict[str, Any]:
+ cutoff_step_ratio = self.config.cutoff_step_ratio
+ cutoff_step_index = self.config.cutoff_step_index
+
+ # Use cutoff_step_index if it's not None, otherwise use cutoff_step_ratio
+ cutoff_step = (
+ cutoff_step_index if cutoff_step_index is not None else int(pipeline.num_timesteps * cutoff_step_ratio)
+ )
+
+ if step_index == cutoff_step:
+ prompt_embeds = callback_kwargs[self.tensor_inputs[0]]
+ prompt_embeds = prompt_embeds[-1:] # "-1" denotes the embeddings for conditional text tokens.
+
+ add_text_embeds = callback_kwargs[self.tensor_inputs[1]]
+ add_text_embeds = add_text_embeds[-1:] # "-1" denotes the embeddings for conditional pooled text tokens
+
+ add_time_ids = callback_kwargs[self.tensor_inputs[2]]
+ add_time_ids = add_time_ids[-1:] # "-1" denotes the embeddings for conditional added time vector
+
+ pipeline._guidance_scale = 0.0
+
+ callback_kwargs[self.tensor_inputs[0]] = prompt_embeds
+ callback_kwargs[self.tensor_inputs[1]] = add_text_embeds
+ callback_kwargs[self.tensor_inputs[2]] = add_time_ids
+ return callback_kwargs
+
+
+class IPAdapterScaleCutoffCallback(PipelineCallback):
+ """
+ Callback function for any pipeline that inherits `IPAdapterMixin`. After certain number of steps (set by
+ `cutoff_step_ratio` or `cutoff_step_index`), this callback will set the IP Adapter scale to `0.0`.
+
+ Note: This callback mutates the IP Adapter attention processors by setting the scale to 0.0 after the cutoff step.
+ """
+
+ tensor_inputs = []
+
+ def callback_fn(self, pipeline, step_index, timestep, callback_kwargs) -> Dict[str, Any]:
+ cutoff_step_ratio = self.config.cutoff_step_ratio
+ cutoff_step_index = self.config.cutoff_step_index
+
+ # Use cutoff_step_index if it's not None, otherwise use cutoff_step_ratio
+ cutoff_step = (
+ cutoff_step_index if cutoff_step_index is not None else int(pipeline.num_timesteps * cutoff_step_ratio)
+ )
+
+ if step_index == cutoff_step:
+ pipeline.set_ip_adapter_scale(0.0)
+ return callback_kwargs
diff --git a/src/diffusers/commands/__init__.py b/src/diffusers/commands/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..8208283f6e40a8e46175b1672d6bf44f9d83a02b
--- /dev/null
+++ b/src/diffusers/commands/__init__.py
@@ -0,0 +1,27 @@
+# Copyright 2024 The HuggingFace Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from abc import ABC, abstractmethod
+from argparse import ArgumentParser
+
+
+class BaseDiffusersCLICommand(ABC):
+ @staticmethod
+ @abstractmethod
+ def register_subcommand(parser: ArgumentParser):
+ raise NotImplementedError()
+
+ @abstractmethod
+ def run(self):
+ raise NotImplementedError()
diff --git a/src/diffusers/commands/diffusers_cli.py b/src/diffusers/commands/diffusers_cli.py
new file mode 100644
index 0000000000000000000000000000000000000000..f582c3bcd0df0c5167a8de18123b4474e64bb344
--- /dev/null
+++ b/src/diffusers/commands/diffusers_cli.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# Copyright 2024 The HuggingFace Team. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from argparse import ArgumentParser
+
+from .env import EnvironmentCommand
+from .fp16_safetensors import FP16SafetensorsCommand
+
+
+def main():
+ parser = ArgumentParser("Diffusers CLI tool", usage="diffusers-cli