diffusers 0.23.1__py3-none-any.whl → 0.25.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- diffusers/__init__.py +26 -2
- diffusers/commands/fp16_safetensors.py +10 -11
- diffusers/configuration_utils.py +13 -8
- diffusers/dependency_versions_check.py +0 -1
- diffusers/dependency_versions_table.py +5 -5
- diffusers/experimental/rl/value_guided_sampling.py +1 -1
- diffusers/image_processor.py +463 -51
- diffusers/loaders/__init__.py +82 -0
- diffusers/loaders/ip_adapter.py +159 -0
- diffusers/loaders/lora.py +1553 -0
- diffusers/loaders/lora_conversion_utils.py +284 -0
- diffusers/loaders/single_file.py +637 -0
- diffusers/loaders/textual_inversion.py +455 -0
- diffusers/loaders/unet.py +828 -0
- diffusers/loaders/utils.py +59 -0
- diffusers/models/__init__.py +26 -9
- diffusers/models/activations.py +9 -6
- diffusers/models/attention.py +301 -29
- diffusers/models/attention_flax.py +9 -1
- diffusers/models/attention_processor.py +378 -6
- diffusers/models/autoencoders/__init__.py +5 -0
- diffusers/models/{autoencoder_asym_kl.py → autoencoders/autoencoder_asym_kl.py} +17 -12
- diffusers/models/{autoencoder_kl.py → autoencoders/autoencoder_kl.py} +47 -23
- diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py +402 -0
- diffusers/models/{autoencoder_tiny.py → autoencoders/autoencoder_tiny.py} +24 -28
- diffusers/models/{consistency_decoder_vae.py → autoencoders/consistency_decoder_vae.py} +51 -44
- diffusers/models/{vae.py → autoencoders/vae.py} +71 -17
- diffusers/models/controlnet.py +59 -39
- diffusers/models/controlnet_flax.py +19 -18
- diffusers/models/downsampling.py +338 -0
- diffusers/models/embeddings.py +112 -29
- diffusers/models/embeddings_flax.py +2 -0
- diffusers/models/lora.py +131 -1
- diffusers/models/modeling_flax_utils.py +14 -8
- diffusers/models/modeling_outputs.py +17 -0
- diffusers/models/modeling_utils.py +37 -29
- diffusers/models/normalization.py +110 -4
- diffusers/models/resnet.py +299 -652
- diffusers/models/transformer_2d.py +22 -5
- diffusers/models/transformer_temporal.py +183 -1
- diffusers/models/unet_2d_blocks_flax.py +5 -0
- diffusers/models/unet_2d_condition.py +46 -0
- diffusers/models/unet_2d_condition_flax.py +13 -13
- diffusers/models/unet_3d_blocks.py +957 -173
- diffusers/models/unet_3d_condition.py +16 -8
- diffusers/models/unet_kandinsky3.py +535 -0
- diffusers/models/unet_motion_model.py +48 -33
- diffusers/models/unet_spatio_temporal_condition.py +489 -0
- diffusers/models/upsampling.py +454 -0
- diffusers/models/uvit_2d.py +471 -0
- diffusers/models/vae_flax.py +7 -0
- diffusers/models/vq_model.py +12 -3
- diffusers/optimization.py +16 -9
- diffusers/pipelines/__init__.py +137 -76
- diffusers/pipelines/amused/__init__.py +62 -0
- diffusers/pipelines/amused/pipeline_amused.py +328 -0
- diffusers/pipelines/amused/pipeline_amused_img2img.py +347 -0
- diffusers/pipelines/amused/pipeline_amused_inpaint.py +378 -0
- diffusers/pipelines/animatediff/pipeline_animatediff.py +66 -8
- diffusers/pipelines/audioldm/pipeline_audioldm.py +1 -0
- diffusers/pipelines/auto_pipeline.py +23 -13
- diffusers/pipelines/consistency_models/pipeline_consistency_models.py +1 -0
- diffusers/pipelines/controlnet/pipeline_controlnet.py +238 -35
- diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py +148 -37
- diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py +155 -41
- diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py +123 -43
- diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py +216 -39
- diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py +106 -34
- diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py +1 -0
- diffusers/pipelines/ddim/pipeline_ddim.py +1 -0
- diffusers/pipelines/ddpm/pipeline_ddpm.py +1 -0
- diffusers/pipelines/deepfloyd_if/pipeline_if.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py +13 -1
- diffusers/pipelines/deprecated/__init__.py +153 -0
- diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/__init__.py +3 -3
- diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/pipeline_alt_diffusion.py +177 -34
- diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/pipeline_alt_diffusion_img2img.py +182 -37
- diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/pipeline_output.py +1 -1
- diffusers/pipelines/{audio_diffusion → deprecated/audio_diffusion}/__init__.py +1 -1
- diffusers/pipelines/{audio_diffusion → deprecated/audio_diffusion}/mel.py +2 -2
- diffusers/pipelines/{audio_diffusion → deprecated/audio_diffusion}/pipeline_audio_diffusion.py +4 -4
- diffusers/pipelines/{latent_diffusion_uncond → deprecated/latent_diffusion_uncond}/__init__.py +1 -1
- diffusers/pipelines/{latent_diffusion_uncond → deprecated/latent_diffusion_uncond}/pipeline_latent_diffusion_uncond.py +4 -4
- diffusers/pipelines/{pndm → deprecated/pndm}/__init__.py +1 -1
- diffusers/pipelines/{pndm → deprecated/pndm}/pipeline_pndm.py +4 -4
- diffusers/pipelines/{repaint → deprecated/repaint}/__init__.py +1 -1
- diffusers/pipelines/{repaint → deprecated/repaint}/pipeline_repaint.py +5 -5
- diffusers/pipelines/{score_sde_ve → deprecated/score_sde_ve}/__init__.py +1 -1
- diffusers/pipelines/{score_sde_ve → deprecated/score_sde_ve}/pipeline_score_sde_ve.py +5 -4
- diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/__init__.py +6 -6
- diffusers/pipelines/{spectrogram_diffusion/continous_encoder.py → deprecated/spectrogram_diffusion/continuous_encoder.py} +2 -2
- diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/midi_utils.py +1 -1
- diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/notes_encoder.py +2 -2
- diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/pipeline_spectrogram_diffusion.py +8 -7
- diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py +55 -0
- diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_cycle_diffusion.py +34 -13
- diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_onnx_stable_diffusion_inpaint_legacy.py +7 -6
- diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_inpaint_legacy.py +12 -11
- diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_model_editing.py +17 -11
- diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_paradigms.py +11 -10
- diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_pix2pix_zero.py +14 -13
- diffusers/pipelines/{stochastic_karras_ve → deprecated/stochastic_karras_ve}/__init__.py +1 -1
- diffusers/pipelines/{stochastic_karras_ve → deprecated/stochastic_karras_ve}/pipeline_stochastic_karras_ve.py +4 -4
- diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/__init__.py +3 -3
- diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/modeling_text_unet.py +83 -51
- diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion.py +4 -4
- diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion_dual_guided.py +7 -6
- diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion_image_variation.py +7 -6
- diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion_text_to_image.py +7 -6
- diffusers/pipelines/{vq_diffusion → deprecated/vq_diffusion}/__init__.py +3 -3
- diffusers/pipelines/{vq_diffusion → deprecated/vq_diffusion}/pipeline_vq_diffusion.py +5 -5
- diffusers/pipelines/dit/pipeline_dit.py +1 -0
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py +1 -1
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py +3 -3
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_img2img.py +1 -1
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py +1 -1
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py +1 -1
- diffusers/pipelines/kandinsky3/__init__.py +49 -0
- diffusers/pipelines/kandinsky3/convert_kandinsky3_unet.py +98 -0
- diffusers/pipelines/kandinsky3/pipeline_kandinsky3.py +589 -0
- diffusers/pipelines/kandinsky3/pipeline_kandinsky3_img2img.py +654 -0
- diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py +111 -11
- diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py +102 -9
- diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py +1 -0
- diffusers/pipelines/musicldm/pipeline_musicldm.py +1 -1
- diffusers/pipelines/onnx_utils.py +8 -5
- diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py +7 -2
- diffusers/pipelines/pipeline_flax_utils.py +11 -8
- diffusers/pipelines/pipeline_utils.py +63 -42
- diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py +247 -38
- diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py +3 -3
- diffusers/pipelines/stable_diffusion/__init__.py +37 -65
- diffusers/pipelines/stable_diffusion/convert_from_ckpt.py +75 -78
- diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py +2 -2
- diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py +2 -4
- diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +174 -11
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py +8 -3
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +178 -11
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +224 -13
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py +74 -20
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py +4 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py +7 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py +5 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py +5 -0
- diffusers/pipelines/stable_diffusion_attend_and_excite/__init__.py +48 -0
- diffusers/pipelines/{stable_diffusion → stable_diffusion_attend_and_excite}/pipeline_stable_diffusion_attend_and_excite.py +6 -2
- diffusers/pipelines/stable_diffusion_diffedit/__init__.py +48 -0
- diffusers/pipelines/{stable_diffusion → stable_diffusion_diffedit}/pipeline_stable_diffusion_diffedit.py +3 -3
- diffusers/pipelines/stable_diffusion_gligen/__init__.py +50 -0
- diffusers/pipelines/{stable_diffusion → stable_diffusion_gligen}/pipeline_stable_diffusion_gligen.py +3 -2
- diffusers/pipelines/{stable_diffusion → stable_diffusion_gligen}/pipeline_stable_diffusion_gligen_text_image.py +4 -3
- diffusers/pipelines/stable_diffusion_k_diffusion/__init__.py +60 -0
- diffusers/pipelines/{stable_diffusion → stable_diffusion_k_diffusion}/pipeline_stable_diffusion_k_diffusion.py +7 -1
- diffusers/pipelines/stable_diffusion_ldm3d/__init__.py +48 -0
- diffusers/pipelines/{stable_diffusion → stable_diffusion_ldm3d}/pipeline_stable_diffusion_ldm3d.py +51 -7
- diffusers/pipelines/stable_diffusion_panorama/__init__.py +48 -0
- diffusers/pipelines/{stable_diffusion → stable_diffusion_panorama}/pipeline_stable_diffusion_panorama.py +57 -8
- diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py +58 -6
- diffusers/pipelines/stable_diffusion_sag/__init__.py +48 -0
- diffusers/pipelines/{stable_diffusion → stable_diffusion_sag}/pipeline_stable_diffusion_sag.py +68 -10
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py +194 -17
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py +205 -16
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py +206 -17
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py +23 -17
- diffusers/pipelines/stable_video_diffusion/__init__.py +58 -0
- diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py +652 -0
- diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py +108 -12
- diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py +115 -14
- diffusers/pipelines/text_to_video_synthesis/__init__.py +2 -0
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py +6 -0
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py +23 -3
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py +334 -10
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py +1331 -0
- diffusers/pipelines/unclip/pipeline_unclip.py +2 -1
- diffusers/pipelines/unclip/pipeline_unclip_image_variation.py +1 -0
- diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py +1 -1
- diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py +14 -4
- diffusers/pipelines/wuerstchen/modeling_wuerstchen_prior.py +9 -5
- diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py +1 -1
- diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py +2 -2
- diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py +5 -1
- diffusers/schedulers/__init__.py +4 -4
- diffusers/schedulers/deprecated/__init__.py +50 -0
- diffusers/schedulers/{scheduling_karras_ve.py → deprecated/scheduling_karras_ve.py} +4 -4
- diffusers/schedulers/{scheduling_sde_vp.py → deprecated/scheduling_sde_vp.py} +4 -6
- diffusers/schedulers/scheduling_amused.py +162 -0
- diffusers/schedulers/scheduling_consistency_models.py +2 -0
- diffusers/schedulers/scheduling_ddim.py +1 -3
- diffusers/schedulers/scheduling_ddim_inverse.py +2 -7
- diffusers/schedulers/scheduling_ddim_parallel.py +1 -3
- diffusers/schedulers/scheduling_ddpm.py +47 -3
- diffusers/schedulers/scheduling_ddpm_parallel.py +47 -3
- diffusers/schedulers/scheduling_deis_multistep.py +28 -6
- diffusers/schedulers/scheduling_dpmsolver_multistep.py +28 -6
- diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py +28 -6
- diffusers/schedulers/scheduling_dpmsolver_sde.py +3 -3
- diffusers/schedulers/scheduling_dpmsolver_singlestep.py +28 -6
- diffusers/schedulers/scheduling_euler_ancestral_discrete.py +59 -3
- diffusers/schedulers/scheduling_euler_discrete.py +102 -16
- diffusers/schedulers/scheduling_heun_discrete.py +17 -5
- diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py +17 -5
- diffusers/schedulers/scheduling_k_dpm_2_discrete.py +17 -5
- diffusers/schedulers/scheduling_lcm.py +123 -29
- diffusers/schedulers/scheduling_lms_discrete.py +3 -3
- diffusers/schedulers/scheduling_pndm.py +1 -3
- diffusers/schedulers/scheduling_repaint.py +1 -3
- diffusers/schedulers/scheduling_unipc_multistep.py +28 -6
- diffusers/schedulers/scheduling_utils.py +3 -1
- diffusers/schedulers/scheduling_utils_flax.py +3 -1
- diffusers/training_utils.py +1 -1
- diffusers/utils/__init__.py +1 -2
- diffusers/utils/constants.py +10 -12
- diffusers/utils/dummy_pt_objects.py +75 -0
- diffusers/utils/dummy_torch_and_transformers_objects.py +105 -0
- diffusers/utils/dynamic_modules_utils.py +18 -22
- diffusers/utils/export_utils.py +8 -3
- diffusers/utils/hub_utils.py +24 -36
- diffusers/utils/logging.py +11 -11
- diffusers/utils/outputs.py +5 -5
- diffusers/utils/peft_utils.py +88 -44
- diffusers/utils/state_dict_utils.py +8 -0
- diffusers/utils/testing_utils.py +199 -1
- diffusers/utils/torch_utils.py +4 -4
- {diffusers-0.23.1.dist-info → diffusers-0.25.0.dist-info}/METADATA +86 -69
- diffusers-0.25.0.dist-info/RECORD +360 -0
- {diffusers-0.23.1.dist-info → diffusers-0.25.0.dist-info}/WHEEL +1 -1
- {diffusers-0.23.1.dist-info → diffusers-0.25.0.dist-info}/entry_points.txt +0 -1
- diffusers/loaders.py +0 -3336
- diffusers-0.23.1.dist-info/RECORD +0 -323
- /diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/modeling_roberta_series.py +0 -0
- {diffusers-0.23.1.dist-info → diffusers-0.25.0.dist-info}/LICENSE +0 -0
- {diffusers-0.23.1.dist-info → diffusers-0.25.0.dist-info}/top_level.txt +0 -0
diffusers/pipelines/__init__.py
CHANGED
@@ -17,7 +17,14 @@ from ..utils import (
|
|
17
17
|
|
18
18
|
# These modules contain pipelines from multiple libraries/frameworks
|
19
19
|
_dummy_objects = {}
|
20
|
-
_import_structure = {
|
20
|
+
_import_structure = {
|
21
|
+
"controlnet": [],
|
22
|
+
"controlnet_xs": [],
|
23
|
+
"deprecated": [],
|
24
|
+
"latent_diffusion": [],
|
25
|
+
"stable_diffusion": [],
|
26
|
+
"stable_diffusion_xl": [],
|
27
|
+
}
|
21
28
|
|
22
29
|
try:
|
23
30
|
if not is_torch_available():
|
@@ -38,12 +45,20 @@ else:
|
|
38
45
|
_import_structure["ddpm"] = ["DDPMPipeline"]
|
39
46
|
_import_structure["dit"] = ["DiTPipeline"]
|
40
47
|
_import_structure["latent_diffusion"].extend(["LDMSuperResolutionPipeline"])
|
41
|
-
_import_structure["
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
_import_structure["
|
48
|
+
_import_structure["pipeline_utils"] = [
|
49
|
+
"AudioPipelineOutput",
|
50
|
+
"DiffusionPipeline",
|
51
|
+
"ImagePipelineOutput",
|
52
|
+
]
|
53
|
+
_import_structure["deprecated"].extend(
|
54
|
+
[
|
55
|
+
"PNDMPipeline",
|
56
|
+
"LDMPipeline",
|
57
|
+
"RePaintPipeline",
|
58
|
+
"ScoreSdeVePipeline",
|
59
|
+
"KarrasVePipeline",
|
60
|
+
]
|
61
|
+
)
|
47
62
|
try:
|
48
63
|
if not (is_torch_available() and is_librosa_available()):
|
49
64
|
raise OptionalDependencyNotAvailable()
|
@@ -52,7 +67,23 @@ except OptionalDependencyNotAvailable:
|
|
52
67
|
|
53
68
|
_dummy_objects.update(get_objects_from_module(dummy_torch_and_librosa_objects))
|
54
69
|
else:
|
55
|
-
_import_structure["
|
70
|
+
_import_structure["deprecated"].extend(["AudioDiffusionPipeline", "Mel"])
|
71
|
+
|
72
|
+
try:
|
73
|
+
if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
|
74
|
+
raise OptionalDependencyNotAvailable()
|
75
|
+
except OptionalDependencyNotAvailable:
|
76
|
+
from ..utils import dummy_transformers_and_torch_and_note_seq_objects # noqa F403
|
77
|
+
|
78
|
+
_dummy_objects.update(get_objects_from_module(dummy_transformers_and_torch_and_note_seq_objects))
|
79
|
+
else:
|
80
|
+
_import_structure["deprecated"].extend(
|
81
|
+
[
|
82
|
+
"MidiProcessor",
|
83
|
+
"SpectrogramDiffusionPipeline",
|
84
|
+
]
|
85
|
+
)
|
86
|
+
|
56
87
|
try:
|
57
88
|
if not (is_torch_available() and is_transformers_available()):
|
58
89
|
raise OptionalDependencyNotAvailable()
|
@@ -61,7 +92,23 @@ except OptionalDependencyNotAvailable:
|
|
61
92
|
|
62
93
|
_dummy_objects.update(get_objects_from_module(dummy_torch_and_transformers_objects))
|
63
94
|
else:
|
64
|
-
_import_structure["
|
95
|
+
_import_structure["deprecated"].extend(
|
96
|
+
[
|
97
|
+
"VQDiffusionPipeline",
|
98
|
+
"AltDiffusionPipeline",
|
99
|
+
"AltDiffusionImg2ImgPipeline",
|
100
|
+
"CycleDiffusionPipeline",
|
101
|
+
"StableDiffusionInpaintPipelineLegacy",
|
102
|
+
"StableDiffusionPix2PixZeroPipeline",
|
103
|
+
"StableDiffusionParadigmsPipeline",
|
104
|
+
"StableDiffusionModelEditingPipeline",
|
105
|
+
"VersatileDiffusionDualGuidedPipeline",
|
106
|
+
"VersatileDiffusionImageVariationPipeline",
|
107
|
+
"VersatileDiffusionPipeline",
|
108
|
+
"VersatileDiffusionTextToImagePipeline",
|
109
|
+
]
|
110
|
+
)
|
111
|
+
_import_structure["amused"] = ["AmusedImg2ImgPipeline", "AmusedInpaintPipeline", "AmusedPipeline"]
|
65
112
|
_import_structure["animatediff"] = ["AnimateDiffPipeline"]
|
66
113
|
_import_structure["audioldm"] = ["AudioLDMPipeline"]
|
67
114
|
_import_structure["audioldm2"] = [
|
@@ -110,6 +157,10 @@ else:
|
|
110
157
|
"KandinskyV22PriorEmb2EmbPipeline",
|
111
158
|
"KandinskyV22PriorPipeline",
|
112
159
|
]
|
160
|
+
_import_structure["kandinsky3"] = [
|
161
|
+
"Kandinsky3Img2ImgPipeline",
|
162
|
+
"Kandinsky3Pipeline",
|
163
|
+
]
|
113
164
|
_import_structure["latent_consistency_models"] = [
|
114
165
|
"LatentConsistencyModelImg2ImgPipeline",
|
115
166
|
"LatentConsistencyModelPipeline",
|
@@ -123,32 +174,27 @@ else:
|
|
123
174
|
_import_structure["stable_diffusion"].extend(
|
124
175
|
[
|
125
176
|
"CLIPImageProjection",
|
126
|
-
"CycleDiffusionPipeline",
|
127
|
-
"StableDiffusionAttendAndExcitePipeline",
|
128
177
|
"StableDiffusionDepth2ImgPipeline",
|
129
|
-
"StableDiffusionDiffEditPipeline",
|
130
|
-
"StableDiffusionGLIGENPipeline",
|
131
|
-
"StableDiffusionGLIGENPipeline",
|
132
|
-
"StableDiffusionGLIGENTextImagePipeline",
|
133
178
|
"StableDiffusionImageVariationPipeline",
|
134
179
|
"StableDiffusionImg2ImgPipeline",
|
135
180
|
"StableDiffusionInpaintPipeline",
|
136
|
-
"StableDiffusionInpaintPipelineLegacy",
|
137
181
|
"StableDiffusionInstructPix2PixPipeline",
|
138
182
|
"StableDiffusionLatentUpscalePipeline",
|
139
|
-
"StableDiffusionLDM3DPipeline",
|
140
|
-
"StableDiffusionModelEditingPipeline",
|
141
|
-
"StableDiffusionPanoramaPipeline",
|
142
|
-
"StableDiffusionParadigmsPipeline",
|
143
183
|
"StableDiffusionPipeline",
|
144
|
-
"StableDiffusionPix2PixZeroPipeline",
|
145
|
-
"StableDiffusionSAGPipeline",
|
146
184
|
"StableDiffusionUpscalePipeline",
|
147
185
|
"StableUnCLIPImg2ImgPipeline",
|
148
186
|
"StableUnCLIPPipeline",
|
187
|
+
"StableDiffusionLDM3DPipeline",
|
149
188
|
]
|
150
189
|
)
|
190
|
+
_import_structure["stable_diffusion_attend_and_excite"] = ["StableDiffusionAttendAndExcitePipeline"]
|
151
191
|
_import_structure["stable_diffusion_safe"] = ["StableDiffusionPipelineSafe"]
|
192
|
+
_import_structure["stable_diffusion_sag"] = ["StableDiffusionSAGPipeline"]
|
193
|
+
_import_structure["stable_diffusion_gligen"] = [
|
194
|
+
"StableDiffusionGLIGENPipeline",
|
195
|
+
"StableDiffusionGLIGENTextImagePipeline",
|
196
|
+
]
|
197
|
+
_import_structure["stable_video_diffusion"] = ["StableVideoDiffusionPipeline"]
|
152
198
|
_import_structure["stable_diffusion_xl"].extend(
|
153
199
|
[
|
154
200
|
"StableDiffusionXLImg2ImgPipeline",
|
@@ -157,10 +203,17 @@ else:
|
|
157
203
|
"StableDiffusionXLPipeline",
|
158
204
|
]
|
159
205
|
)
|
160
|
-
_import_structure["
|
206
|
+
_import_structure["stable_diffusion_diffedit"] = ["StableDiffusionDiffEditPipeline"]
|
207
|
+
_import_structure["stable_diffusion_ldm3d"] = ["StableDiffusionLDM3DPipeline"]
|
208
|
+
_import_structure["stable_diffusion_panorama"] = ["StableDiffusionPanoramaPipeline"]
|
209
|
+
_import_structure["t2i_adapter"] = [
|
210
|
+
"StableDiffusionAdapterPipeline",
|
211
|
+
"StableDiffusionXLAdapterPipeline",
|
212
|
+
]
|
161
213
|
_import_structure["text_to_video_synthesis"] = [
|
162
214
|
"TextToVideoSDPipeline",
|
163
215
|
"TextToVideoZeroPipeline",
|
216
|
+
"TextToVideoZeroSDXLPipeline",
|
164
217
|
"VideoToVideoSDPipeline",
|
165
218
|
]
|
166
219
|
_import_structure["unclip"] = ["UnCLIPImageVariationPipeline", "UnCLIPPipeline"]
|
@@ -170,13 +223,6 @@ else:
|
|
170
223
|
"UniDiffuserPipeline",
|
171
224
|
"UniDiffuserTextDecoder",
|
172
225
|
]
|
173
|
-
_import_structure["versatile_diffusion"] = [
|
174
|
-
"VersatileDiffusionDualGuidedPipeline",
|
175
|
-
"VersatileDiffusionImageVariationPipeline",
|
176
|
-
"VersatileDiffusionPipeline",
|
177
|
-
"VersatileDiffusionTextToImagePipeline",
|
178
|
-
]
|
179
|
-
_import_structure["vq_diffusion"] = ["VQDiffusionPipeline"]
|
180
226
|
_import_structure["wuerstchen"] = [
|
181
227
|
"WuerstchenCombinedPipeline",
|
182
228
|
"WuerstchenDecoderPipeline",
|
@@ -203,7 +249,6 @@ else:
|
|
203
249
|
[
|
204
250
|
"OnnxStableDiffusionImg2ImgPipeline",
|
205
251
|
"OnnxStableDiffusionInpaintPipeline",
|
206
|
-
"OnnxStableDiffusionInpaintPipelineLegacy",
|
207
252
|
"OnnxStableDiffusionPipeline",
|
208
253
|
"OnnxStableDiffusionUpscalePipeline",
|
209
254
|
"StableDiffusionOnnxPipeline",
|
@@ -214,11 +259,13 @@ try:
|
|
214
259
|
if not (is_torch_available() and is_transformers_available() and is_k_diffusion_available()):
|
215
260
|
raise OptionalDependencyNotAvailable()
|
216
261
|
except OptionalDependencyNotAvailable:
|
217
|
-
from ..utils import
|
262
|
+
from ..utils import (
|
263
|
+
dummy_torch_and_transformers_and_k_diffusion_objects,
|
264
|
+
)
|
218
265
|
|
219
266
|
_dummy_objects.update(get_objects_from_module(dummy_torch_and_transformers_and_k_diffusion_objects))
|
220
267
|
else:
|
221
|
-
_import_structure["
|
268
|
+
_import_structure["stable_diffusion_k_diffusion"] = ["StableDiffusionKDiffusionPipeline"]
|
222
269
|
try:
|
223
270
|
if not is_flax_available():
|
224
271
|
raise OptionalDependencyNotAvailable()
|
@@ -249,15 +296,6 @@ else:
|
|
249
296
|
"FlaxStableDiffusionXLPipeline",
|
250
297
|
]
|
251
298
|
)
|
252
|
-
try:
|
253
|
-
if not (is_transformers_available() and is_torch_available() and is_note_seq_available()):
|
254
|
-
raise OptionalDependencyNotAvailable()
|
255
|
-
except OptionalDependencyNotAvailable:
|
256
|
-
from ..utils import dummy_transformers_and_torch_and_note_seq_objects # noqa F403
|
257
|
-
|
258
|
-
_dummy_objects.update(get_objects_from_module(dummy_transformers_and_torch_and_note_seq_objects))
|
259
|
-
else:
|
260
|
-
_import_structure["spectrogram_diffusion"] = ["MidiProcessor", "SpectrogramDiffusionPipeline"]
|
261
299
|
|
262
300
|
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
263
301
|
try:
|
@@ -267,19 +305,23 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
267
305
|
from ..utils.dummy_pt_objects import * # noqa F403
|
268
306
|
|
269
307
|
else:
|
270
|
-
from .auto_pipeline import
|
308
|
+
from .auto_pipeline import (
|
309
|
+
AutoPipelineForImage2Image,
|
310
|
+
AutoPipelineForInpainting,
|
311
|
+
AutoPipelineForText2Image,
|
312
|
+
)
|
271
313
|
from .consistency_models import ConsistencyModelPipeline
|
272
314
|
from .dance_diffusion import DanceDiffusionPipeline
|
273
315
|
from .ddim import DDIMPipeline
|
274
316
|
from .ddpm import DDPMPipeline
|
317
|
+
from .deprecated import KarrasVePipeline, LDMPipeline, PNDMPipeline, RePaintPipeline, ScoreSdeVePipeline
|
275
318
|
from .dit import DiTPipeline
|
276
319
|
from .latent_diffusion import LDMSuperResolutionPipeline
|
277
|
-
from .
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
from .stochastic_karras_ve import KarrasVePipeline
|
320
|
+
from .pipeline_utils import (
|
321
|
+
AudioPipelineOutput,
|
322
|
+
DiffusionPipeline,
|
323
|
+
ImagePipelineOutput,
|
324
|
+
)
|
283
325
|
|
284
326
|
try:
|
285
327
|
if not (is_torch_available() and is_librosa_available()):
|
@@ -287,7 +329,7 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
287
329
|
except OptionalDependencyNotAvailable:
|
288
330
|
from ..utils.dummy_torch_and_librosa_objects import *
|
289
331
|
else:
|
290
|
-
from .
|
332
|
+
from .deprecated import AudioDiffusionPipeline, Mel
|
291
333
|
|
292
334
|
try:
|
293
335
|
if not (is_torch_available() and is_transformers_available()):
|
@@ -295,10 +337,14 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
295
337
|
except OptionalDependencyNotAvailable:
|
296
338
|
from ..utils.dummy_torch_and_transformers_objects import *
|
297
339
|
else:
|
298
|
-
from .
|
340
|
+
from .amused import AmusedImg2ImgPipeline, AmusedInpaintPipeline, AmusedPipeline
|
299
341
|
from .animatediff import AnimateDiffPipeline
|
300
342
|
from .audioldm import AudioLDMPipeline
|
301
|
-
from .audioldm2 import
|
343
|
+
from .audioldm2 import (
|
344
|
+
AudioLDM2Pipeline,
|
345
|
+
AudioLDM2ProjectionModel,
|
346
|
+
AudioLDM2UNet2DConditionModel,
|
347
|
+
)
|
302
348
|
from .blip_diffusion import BlipDiffusionPipeline
|
303
349
|
from .controlnet import (
|
304
350
|
BlipDiffusionControlNetPipeline,
|
@@ -317,6 +363,20 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
317
363
|
IFPipeline,
|
318
364
|
IFSuperResolutionPipeline,
|
319
365
|
)
|
366
|
+
from .deprecated import (
|
367
|
+
AltDiffusionImg2ImgPipeline,
|
368
|
+
AltDiffusionPipeline,
|
369
|
+
CycleDiffusionPipeline,
|
370
|
+
StableDiffusionInpaintPipelineLegacy,
|
371
|
+
StableDiffusionModelEditingPipeline,
|
372
|
+
StableDiffusionParadigmsPipeline,
|
373
|
+
StableDiffusionPix2PixZeroPipeline,
|
374
|
+
VersatileDiffusionDualGuidedPipeline,
|
375
|
+
VersatileDiffusionImageVariationPipeline,
|
376
|
+
VersatileDiffusionPipeline,
|
377
|
+
VersatileDiffusionTextToImagePipeline,
|
378
|
+
VQDiffusionPipeline,
|
379
|
+
)
|
320
380
|
from .kandinsky import (
|
321
381
|
KandinskyCombinedPipeline,
|
322
382
|
KandinskyImg2ImgCombinedPipeline,
|
@@ -338,7 +398,14 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
338
398
|
KandinskyV22PriorEmb2EmbPipeline,
|
339
399
|
KandinskyV22PriorPipeline,
|
340
400
|
)
|
341
|
-
from .
|
401
|
+
from .kandinsky3 import (
|
402
|
+
Kandinsky3Img2ImgPipeline,
|
403
|
+
Kandinsky3Pipeline,
|
404
|
+
)
|
405
|
+
from .latent_consistency_models import (
|
406
|
+
LatentConsistencyModelImg2ImgPipeline,
|
407
|
+
LatentConsistencyModelPipeline,
|
408
|
+
)
|
342
409
|
from .latent_diffusion import LDMTextToImagePipeline
|
343
410
|
from .musicldm import MusicLDMPipeline
|
344
411
|
from .paint_by_example import PaintByExamplePipeline
|
@@ -347,40 +414,39 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
347
414
|
from .shap_e import ShapEImg2ImgPipeline, ShapEPipeline
|
348
415
|
from .stable_diffusion import (
|
349
416
|
CLIPImageProjection,
|
350
|
-
CycleDiffusionPipeline,
|
351
|
-
StableDiffusionAttendAndExcitePipeline,
|
352
417
|
StableDiffusionDepth2ImgPipeline,
|
353
|
-
StableDiffusionDiffEditPipeline,
|
354
|
-
StableDiffusionGLIGENPipeline,
|
355
|
-
StableDiffusionGLIGENTextImagePipeline,
|
356
418
|
StableDiffusionImageVariationPipeline,
|
357
419
|
StableDiffusionImg2ImgPipeline,
|
358
420
|
StableDiffusionInpaintPipeline,
|
359
|
-
StableDiffusionInpaintPipelineLegacy,
|
360
421
|
StableDiffusionInstructPix2PixPipeline,
|
361
422
|
StableDiffusionLatentUpscalePipeline,
|
362
|
-
StableDiffusionLDM3DPipeline,
|
363
|
-
StableDiffusionModelEditingPipeline,
|
364
|
-
StableDiffusionPanoramaPipeline,
|
365
|
-
StableDiffusionParadigmsPipeline,
|
366
423
|
StableDiffusionPipeline,
|
367
|
-
StableDiffusionPix2PixZeroPipeline,
|
368
|
-
StableDiffusionSAGPipeline,
|
369
424
|
StableDiffusionUpscalePipeline,
|
370
425
|
StableUnCLIPImg2ImgPipeline,
|
371
426
|
StableUnCLIPPipeline,
|
372
427
|
)
|
428
|
+
from .stable_diffusion_attend_and_excite import StableDiffusionAttendAndExcitePipeline
|
429
|
+
from .stable_diffusion_diffedit import StableDiffusionDiffEditPipeline
|
430
|
+
from .stable_diffusion_gligen import StableDiffusionGLIGENPipeline, StableDiffusionGLIGENTextImagePipeline
|
431
|
+
from .stable_diffusion_ldm3d import StableDiffusionLDM3DPipeline
|
432
|
+
from .stable_diffusion_panorama import StableDiffusionPanoramaPipeline
|
373
433
|
from .stable_diffusion_safe import StableDiffusionPipelineSafe
|
434
|
+
from .stable_diffusion_sag import StableDiffusionSAGPipeline
|
374
435
|
from .stable_diffusion_xl import (
|
375
436
|
StableDiffusionXLImg2ImgPipeline,
|
376
437
|
StableDiffusionXLInpaintPipeline,
|
377
438
|
StableDiffusionXLInstructPix2PixPipeline,
|
378
439
|
StableDiffusionXLPipeline,
|
379
440
|
)
|
380
|
-
from .
|
441
|
+
from .stable_video_diffusion import StableVideoDiffusionPipeline
|
442
|
+
from .t2i_adapter import (
|
443
|
+
StableDiffusionAdapterPipeline,
|
444
|
+
StableDiffusionXLAdapterPipeline,
|
445
|
+
)
|
381
446
|
from .text_to_video_synthesis import (
|
382
447
|
TextToVideoSDPipeline,
|
383
448
|
TextToVideoZeroPipeline,
|
449
|
+
TextToVideoZeroSDXLPipeline,
|
384
450
|
VideoToVideoSDPipeline,
|
385
451
|
)
|
386
452
|
from .unclip import UnCLIPImageVariationPipeline, UnCLIPPipeline
|
@@ -390,13 +456,6 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
390
456
|
UniDiffuserPipeline,
|
391
457
|
UniDiffuserTextDecoder,
|
392
458
|
)
|
393
|
-
from .versatile_diffusion import (
|
394
|
-
VersatileDiffusionDualGuidedPipeline,
|
395
|
-
VersatileDiffusionImageVariationPipeline,
|
396
|
-
VersatileDiffusionPipeline,
|
397
|
-
VersatileDiffusionTextToImagePipeline,
|
398
|
-
)
|
399
|
-
from .vq_diffusion import VQDiffusionPipeline
|
400
459
|
from .wuerstchen import (
|
401
460
|
WuerstchenCombinedPipeline,
|
402
461
|
WuerstchenDecoderPipeline,
|
@@ -421,7 +480,6 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
421
480
|
from .stable_diffusion import (
|
422
481
|
OnnxStableDiffusionImg2ImgPipeline,
|
423
482
|
OnnxStableDiffusionInpaintPipeline,
|
424
|
-
OnnxStableDiffusionInpaintPipelineLegacy,
|
425
483
|
OnnxStableDiffusionPipeline,
|
426
484
|
OnnxStableDiffusionUpscalePipeline,
|
427
485
|
StableDiffusionOnnxPipeline,
|
@@ -433,7 +491,7 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
433
491
|
except OptionalDependencyNotAvailable:
|
434
492
|
from ..utils.dummy_torch_and_transformers_and_k_diffusion_objects import *
|
435
493
|
else:
|
436
|
-
from .
|
494
|
+
from .stable_diffusion_k_diffusion import StableDiffusionKDiffusionPipeline
|
437
495
|
|
438
496
|
try:
|
439
497
|
if not is_flax_available():
|
@@ -466,7 +524,10 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
466
524
|
from ..utils.dummy_transformers_and_torch_and_note_seq_objects import * # noqa F403
|
467
525
|
|
468
526
|
else:
|
469
|
-
from .
|
527
|
+
from .deprecated import (
|
528
|
+
MidiProcessor,
|
529
|
+
SpectrogramDiffusionPipeline,
|
530
|
+
)
|
470
531
|
|
471
532
|
else:
|
472
533
|
import sys
|
@@ -0,0 +1,62 @@
|
|
1
|
+
from typing import TYPE_CHECKING
|
2
|
+
|
3
|
+
from ...utils import (
|
4
|
+
DIFFUSERS_SLOW_IMPORT,
|
5
|
+
OptionalDependencyNotAvailable,
|
6
|
+
_LazyModule,
|
7
|
+
is_torch_available,
|
8
|
+
is_transformers_available,
|
9
|
+
)
|
10
|
+
|
11
|
+
|
12
|
+
_dummy_objects = {}
|
13
|
+
_import_structure = {}
|
14
|
+
|
15
|
+
try:
|
16
|
+
if not (is_transformers_available() and is_torch_available()):
|
17
|
+
raise OptionalDependencyNotAvailable()
|
18
|
+
except OptionalDependencyNotAvailable:
|
19
|
+
from ...utils.dummy_torch_and_transformers_objects import (
|
20
|
+
AmusedImg2ImgPipeline,
|
21
|
+
AmusedInpaintPipeline,
|
22
|
+
AmusedPipeline,
|
23
|
+
)
|
24
|
+
|
25
|
+
_dummy_objects.update(
|
26
|
+
{
|
27
|
+
"AmusedPipeline": AmusedPipeline,
|
28
|
+
"AmusedImg2ImgPipeline": AmusedImg2ImgPipeline,
|
29
|
+
"AmusedInpaintPipeline": AmusedInpaintPipeline,
|
30
|
+
}
|
31
|
+
)
|
32
|
+
else:
|
33
|
+
_import_structure["pipeline_amused"] = ["AmusedPipeline"]
|
34
|
+
_import_structure["pipeline_amused_img2img"] = ["AmusedImg2ImgPipeline"]
|
35
|
+
_import_structure["pipeline_amused_inpaint"] = ["AmusedInpaintPipeline"]
|
36
|
+
|
37
|
+
|
38
|
+
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
39
|
+
try:
|
40
|
+
if not (is_transformers_available() and is_torch_available()):
|
41
|
+
raise OptionalDependencyNotAvailable()
|
42
|
+
except OptionalDependencyNotAvailable:
|
43
|
+
from ...utils.dummy_torch_and_transformers_objects import (
|
44
|
+
AmusedPipeline,
|
45
|
+
)
|
46
|
+
else:
|
47
|
+
from .pipeline_amused import AmusedPipeline
|
48
|
+
from .pipeline_amused_img2img import AmusedImg2ImgPipeline
|
49
|
+
from .pipeline_amused_inpaint import AmusedInpaintPipeline
|
50
|
+
|
51
|
+
else:
|
52
|
+
import sys
|
53
|
+
|
54
|
+
sys.modules[__name__] = _LazyModule(
|
55
|
+
__name__,
|
56
|
+
globals()["__file__"],
|
57
|
+
_import_structure,
|
58
|
+
module_spec=__spec__,
|
59
|
+
)
|
60
|
+
|
61
|
+
for name, value in _dummy_objects.items():
|
62
|
+
setattr(sys.modules[__name__], name, value)
|