diffusers 0.26.3__tar.gz → 0.27.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {diffusers-0.26.3/src/diffusers.egg-info → diffusers-0.27.0}/PKG-INFO +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/setup.py +4 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/__init__.py +20 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/commands/__init__.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/commands/diffusers_cli.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/commands/env.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/commands/fp16_safetensors.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/configuration_utils.py +7 -3
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/dependency_versions_check.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/dependency_versions_table.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/experimental/rl/value_guided_sampling.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/image_processor.py +110 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/autoencoder.py +7 -8
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/controlnet.py +17 -8
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/ip_adapter.py +86 -23
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/lora.py +105 -310
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/lora_conversion_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/peft.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/single_file.py +51 -12
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/single_file_utils.py +274 -49
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/textual_inversion.py +23 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/unet.py +195 -41
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/__init__.py +3 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/activations.py +9 -9
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/attention.py +26 -36
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/attention_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/attention_processor.py +171 -114
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/autoencoders/autoencoder_asym_kl.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/autoencoders/autoencoder_kl.py +3 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/autoencoders/autoencoder_tiny.py +4 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/autoencoders/consistency_decoder_vae.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/autoencoders/vae.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/controlnet.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/controlnet_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/downsampling.py +8 -12
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/dual_transformer_2d.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/embeddings.py +3 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/embeddings_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/lora.py +33 -10
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/modeling_flax_pytorch_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/modeling_flax_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/modeling_pytorch_flax_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/modeling_utils.py +4 -6
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/normalization.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/resnet.py +31 -58
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/resnet_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/t5_film_transformer.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformer_2d.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformer_temporal.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformers/dual_transformer_2d.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformers/t5_film_transformer.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformers/transformer_2d.py +29 -31
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformers/transformer_temporal.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unet_1d.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unet_1d_blocks.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unet_2d.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unet_2d_blocks.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unet_2d_condition.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/__init__.py +1 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_1d.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_1d_blocks.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_2d.py +4 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_2d_blocks.py +238 -98
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_2d_blocks_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_2d_condition.py +420 -323
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_2d_condition_flax.py +21 -12
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_3d_blocks.py +50 -40
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_3d_condition.py +47 -8
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_i2vgen_xl.py +75 -30
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_kandinsky3.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_motion_model.py +48 -8
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/unet_spatio_temporal_condition.py +1 -1
- diffusers-0.27.0/src/diffusers/models/unets/unet_stable_cascade.py +610 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/unets/uvit_2d.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/upsampling.py +10 -16
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/vae_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/vq_model.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/optimization.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/__init__.py +26 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/amused/pipeline_amused.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/amused/pipeline_amused_img2img.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/amused/pipeline_amused_inpaint.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/animatediff/pipeline_animatediff.py +162 -417
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py +165 -137
- diffusers-0.27.0/src/diffusers/pipelines/animatediff/pipeline_output.py +23 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/audioldm/pipeline_audioldm.py +3 -19
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/audioldm2/modeling_audioldm2.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/audioldm2/pipeline_audioldm2.py +3 -3
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/auto_pipeline.py +7 -16
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/blip_diffusion/blip_image_processing.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/blip_diffusion/modeling_ctx_clip.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/blip_diffusion/pipeline_blip_diffusion.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_controlnet.py +90 -90
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_controlnet_blip_diffusion.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py +98 -90
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py +92 -90
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py +145 -70
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py +126 -89
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py +108 -96
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/pipeline_flax_controlnet.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/ddim/pipeline_ddim.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/ddpm/pipeline_ddpm.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py +4 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py +4 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py +5 -5
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py +4 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py +5 -5
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py +5 -5
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py +10 -120
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py +10 -91
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/audio_diffusion/mel.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/audio_diffusion/pipeline_audio_diffusion.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/pndm/pipeline_pndm.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/repaint/pipeline_repaint.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/spectrogram_diffusion/continuous_encoder.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/spectrogram_diffusion/midi_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/spectrogram_diffusion/notes_encoder.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/spectrogram_diffusion/pipeline_spectrogram_diffusion.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py +5 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py +5 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py +7 -22
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py +5 -39
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py +5 -5
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stochastic_karras_ve/pipeline_stochastic_karras_ve.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py +31 -22
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py +1 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/vq_diffusion/pipeline_vq_diffusion.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/dit/pipeline_dit.py +1 -1
- diffusers-0.27.0/src/diffusers/pipelines/free_init_utils.py +184 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/i2vgen_xl/pipeline_i2vgen_xl.py +22 -104
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_combined.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_inpaint.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_prior.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet_img2img.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_img2img.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py +104 -93
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py +112 -74
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py +1 -1
- diffusers-0.27.0/src/diffusers/pipelines/ledits_pp/__init__.py +55 -0
- diffusers-0.27.0/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py +1505 -0
- diffusers-0.27.0/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion_xl.py +1797 -0
- diffusers-0.27.0/src/diffusers/pipelines/ledits_pp/pipeline_output.py +43 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/musicldm/pipeline_musicldm.py +3 -19
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/onnx_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/paint_by_example/image_encoder.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py +3 -3
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/pia/pipeline_pia.py +168 -327
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/pipeline_flax_utils.py +1 -1
- diffusers-0.27.0/src/diffusers/pipelines/pipeline_loading_utils.py +508 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/pipeline_utils.py +188 -534
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py +56 -10
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py +3 -3
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/shap_e/camera.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/shap_e/pipeline_shap_e.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/shap_e/renderer.py +1 -1
- diffusers-0.27.0/src/diffusers/pipelines/stable_cascade/__init__.py +50 -0
- diffusers-0.27.0/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade.py +482 -0
- diffusers-0.27.0/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py +311 -0
- diffusers-0.27.0/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_prior.py +638 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/clip_image_project_model.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py +4 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_img2img.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +90 -146
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py +5 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py +4 -32
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +92 -119
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +92 -119
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py +13 -59
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py +3 -31
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py +5 -33
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py +5 -21
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py +7 -21
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/safety_checker.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/safety_checker_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/stable_unclip_image_normalizer.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_attend_and_excite/pipeline_stable_diffusion_attend_and_excite.py +5 -21
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_diffedit/pipeline_stable_diffusion_diffedit.py +9 -38
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py +5 -34
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py +6 -35
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_k_diffusion.py +7 -6
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_xl_k_diffusion.py +4 -124
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_ldm3d/pipeline_stable_diffusion_ldm3d.py +282 -80
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_panorama/pipeline_stable_diffusion_panorama.py +94 -46
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py +3 -3
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_safe/safety_checker.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_sag/pipeline_stable_diffusion_sag.py +6 -22
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_flax_stable_diffusion_xl.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py +96 -148
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py +98 -154
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py +98 -153
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py +25 -87
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py +89 -80
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py +5 -49
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py +80 -88
- diffusers-0.27.0/src/diffusers/pipelines/text_to_video_synthesis/pipeline_output.py +25 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py +15 -86
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py +20 -93
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py +5 -5
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py +3 -19
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unclip/pipeline_unclip.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unclip/text_proj.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py +35 -35
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py +4 -21
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_diffnext.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/modeling_wuerstchen_prior.py +4 -5
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py +8 -8
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py +2 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/__init__.py +7 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/deprecated/scheduling_karras_ve.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_consistency_models.py +42 -19
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddim.py +2 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddim_flax.py +13 -5
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddim_inverse.py +2 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddim_parallel.py +2 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddpm.py +2 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddpm_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddpm_parallel.py +2 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ddpm_wuerstchen.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_deis_multistep.py +46 -19
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py +107 -21
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_dpmsolver_multistep_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py +9 -7
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_dpmsolver_sde.py +35 -35
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py +49 -18
- diffusers-0.27.0/src/diffusers/schedulers/scheduling_edm_dpmsolver_multistep.py +683 -0
- diffusers-0.27.0/src/diffusers/schedulers/scheduling_edm_euler.py +381 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_euler_ancestral_discrete.py +43 -15
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_euler_discrete.py +42 -17
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_euler_discrete_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_heun_discrete.py +35 -35
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_ipndm.py +37 -11
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py +44 -44
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_k_dpm_2_discrete.py +44 -44
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_karras_ve_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_lcm.py +38 -14
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_lms_discrete.py +43 -15
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_lms_discrete_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_pndm.py +2 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_pndm_flax.py +2 -4
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_repaint.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_sasolver.py +41 -9
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_sde_ve.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_sde_ve_flax.py +1 -1
- diffusers-0.27.0/src/diffusers/schedulers/scheduling_tcd.py +686 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_unclip.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_unipc_multistep.py +46 -19
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_utils.py +2 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_utils_flax.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_vq_diffusion.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/training_utils.py +9 -2
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/__init__.py +2 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/accelerate_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/constants.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/doc_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_pt_objects.py +60 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_torch_and_transformers_objects.py +75 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dynamic_modules_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/export_utils.py +3 -3
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/hub_utils.py +60 -16
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/import_utils.py +15 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/loading_utils.py +2 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/logging.py +1 -1
- diffusers-0.27.0/src/diffusers/utils/model_card_template.md +24 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/outputs.py +14 -7
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/peft_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/state_dict_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/testing_utils.py +2 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/torch_utils.py +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0/src/diffusers.egg-info}/PKG-INFO +1 -1
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers.egg-info/SOURCES.txt +15 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers.egg-info/requires.txt +4 -4
- diffusers-0.26.3/src/diffusers/pipelines/animatediff/pipeline_output.py +0 -22
- diffusers-0.26.3/src/diffusers/pipelines/text_to_video_synthesis/pipeline_output.py +0 -23
- {diffusers-0.26.3 → diffusers-0.27.0}/LICENSE +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/MANIFEST.in +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/README.md +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/pyproject.toml +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/setup.cfg +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/experimental/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/experimental/rl/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/loaders/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/adapter.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/autoencoders/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/modeling_outputs.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/prior_transformer.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformers/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/models/transformers/prior_transformer.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/amused/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/animatediff/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/audioldm/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/audioldm2/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/blip_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/consistency_models/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/controlnet/multicontrolnet.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/dance_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/ddim/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/ddpm/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/pipeline_output.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/safety_checker.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/timesteps.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deepfloyd_if/watermark.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/alt_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/alt_diffusion/modeling_roberta_series.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_output.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/audio_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/latent_diffusion_uncond/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/pndm/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/repaint/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/score_sde_ve/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/spectrogram_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_onnx_stable_diffusion_inpaint_legacy.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/stochastic_karras_ve/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/versatile_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/deprecated/vq_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/dit/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/i2vgen_xl/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky/text_encoder.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior_emb2emb.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky3/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky3/convert_kandinsky3_unet.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky3/pipeline_kandinsky3.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/kandinsky3/pipeline_kandinsky3_img2img.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/latent_consistency_models/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/latent_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/musicldm/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/paint_by_example/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/pia/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/pixart_alpha/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/semantic_stable_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/semantic_stable_diffusion/pipeline_output.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/shap_e/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion/pipeline_output.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_attend_and_excite/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_diffedit/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_gligen/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_k_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_ldm3d/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_panorama/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_safe/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_safe/pipeline_output.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_sag/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_output.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_diffusion_xl/watermark.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/stable_video_diffusion/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/t2i_adapter/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/text_to_video_synthesis/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unclip/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unidiffuser/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unidiffuser/modeling_text_decoder.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/unidiffuser/modeling_uvit.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/pipelines/wuerstchen/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/py.typed +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/deprecated/__init__.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_amused.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/schedulers/scheduling_consistency_decoder.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/deprecation_utils.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_flax_and_transformers_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_flax_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_note_seq_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_onnx_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_torch_and_librosa_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_torch_and_scipy_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_torch_and_torchsde_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_torch_and_transformers_and_k_diffusion_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_torch_and_transformers_and_onnx_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/dummy_transformers_and_torch_and_note_seq_objects.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/pil_utils.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers/utils/versions.py +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers.egg-info/dependency_links.txt +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers.egg-info/entry_points.txt +0 -0
- {diffusers-0.26.3 → diffusers-0.27.0}/src/diffusers.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: diffusers
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.27.0
|
4
4
|
Summary: State-of-the-art diffusion in PyTorch and JAX.
|
5
5
|
Home-page: https://github.com/huggingface/diffusers
|
6
6
|
Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 The HuggingFace Team. All rights reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -126,8 +126,8 @@ _deps = [
|
|
126
126
|
"regex!=2019.12.17",
|
127
127
|
"requests",
|
128
128
|
"tensorboard",
|
129
|
-
"torch>=1.4
|
130
|
-
"torchvision
|
129
|
+
"torch>=1.4",
|
130
|
+
"torchvision",
|
131
131
|
"transformers>=4.25.1",
|
132
132
|
"urllib3<=2.0.0",
|
133
133
|
]
|
@@ -249,7 +249,7 @@ version_range_max = max(sys.version_info[1], 10) + 1
|
|
249
249
|
|
250
250
|
setup(
|
251
251
|
name="diffusers",
|
252
|
-
version="0.
|
252
|
+
version="0.27.0", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
|
253
253
|
description="State-of-the-art diffusion in PyTorch and JAX.",
|
254
254
|
long_description=open("README.md", "r", encoding="utf-8").read(),
|
255
255
|
long_description_content_type="text/markdown",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "0.
|
1
|
+
__version__ = "0.27.0"
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
@@ -86,6 +86,7 @@ else:
|
|
86
86
|
"MotionAdapter",
|
87
87
|
"MultiAdapter",
|
88
88
|
"PriorTransformer",
|
89
|
+
"StableCascadeUNet",
|
89
90
|
"T2IAdapter",
|
90
91
|
"T5FilmDecoder",
|
91
92
|
"Transformer2DModel",
|
@@ -128,6 +129,7 @@ else:
|
|
128
129
|
"PNDMPipeline",
|
129
130
|
"RePaintPipeline",
|
130
131
|
"ScoreSdeVePipeline",
|
132
|
+
"StableDiffusionMixin",
|
131
133
|
]
|
132
134
|
)
|
133
135
|
_import_structure["schedulers"].extend(
|
@@ -144,6 +146,8 @@ else:
|
|
144
146
|
"DPMSolverMultistepInverseScheduler",
|
145
147
|
"DPMSolverMultistepScheduler",
|
146
148
|
"DPMSolverSinglestepScheduler",
|
149
|
+
"EDMDPMSolverMultistepScheduler",
|
150
|
+
"EDMEulerScheduler",
|
147
151
|
"EulerAncestralDiscreteScheduler",
|
148
152
|
"EulerDiscreteScheduler",
|
149
153
|
"HeunDiscreteScheduler",
|
@@ -157,6 +161,7 @@ else:
|
|
157
161
|
"SASolverScheduler",
|
158
162
|
"SchedulerMixin",
|
159
163
|
"ScoreSdeVeScheduler",
|
164
|
+
"TCDScheduler",
|
160
165
|
"UnCLIPScheduler",
|
161
166
|
"UniPCMultistepScheduler",
|
162
167
|
"VQDiffusionScheduler",
|
@@ -248,6 +253,8 @@ else:
|
|
248
253
|
"LatentConsistencyModelImg2ImgPipeline",
|
249
254
|
"LatentConsistencyModelPipeline",
|
250
255
|
"LDMTextToImagePipeline",
|
256
|
+
"LEditsPPPipelineStableDiffusion",
|
257
|
+
"LEditsPPPipelineStableDiffusionXL",
|
251
258
|
"MusicLDMPipeline",
|
252
259
|
"PaintByExamplePipeline",
|
253
260
|
"PIAPipeline",
|
@@ -255,6 +262,9 @@ else:
|
|
255
262
|
"SemanticStableDiffusionPipeline",
|
256
263
|
"ShapEImg2ImgPipeline",
|
257
264
|
"ShapEPipeline",
|
265
|
+
"StableCascadeCombinedPipeline",
|
266
|
+
"StableCascadeDecoderPipeline",
|
267
|
+
"StableCascadePriorPipeline",
|
258
268
|
"StableDiffusionAdapterPipeline",
|
259
269
|
"StableDiffusionAttendAndExcitePipeline",
|
260
270
|
"StableDiffusionControlNetImg2ImgPipeline",
|
@@ -512,6 +522,7 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
512
522
|
PNDMPipeline,
|
513
523
|
RePaintPipeline,
|
514
524
|
ScoreSdeVePipeline,
|
525
|
+
StableDiffusionMixin,
|
515
526
|
)
|
516
527
|
from .schedulers import (
|
517
528
|
AmusedScheduler,
|
@@ -526,6 +537,8 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
526
537
|
DPMSolverMultistepInverseScheduler,
|
527
538
|
DPMSolverMultistepScheduler,
|
528
539
|
DPMSolverSinglestepScheduler,
|
540
|
+
EDMDPMSolverMultistepScheduler,
|
541
|
+
EDMEulerScheduler,
|
529
542
|
EulerAncestralDiscreteScheduler,
|
530
543
|
EulerDiscreteScheduler,
|
531
544
|
HeunDiscreteScheduler,
|
@@ -539,6 +552,7 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
539
552
|
SASolverScheduler,
|
540
553
|
SchedulerMixin,
|
541
554
|
ScoreSdeVeScheduler,
|
555
|
+
TCDScheduler,
|
542
556
|
UnCLIPScheduler,
|
543
557
|
UniPCMultistepScheduler,
|
544
558
|
VQDiffusionScheduler,
|
@@ -611,6 +625,8 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
611
625
|
LatentConsistencyModelImg2ImgPipeline,
|
612
626
|
LatentConsistencyModelPipeline,
|
613
627
|
LDMTextToImagePipeline,
|
628
|
+
LEditsPPPipelineStableDiffusion,
|
629
|
+
LEditsPPPipelineStableDiffusionXL,
|
614
630
|
MusicLDMPipeline,
|
615
631
|
PaintByExamplePipeline,
|
616
632
|
PIAPipeline,
|
@@ -618,6 +634,9 @@ if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
|
|
618
634
|
SemanticStableDiffusionPipeline,
|
619
635
|
ShapEImg2ImgPipeline,
|
620
636
|
ShapEPipeline,
|
637
|
+
StableCascadeCombinedPipeline,
|
638
|
+
StableCascadeDecoderPipeline,
|
639
|
+
StableCascadePriorPipeline,
|
621
640
|
StableDiffusionAdapterPipeline,
|
622
641
|
StableDiffusionAttendAndExcitePipeline,
|
623
642
|
StableDiffusionControlNetImg2ImgPipeline,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
|
-
# Copyright
|
2
|
+
# Copyright 2024 The HuggingFace Team. All rights reserved.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# coding=utf-8
|
2
|
-
# Copyright
|
2
|
+
# Copyright 2024 The HuggingFace Inc. team.
|
3
3
|
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -127,7 +127,7 @@ class ConfigMixin:
|
|
127
127
|
"""The only reason we overwrite `getattr` here is to gracefully deprecate accessing
|
128
128
|
config attributes directly. See https://github.com/huggingface/diffusers/pull/3129
|
129
129
|
|
130
|
-
|
130
|
+
This function is mostly copied from PyTorch's __getattr__ overwrite:
|
131
131
|
https://pytorch.org/docs/stable/_modules/torch/nn/modules/module.html#Module
|
132
132
|
"""
|
133
133
|
|
@@ -259,6 +259,10 @@ class ConfigMixin:
|
|
259
259
|
model = cls(**init_dict)
|
260
260
|
|
261
261
|
# make sure to also save config parameters that might be used for compatible classes
|
262
|
+
# update _class_name
|
263
|
+
if "_class_name" in hidden_dict:
|
264
|
+
hidden_dict["_class_name"] = cls.__name__
|
265
|
+
|
262
266
|
model.register_to_config(**hidden_dict)
|
263
267
|
|
264
268
|
# add hidden kwargs of compatible classes to unused_kwargs
|
@@ -529,7 +533,7 @@ class ConfigMixin:
|
|
529
533
|
f"{cls.config_name} configuration file."
|
530
534
|
)
|
531
535
|
|
532
|
-
# 5. Give nice info if config attributes are
|
536
|
+
# 5. Give nice info if config attributes are initialized to default because they have not been passed
|
533
537
|
passed_keys = set(init_dict.keys())
|
534
538
|
if len(expected_keys - passed_keys) > 0:
|
535
539
|
logger.info(
|
@@ -38,8 +38,8 @@ deps = {
|
|
38
38
|
"regex": "regex!=2019.12.17",
|
39
39
|
"requests": "requests",
|
40
40
|
"tensorboard": "tensorboard",
|
41
|
-
"torch": "torch>=1.4
|
42
|
-
"torchvision": "torchvision
|
41
|
+
"torch": "torch>=1.4",
|
42
|
+
"torchvision": "torchvision",
|
43
43
|
"transformers": "transformers>=4.25.1",
|
44
44
|
"urllib3": "urllib3<=2.0.0",
|
45
45
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 The HuggingFace Team. All rights reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -12,12 +12,14 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
+
import math
|
15
16
|
import warnings
|
16
17
|
from typing import List, Optional, Tuple, Union
|
17
18
|
|
18
19
|
import numpy as np
|
19
20
|
import PIL.Image
|
20
21
|
import torch
|
22
|
+
import torch.nn.functional as F
|
21
23
|
from PIL import Image, ImageFilter, ImageOps
|
22
24
|
|
23
25
|
from .configuration_utils import ConfigMixin, register_to_config
|
@@ -330,7 +332,7 @@ class VaeImageProcessor(ConfigMixin):
|
|
330
332
|
image: Union[PIL.Image.Image, np.ndarray, torch.Tensor],
|
331
333
|
height: int,
|
332
334
|
width: int,
|
333
|
-
resize_mode: str = "default", # "
|
335
|
+
resize_mode: str = "default", # "default", "fill", "crop"
|
334
336
|
) -> Union[PIL.Image.Image, np.ndarray, torch.Tensor]:
|
335
337
|
"""
|
336
338
|
Resize image.
|
@@ -446,7 +448,7 @@ class VaeImageProcessor(ConfigMixin):
|
|
446
448
|
image: PipelineImageInput,
|
447
449
|
height: Optional[int] = None,
|
448
450
|
width: Optional[int] = None,
|
449
|
-
resize_mode: str = "default", # "
|
451
|
+
resize_mode: str = "default", # "default", "fill", "crop"
|
450
452
|
crops_coords: Optional[Tuple[int, int, int, int]] = None,
|
451
453
|
) -> torch.Tensor:
|
452
454
|
"""
|
@@ -477,7 +479,7 @@ class VaeImageProcessor(ConfigMixin):
|
|
477
479
|
if isinstance(image, torch.Tensor):
|
478
480
|
# if image is a pytorch tensor could have 2 possible shapes:
|
479
481
|
# 1. batch x height x width: we should insert the channel dimension at position 1
|
480
|
-
# 2.
|
482
|
+
# 2. channel x height x width: we should insert batch dimension at position 0,
|
481
483
|
# however, since both channel and batch dimension has same size 1, it is same to insert at position 1
|
482
484
|
# for simplicity, we insert a dimension of size 1 at position 1 for both cases
|
483
485
|
image = image.unsqueeze(1)
|
@@ -882,3 +884,107 @@ class VaeImageProcessorLDM3D(VaeImageProcessor):
|
|
882
884
|
depth = self.binarize(depth)
|
883
885
|
|
884
886
|
return rgb, depth
|
887
|
+
|
888
|
+
|
889
|
+
class IPAdapterMaskProcessor(VaeImageProcessor):
|
890
|
+
"""
|
891
|
+
Image processor for IP Adapter image masks.
|
892
|
+
|
893
|
+
Args:
|
894
|
+
do_resize (`bool`, *optional*, defaults to `True`):
|
895
|
+
Whether to downscale the image's (height, width) dimensions to multiples of `vae_scale_factor`.
|
896
|
+
vae_scale_factor (`int`, *optional*, defaults to `8`):
|
897
|
+
VAE scale factor. If `do_resize` is `True`, the image is automatically resized to multiples of this factor.
|
898
|
+
resample (`str`, *optional*, defaults to `lanczos`):
|
899
|
+
Resampling filter to use when resizing the image.
|
900
|
+
do_normalize (`bool`, *optional*, defaults to `False`):
|
901
|
+
Whether to normalize the image to [-1,1].
|
902
|
+
do_binarize (`bool`, *optional*, defaults to `True`):
|
903
|
+
Whether to binarize the image to 0/1.
|
904
|
+
do_convert_grayscale (`bool`, *optional*, defaults to be `True`):
|
905
|
+
Whether to convert the images to grayscale format.
|
906
|
+
|
907
|
+
"""
|
908
|
+
|
909
|
+
config_name = CONFIG_NAME
|
910
|
+
|
911
|
+
@register_to_config
|
912
|
+
def __init__(
|
913
|
+
self,
|
914
|
+
do_resize: bool = True,
|
915
|
+
vae_scale_factor: int = 8,
|
916
|
+
resample: str = "lanczos",
|
917
|
+
do_normalize: bool = False,
|
918
|
+
do_binarize: bool = True,
|
919
|
+
do_convert_grayscale: bool = True,
|
920
|
+
):
|
921
|
+
super().__init__(
|
922
|
+
do_resize=do_resize,
|
923
|
+
vae_scale_factor=vae_scale_factor,
|
924
|
+
resample=resample,
|
925
|
+
do_normalize=do_normalize,
|
926
|
+
do_binarize=do_binarize,
|
927
|
+
do_convert_grayscale=do_convert_grayscale,
|
928
|
+
)
|
929
|
+
|
930
|
+
@staticmethod
|
931
|
+
def downsample(mask: torch.FloatTensor, batch_size: int, num_queries: int, value_embed_dim: int):
|
932
|
+
"""
|
933
|
+
Downsamples the provided mask tensor to match the expected dimensions for scaled dot-product attention.
|
934
|
+
If the aspect ratio of the mask does not match the aspect ratio of the output image, a warning is issued.
|
935
|
+
|
936
|
+
Args:
|
937
|
+
mask (`torch.FloatTensor`):
|
938
|
+
The input mask tensor generated with `IPAdapterMaskProcessor.preprocess()`.
|
939
|
+
batch_size (`int`):
|
940
|
+
The batch size.
|
941
|
+
num_queries (`int`):
|
942
|
+
The number of queries.
|
943
|
+
value_embed_dim (`int`):
|
944
|
+
The dimensionality of the value embeddings.
|
945
|
+
|
946
|
+
Returns:
|
947
|
+
`torch.FloatTensor`:
|
948
|
+
The downsampled mask tensor.
|
949
|
+
|
950
|
+
"""
|
951
|
+
o_h = mask.shape[1]
|
952
|
+
o_w = mask.shape[2]
|
953
|
+
ratio = o_w / o_h
|
954
|
+
mask_h = int(math.sqrt(num_queries / ratio))
|
955
|
+
mask_h = int(mask_h) + int((num_queries % int(mask_h)) != 0)
|
956
|
+
mask_w = num_queries // mask_h
|
957
|
+
|
958
|
+
mask_downsample = F.interpolate(mask.unsqueeze(0), size=(mask_h, mask_w), mode="bicubic").squeeze(0)
|
959
|
+
|
960
|
+
# Repeat batch_size times
|
961
|
+
if mask_downsample.shape[0] < batch_size:
|
962
|
+
mask_downsample = mask_downsample.repeat(batch_size, 1, 1)
|
963
|
+
|
964
|
+
mask_downsample = mask_downsample.view(mask_downsample.shape[0], -1)
|
965
|
+
|
966
|
+
downsampled_area = mask_h * mask_w
|
967
|
+
# If the output image and the mask do not have the same aspect ratio, tensor shapes will not match
|
968
|
+
# Pad tensor if downsampled_mask.shape[1] is smaller than num_queries
|
969
|
+
if downsampled_area < num_queries:
|
970
|
+
warnings.warn(
|
971
|
+
"The aspect ratio of the mask does not match the aspect ratio of the output image. "
|
972
|
+
"Please update your masks or adjust the output size for optimal performance.",
|
973
|
+
UserWarning,
|
974
|
+
)
|
975
|
+
mask_downsample = F.pad(mask_downsample, (0, num_queries - mask_downsample.shape[1]), value=0.0)
|
976
|
+
# Discard last embeddings if downsampled_mask.shape[1] is bigger than num_queries
|
977
|
+
if downsampled_area > num_queries:
|
978
|
+
warnings.warn(
|
979
|
+
"The aspect ratio of the mask does not match the aspect ratio of the output image. "
|
980
|
+
"Please update your masks or adjust the output size for optimal performance.",
|
981
|
+
UserWarning,
|
982
|
+
)
|
983
|
+
mask_downsample = mask_downsample[:, :num_queries]
|
984
|
+
|
985
|
+
# Repeat last dimension to match SDPA output shape
|
986
|
+
mask_downsample = mask_downsample.view(mask_downsample.shape[0], mask_downsample.shape[1], 1).repeat(
|
987
|
+
1, 1, value_embed_dim
|
988
|
+
)
|
989
|
+
|
990
|
+
return mask_downsample
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 The HuggingFace Team. All rights reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -75,10 +75,6 @@ class FromOriginalVAEMixin:
|
|
75
75
|
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: `z
|
76
76
|
= 1 / scaling_factor * z`. For more details, refer to sections 4.3.2 and D.1 of the [High-Resolution
|
77
77
|
Image Synthesis with Latent Diffusion Models](https://arxiv.org/abs/2112.10752) paper.
|
78
|
-
use_safetensors (`bool`, *optional*, defaults to `None`):
|
79
|
-
If set to `None`, the safetensors weights are downloaded if they're available **and** if the
|
80
|
-
safetensors library is installed. If set to `True`, the model is forcibly loaded from safetensors
|
81
|
-
weights. If set to `False`, safetensors weights are not loaded.
|
82
78
|
kwargs (remaining dictionary of keyword arguments, *optional*):
|
83
79
|
Can be used to overwrite load and saveable variables (for example the pipeline components of the
|
84
80
|
specific pipeline class). The overwritten components are directly passed to the pipelines `__init__`
|
@@ -111,7 +107,6 @@ class FromOriginalVAEMixin:
|
|
111
107
|
local_files_only = kwargs.pop("local_files_only", None)
|
112
108
|
revision = kwargs.pop("revision", None)
|
113
109
|
torch_dtype = kwargs.pop("torch_dtype", None)
|
114
|
-
use_safetensors = kwargs.pop("use_safetensors", True)
|
115
110
|
|
116
111
|
class_name = cls.__name__
|
117
112
|
|
@@ -131,14 +126,18 @@ class FromOriginalVAEMixin:
|
|
131
126
|
token=token,
|
132
127
|
revision=revision,
|
133
128
|
local_files_only=local_files_only,
|
134
|
-
use_safetensors=use_safetensors,
|
135
129
|
cache_dir=cache_dir,
|
136
130
|
)
|
137
131
|
|
138
132
|
image_size = kwargs.pop("image_size", None)
|
139
133
|
scaling_factor = kwargs.pop("scaling_factor", None)
|
140
134
|
component = create_diffusers_vae_model_from_ldm(
|
141
|
-
class_name,
|
135
|
+
class_name,
|
136
|
+
original_config,
|
137
|
+
checkpoint,
|
138
|
+
image_size=image_size,
|
139
|
+
scaling_factor=scaling_factor,
|
140
|
+
torch_dtype=torch_dtype,
|
142
141
|
)
|
143
142
|
vae = component["vae"]
|
144
143
|
if torch_dtype is not None:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 The HuggingFace Team. All rights reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -38,6 +38,9 @@ class FromOriginalControlNetMixin:
|
|
38
38
|
- A link to the `.ckpt` file (for example
|
39
39
|
`"https://huggingface.co/<repo_id>/blob/main/<path_to_file>.ckpt"`) on the Hub.
|
40
40
|
- A path to a *file* containing all pipeline weights.
|
41
|
+
config_file (`str`, *optional*):
|
42
|
+
Filepath to the configuration YAML file associated with the model. If not provided it will default to:
|
43
|
+
https://raw.githubusercontent.com/lllyasviel/ControlNet/main/models/cldm_v15.yaml
|
41
44
|
torch_dtype (`str` or `torch.dtype`, *optional*):
|
42
45
|
Override the default `torch.dtype` and load the model with another dtype. If `"auto"` is passed, the
|
43
46
|
dtype is automatically derived from the model's weights.
|
@@ -62,10 +65,6 @@ class FromOriginalControlNetMixin:
|
|
62
65
|
revision (`str`, *optional*, defaults to `"main"`):
|
63
66
|
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
|
64
67
|
allowed by Git.
|
65
|
-
use_safetensors (`bool`, *optional*, defaults to `None`):
|
66
|
-
If set to `None`, the safetensors weights are downloaded if they're available **and** if the
|
67
|
-
safetensors library is installed. If set to `True`, the model is forcibly loaded from safetensors
|
68
|
-
weights. If set to `False`, safetensors weights are not loaded.
|
69
68
|
image_size (`int`, *optional*, defaults to 512):
|
70
69
|
The image size the model was trained on. Use 512 for all Stable Diffusion v1 models and the Stable
|
71
70
|
Diffusion v2 base model. Use 768 for Stable Diffusion v2.
|
@@ -89,6 +88,7 @@ class FromOriginalControlNetMixin:
|
|
89
88
|
```
|
90
89
|
"""
|
91
90
|
original_config_file = kwargs.pop("original_config_file", None)
|
91
|
+
config_file = kwargs.pop("config_file", None)
|
92
92
|
resume_download = kwargs.pop("resume_download", False)
|
93
93
|
force_download = kwargs.pop("force_download", False)
|
94
94
|
proxies = kwargs.pop("proxies", None)
|
@@ -97,9 +97,14 @@ class FromOriginalControlNetMixin:
|
|
97
97
|
local_files_only = kwargs.pop("local_files_only", None)
|
98
98
|
revision = kwargs.pop("revision", None)
|
99
99
|
torch_dtype = kwargs.pop("torch_dtype", None)
|
100
|
-
use_safetensors = kwargs.pop("use_safetensors", True)
|
101
100
|
|
102
101
|
class_name = cls.__name__
|
102
|
+
if (config_file is not None) and (original_config_file is not None):
|
103
|
+
raise ValueError(
|
104
|
+
"You cannot pass both `config_file` and `original_config_file` to `from_single_file`. Please use only one of these arguments."
|
105
|
+
)
|
106
|
+
|
107
|
+
original_config_file = config_file or original_config_file
|
103
108
|
original_config, checkpoint = fetch_ldm_config_and_checkpoint(
|
104
109
|
pretrained_model_link_or_path=pretrained_model_link_or_path,
|
105
110
|
class_name=class_name,
|
@@ -110,7 +115,6 @@ class FromOriginalControlNetMixin:
|
|
110
115
|
token=token,
|
111
116
|
revision=revision,
|
112
117
|
local_files_only=local_files_only,
|
113
|
-
use_safetensors=use_safetensors,
|
114
118
|
cache_dir=cache_dir,
|
115
119
|
)
|
116
120
|
|
@@ -118,7 +122,12 @@ class FromOriginalControlNetMixin:
|
|
118
122
|
image_size = kwargs.pop("image_size", None)
|
119
123
|
|
120
124
|
component = create_diffusers_controlnet_model_from_ldm(
|
121
|
-
class_name,
|
125
|
+
class_name,
|
126
|
+
original_config,
|
127
|
+
checkpoint,
|
128
|
+
upcast_attention=upcast_attention,
|
129
|
+
image_size=image_size,
|
130
|
+
torch_dtype=torch_dtype,
|
122
131
|
)
|
123
132
|
controlnet = component["controlnet"]
|
124
133
|
if torch_dtype is not None:
|