diffusers 0.19.3__tar.gz → 0.20.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- diffusers-0.20.1/PKG-INFO +259 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/README.md +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/setup.py +2 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/__init__.py +3 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/commands/fp16_safetensors.py +2 -7
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/configuration_utils.py +23 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/dependency_versions_table.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/loaders.py +62 -64
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/__init__.py +1 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/activations.py +2 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/attention.py +45 -1
- diffusers-0.20.1/src/diffusers/models/autoencoder_tiny.py +193 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/controlnet.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/embeddings.py +56 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/lora.py +0 -6
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/modeling_flax_utils.py +28 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/modeling_utils.py +33 -16
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/transformer_2d.py +26 -9
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_1d.py +2 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_2d_blocks.py +106 -56
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_2d_condition.py +20 -5
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/vae.py +106 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/__init__.py +1 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/audioldm/pipeline_audioldm.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/auto_pipeline.py +33 -43
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/controlnet/multicontrolnet.py +4 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/controlnet/pipeline_controlnet.py +20 -4
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py +15 -7
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py +14 -4
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py +157 -10
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/controlnet/pipeline_flax_controlnet.py +2 -10
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_combined.py +43 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py +44 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet_img2img.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_img2img.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/pipeline_flax_utils.py +41 -4
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/pipeline_utils.py +60 -16
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/semantic_stable_diffusion/pipeline_semantic_stable_diffusion.py +2 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/__init__.py +1 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py +81 -37
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_diffedit.py +12 -5
- diffusers-0.20.1/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_gligen.py +832 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint_legacy.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py +9 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py +17 -8
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_model_editing.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_panorama.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_paradigms.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_pix2pix_zero.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_sag.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py +3 -5
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py +75 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py +76 -6
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py +1 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py +10 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py +11 -4
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py +1 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/versatile_diffusion/modeling_text_unet.py +131 -28
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_consistency_models.py +70 -57
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ddim.py +76 -71
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ddim_inverse.py +76 -44
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ddim_parallel.py +11 -8
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ddpm.py +68 -67
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ddpm_parallel.py +18 -15
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_deis_multistep.py +93 -85
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py +118 -120
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py +116 -109
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_dpmsolver_sde.py +57 -43
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py +122 -121
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_euler_ancestral_discrete.py +54 -44
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_euler_discrete.py +63 -56
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_heun_discrete.py +57 -45
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ipndm.py +27 -22
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py +54 -41
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_k_dpm_2_discrete.py +52 -41
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_karras_ve.py +55 -45
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_lms_discrete.py +58 -52
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_pndm.py +77 -62
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_repaint.py +56 -38
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_sde_ve.py +62 -50
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_sde_vp.py +32 -11
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_unclip.py +3 -3
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_unipc_multistep.py +131 -91
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_utils.py +41 -35
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_utils_flax.py +8 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_vq_diffusion.py +39 -68
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/__init__.py +2 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_pt_objects.py +15 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_torch_and_transformers_objects.py +15 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/hub_utils.py +105 -2
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/import_utils.py +0 -4
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/pil_utils.py +19 -0
- diffusers-0.20.1/src/diffusers.egg-info/PKG-INFO +259 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers.egg-info/SOURCES.txt +2 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers.egg-info/entry_points.txt +0 -1
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers.egg-info/requires.txt +2 -6
- diffusers-0.19.3/PKG-INFO +0 -259
- diffusers-0.19.3/src/diffusers/models/cross_attention.py +0 -94
- diffusers-0.19.3/src/diffusers.egg-info/PKG-INFO +0 -259
- {diffusers-0.19.3 → diffusers-0.20.1}/LICENSE +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/MANIFEST.in +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/pyproject.toml +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/setup.cfg +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/commands/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/commands/diffusers_cli.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/commands/env.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/dependency_versions_check.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/experimental/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/experimental/rl/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/experimental/rl/value_guided_sampling.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/image_processor.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/adapter.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/attention_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/attention_processor.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/autoencoder_asym_kl.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/autoencoder_kl.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/controlnet_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/dual_transformer_2d.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/embeddings_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/modeling_flax_pytorch_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/modeling_pytorch_flax_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/prior_transformer.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/resnet.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/resnet_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/t5_film_transformer.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/transformer_temporal.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_1d_blocks.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_2d.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_2d_blocks_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_2d_condition_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_3d_blocks.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/unet_3d_condition.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/vae_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/models/vq_model.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/optimization.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipeline_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/alt_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/alt_diffusion/modeling_roberta_series.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/audio_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/audio_diffusion/mel.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/audio_diffusion/pipeline_audio_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/audioldm/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/consistency_models/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/controlnet/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/dance_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/ddim/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/ddim/pipeline_ddim.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/ddpm/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/ddpm/pipeline_ddpm.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/safety_checker.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/timesteps.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/deepfloyd_if/watermark.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/dit/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/dit/pipeline_dit.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_img2img.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_inpaint.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_prior.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky/text_encoder.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior_emb2emb.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/latent_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/latent_diffusion_uncond/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/latent_diffusion_uncond/pipeline_latent_diffusion_uncond.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/onnx_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/paint_by_example/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/paint_by_example/image_encoder.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/pndm/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/pndm/pipeline_pndm.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/repaint/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/repaint/pipeline_repaint.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/score_sde_ve/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/score_sde_ve/pipeline_score_sde_ve.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/semantic_stable_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/shap_e/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/shap_e/camera.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/shap_e/pipeline_shap_e.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/shap_e/renderer.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/spectrogram_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/spectrogram_diffusion/continous_encoder.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/spectrogram_diffusion/midi_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/spectrogram_diffusion/notes_encoder.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/spectrogram_diffusion/pipeline_spectrogram_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_controlnet.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_img2img.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion_inpaint.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint_legacy.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/safety_checker.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/safety_checker_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion/stable_unclip_image_normalizer.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_safe/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_safe/safety_checker.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_xl/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stable_diffusion_xl/watermark.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stochastic_karras_ve/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/stochastic_karras_ve/pipeline_stochastic_karras_ve.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/t2i_adapter/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/text_to_video_synthesis/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unclip/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unclip/pipeline_unclip.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unclip/text_proj.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unidiffuser/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unidiffuser/modeling_text_decoder.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unidiffuser/modeling_uvit.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/unidiffuser/pipeline_unidiffuser.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/versatile_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/vq_diffusion/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/pipelines/vq_diffusion/pipeline_vq_diffusion.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/__init__.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ddim_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_ddpm_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_dpmsolver_multistep_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_karras_ve_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_lms_discrete_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_pndm_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/schedulers/scheduling_sde_ve_flax.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/training_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/accelerate_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/constants.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/deprecation_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/doc_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_flax_and_transformers_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_flax_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_note_seq_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_onnx_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_torch_and_librosa_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_torch_and_scipy_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_torch_and_torchsde_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_torch_and_transformers_and_k_diffusion_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_torch_and_transformers_and_onnx_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dummy_transformers_and_torch_and_note_seq_objects.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/dynamic_modules_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/logging.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/model_card_template.md +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/outputs.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/testing_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers/utils/torch_utils.py +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers.egg-info/dependency_links.txt +0 -0
- {diffusers-0.19.3 → diffusers-0.20.1}/src/diffusers.egg-info/top_level.txt +0 -0
@@ -0,0 +1,259 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: diffusers
|
3
|
+
Version: 0.20.1
|
4
|
+
Summary: Diffusers
|
5
|
+
Home-page: https://github.com/huggingface/diffusers
|
6
|
+
Author: The HuggingFace team
|
7
|
+
Author-email: patrick@huggingface.co
|
8
|
+
License: Apache
|
9
|
+
Keywords: deep learning
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
11
|
+
Classifier: Intended Audience :: Developers
|
12
|
+
Classifier: Intended Audience :: Education
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
15
|
+
Classifier: Operating System :: OS Independent
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
21
|
+
Requires-Python: >=3.7.0
|
22
|
+
Description-Content-Type: text/markdown
|
23
|
+
Provides-Extra: quality
|
24
|
+
Provides-Extra: docs
|
25
|
+
Provides-Extra: training
|
26
|
+
Provides-Extra: test
|
27
|
+
Provides-Extra: torch
|
28
|
+
Provides-Extra: flax
|
29
|
+
Provides-Extra: dev
|
30
|
+
License-File: LICENSE
|
31
|
+
|
32
|
+
<p align="center">
|
33
|
+
<br>
|
34
|
+
<img src="https://raw.githubusercontent.com/huggingface/diffusers/main/docs/source/en/imgs/diffusers_library.jpg" width="400"/>
|
35
|
+
<br>
|
36
|
+
<p>
|
37
|
+
<p align="center">
|
38
|
+
<a href="https://github.com/huggingface/diffusers/blob/main/LICENSE">
|
39
|
+
<img alt="GitHub" src="https://img.shields.io/github/license/huggingface/datasets.svg?color=blue">
|
40
|
+
</a>
|
41
|
+
<a href="https://github.com/huggingface/diffusers/releases">
|
42
|
+
<img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/diffusers.svg">
|
43
|
+
</a>
|
44
|
+
<a href="CODE_OF_CONDUCT.md">
|
45
|
+
<img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg">
|
46
|
+
</a>
|
47
|
+
</p>
|
48
|
+
|
49
|
+
🤗 Diffusers is the go-to library for state-of-the-art pretrained diffusion models for generating images, audio, and even 3D structures of molecules. Whether you're looking for a simple inference solution or training your own diffusion models, 🤗 Diffusers is a modular toolbox that supports both. Our library is designed with a focus on [usability over performance](https://huggingface.co/docs/diffusers/conceptual/philosophy#usability-over-performance), [simple over easy](https://huggingface.co/docs/diffusers/conceptual/philosophy#simple-over-easy), and [customizability over abstractions](https://huggingface.co/docs/diffusers/conceptual/philosophy#tweakable-contributorfriendly-over-abstraction).
|
50
|
+
|
51
|
+
🤗 Diffusers offers three core components:
|
52
|
+
|
53
|
+
- State-of-the-art [diffusion pipelines](https://huggingface.co/docs/diffusers/api/pipelines/overview) that can be run in inference with just a few lines of code.
|
54
|
+
- Interchangeable noise [schedulers](https://huggingface.co/docs/diffusers/api/schedulers/overview) for different diffusion speeds and output quality.
|
55
|
+
- Pretrained [models](https://huggingface.co/docs/diffusers/api/models) that can be used as building blocks, and combined with schedulers, for creating your own end-to-end diffusion systems.
|
56
|
+
|
57
|
+
## Installation
|
58
|
+
|
59
|
+
We recommend installing 🤗 Diffusers in a virtual environment from PyPi or Conda. For more details about installing [PyTorch](https://pytorch.org/get-started/locally/) and [Flax](https://flax.readthedocs.io/en/latest/#installation), please refer to their official documentation.
|
60
|
+
|
61
|
+
### PyTorch
|
62
|
+
|
63
|
+
With `pip` (official package):
|
64
|
+
|
65
|
+
```bash
|
66
|
+
pip install --upgrade diffusers[torch]
|
67
|
+
```
|
68
|
+
|
69
|
+
With `conda` (maintained by the community):
|
70
|
+
|
71
|
+
```sh
|
72
|
+
conda install -c conda-forge diffusers
|
73
|
+
```
|
74
|
+
|
75
|
+
### Flax
|
76
|
+
|
77
|
+
With `pip` (official package):
|
78
|
+
|
79
|
+
```bash
|
80
|
+
pip install --upgrade diffusers[flax]
|
81
|
+
```
|
82
|
+
|
83
|
+
### Apple Silicon (M1/M2) support
|
84
|
+
|
85
|
+
Please refer to the [How to use Stable Diffusion in Apple Silicon](https://huggingface.co/docs/diffusers/optimization/mps) guide.
|
86
|
+
|
87
|
+
## Quickstart
|
88
|
+
|
89
|
+
Generating outputs is super easy with 🤗 Diffusers. To generate an image from text, use the `from_pretrained` method to load any pretrained diffusion model (browse the [Hub](https://huggingface.co/models?library=diffusers&sort=downloads) for 4000+ checkpoints):
|
90
|
+
|
91
|
+
```python
|
92
|
+
from diffusers import DiffusionPipeline
|
93
|
+
import torch
|
94
|
+
|
95
|
+
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
|
96
|
+
pipeline.to("cuda")
|
97
|
+
pipeline("An image of a squirrel in Picasso style").images[0]
|
98
|
+
```
|
99
|
+
|
100
|
+
You can also dig into the models and schedulers toolbox to build your own diffusion system:
|
101
|
+
|
102
|
+
```python
|
103
|
+
from diffusers import DDPMScheduler, UNet2DModel
|
104
|
+
from PIL import Image
|
105
|
+
import torch
|
106
|
+
import numpy as np
|
107
|
+
|
108
|
+
scheduler = DDPMScheduler.from_pretrained("google/ddpm-cat-256")
|
109
|
+
model = UNet2DModel.from_pretrained("google/ddpm-cat-256").to("cuda")
|
110
|
+
scheduler.set_timesteps(50)
|
111
|
+
|
112
|
+
sample_size = model.config.sample_size
|
113
|
+
noise = torch.randn((1, 3, sample_size, sample_size)).to("cuda")
|
114
|
+
input = noise
|
115
|
+
|
116
|
+
for t in scheduler.timesteps:
|
117
|
+
with torch.no_grad():
|
118
|
+
noisy_residual = model(input, t).sample
|
119
|
+
prev_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample
|
120
|
+
input = prev_noisy_sample
|
121
|
+
|
122
|
+
image = (input / 2 + 0.5).clamp(0, 1)
|
123
|
+
image = image.cpu().permute(0, 2, 3, 1).numpy()[0]
|
124
|
+
image = Image.fromarray((image * 255).round().astype("uint8"))
|
125
|
+
image
|
126
|
+
```
|
127
|
+
|
128
|
+
Check out the [Quickstart](https://huggingface.co/docs/diffusers/quicktour) to launch your diffusion journey today!
|
129
|
+
|
130
|
+
## How to navigate the documentation
|
131
|
+
|
132
|
+
| **Documentation** | **What can I learn?** |
|
133
|
+
|---------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
134
|
+
| [Tutorial](https://huggingface.co/docs/diffusers/tutorials/tutorial_overview) | A basic crash course for learning how to use the library's most important features like using models and schedulers to build your own diffusion system, and training your own diffusion model. |
|
135
|
+
| [Loading](https://huggingface.co/docs/diffusers/using-diffusers/loading_overview) | Guides for how to load and configure all the components (pipelines, models, and schedulers) of the library, as well as how to use different schedulers. |
|
136
|
+
| [Pipelines for inference](https://huggingface.co/docs/diffusers/using-diffusers/pipeline_overview) | Guides for how to use pipelines for different inference tasks, batched generation, controlling generated outputs and randomness, and how to contribute a pipeline to the library. |
|
137
|
+
| [Optimization](https://huggingface.co/docs/diffusers/optimization/opt_overview) | Guides for how to optimize your diffusion model to run faster and consume less memory. |
|
138
|
+
| [Training](https://huggingface.co/docs/diffusers/training/overview) | Guides for how to train a diffusion model for different tasks with different training techniques. |
|
139
|
+
## Contribution
|
140
|
+
|
141
|
+
We ❤️ contributions from the open-source community!
|
142
|
+
If you want to contribute to this library, please check out our [Contribution guide](https://github.com/huggingface/diffusers/blob/main/CONTRIBUTING.md).
|
143
|
+
You can look out for [issues](https://github.com/huggingface/diffusers/issues) you'd like to tackle to contribute to the library.
|
144
|
+
- See [Good first issues](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) for general opportunities to contribute
|
145
|
+
- See [New model/pipeline](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+pipeline%2Fmodel%22) to contribute exciting new diffusion models / diffusion pipelines
|
146
|
+
- See [New scheduler](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+scheduler%22)
|
147
|
+
|
148
|
+
Also, say 👋 in our public Discord channel <a href="https://discord.gg/G7tWnz98XR"><img alt="Join us on Discord" src="https://img.shields.io/discord/823813159592001537?color=5865F2&logo=discord&logoColor=white"></a>. We discuss the hottest trends about diffusion models, help each other with contributions, personal projects or
|
149
|
+
just hang out ☕.
|
150
|
+
|
151
|
+
|
152
|
+
## Popular Tasks & Pipelines
|
153
|
+
|
154
|
+
<table>
|
155
|
+
<tr>
|
156
|
+
<th>Task</th>
|
157
|
+
<th>Pipeline</th>
|
158
|
+
<th>🤗 Hub</th>
|
159
|
+
</tr>
|
160
|
+
<tr style="border-top: 2px solid black">
|
161
|
+
<td>Unconditional Image Generation</td>
|
162
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/ddpm"> DDPM </a></td>
|
163
|
+
<td><a href="https://huggingface.co/google/ddpm-ema-church-256"> google/ddpm-ema-church-256 </a></td>
|
164
|
+
</tr>
|
165
|
+
<tr style="border-top: 2px solid black">
|
166
|
+
<td>Text-to-Image</td>
|
167
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/text2img">Stable Diffusion Text-to-Image</a></td>
|
168
|
+
<td><a href="https://huggingface.co/runwayml/stable-diffusion-v1-5"> runwayml/stable-diffusion-v1-5 </a></td>
|
169
|
+
</tr>
|
170
|
+
<tr>
|
171
|
+
<td>Text-to-Image</td>
|
172
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/unclip">unclip</a></td>
|
173
|
+
<td><a href="https://huggingface.co/kakaobrain/karlo-v1-alpha"> kakaobrain/karlo-v1-alpha </a></td>
|
174
|
+
</tr>
|
175
|
+
<tr>
|
176
|
+
<td>Text-to-Image</td>
|
177
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/if">DeepFloyd IF</a></td>
|
178
|
+
<td><a href="https://huggingface.co/DeepFloyd/IF-I-XL-v1.0"> DeepFloyd/IF-I-XL-v1.0 </a></td>
|
179
|
+
</tr>
|
180
|
+
<tr>
|
181
|
+
<td>Text-to-Image</td>
|
182
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/kandinsky">Kandinsky</a></td>
|
183
|
+
<td><a href="https://huggingface.co/kandinsky-community/kandinsky-2-2-decoder"> kandinsky-community/kandinsky-2-2-decoder </a></td>
|
184
|
+
</tr>
|
185
|
+
<tr style="border-top: 2px solid black">
|
186
|
+
<td>Text-guided Image-to-Image</td>
|
187
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/controlnet">Controlnet</a></td>
|
188
|
+
<td><a href="https://huggingface.co/lllyasviel/sd-controlnet-canny"> lllyasviel/sd-controlnet-canny </a></td>
|
189
|
+
</tr>
|
190
|
+
<tr>
|
191
|
+
<td>Text-guided Image-to-Image</td>
|
192
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/pix2pix">Instruct Pix2Pix</a></td>
|
193
|
+
<td><a href="https://huggingface.co/timbrooks/instruct-pix2pix"> timbrooks/instruct-pix2pix </a></td>
|
194
|
+
</tr>
|
195
|
+
<tr>
|
196
|
+
<td>Text-guided Image-to-Image</td>
|
197
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/img2img">Stable Diffusion Image-to-Image</a></td>
|
198
|
+
<td><a href="https://huggingface.co/runwayml/stable-diffusion-v1-5"> runwayml/stable-diffusion-v1-5 </a></td>
|
199
|
+
</tr>
|
200
|
+
<tr style="border-top: 2px solid black">
|
201
|
+
<td>Text-guided Image Inpainting</td>
|
202
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/inpaint">Stable Diffusion Inpaint</a></td>
|
203
|
+
<td><a href="https://huggingface.co/runwayml/stable-diffusion-inpainting"> runwayml/stable-diffusion-inpainting </a></td>
|
204
|
+
</tr>
|
205
|
+
<tr style="border-top: 2px solid black">
|
206
|
+
<td>Image Variation</td>
|
207
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/image_variation">Stable Diffusion Image Variation</a></td>
|
208
|
+
<td><a href="https://huggingface.co/lambdalabs/sd-image-variations-diffusers"> lambdalabs/sd-image-variations-diffusers </a></td>
|
209
|
+
</tr>
|
210
|
+
<tr style="border-top: 2px solid black">
|
211
|
+
<td>Super Resolution</td>
|
212
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/upscale">Stable Diffusion Upscale</a></td>
|
213
|
+
<td><a href="https://huggingface.co/stabilityai/stable-diffusion-x4-upscaler"> stabilityai/stable-diffusion-x4-upscaler </a></td>
|
214
|
+
</tr>
|
215
|
+
<tr>
|
216
|
+
<td>Super Resolution</td>
|
217
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/latent_upscale">Stable Diffusion Latent Upscale</a></td>
|
218
|
+
<td><a href="https://huggingface.co/stabilityai/sd-x2-latent-upscaler"> stabilityai/sd-x2-latent-upscaler </a></td>
|
219
|
+
</tr>
|
220
|
+
</table>
|
221
|
+
|
222
|
+
## Popular libraries using 🧨 Diffusers
|
223
|
+
|
224
|
+
- https://github.com/microsoft/TaskMatrix
|
225
|
+
- https://github.com/invoke-ai/InvokeAI
|
226
|
+
- https://github.com/apple/ml-stable-diffusion
|
227
|
+
- https://github.com/Sanster/lama-cleaner
|
228
|
+
- https://github.com/IDEA-Research/Grounded-Segment-Anything
|
229
|
+
- https://github.com/ashawkey/stable-dreamfusion
|
230
|
+
- https://github.com/deep-floyd/IF
|
231
|
+
- https://github.com/bentoml/BentoML
|
232
|
+
- https://github.com/bmaltais/kohya_ss
|
233
|
+
- +3000 other amazing GitHub repositories 💪
|
234
|
+
|
235
|
+
Thank you for using us ❤️
|
236
|
+
|
237
|
+
## Credits
|
238
|
+
|
239
|
+
This library concretizes previous work by many different authors and would not have been possible without their great research and implementations. We'd like to thank, in particular, the following implementations which have helped us in our development and without which the API could not have been as polished today:
|
240
|
+
|
241
|
+
- @CompVis' latent diffusion models library, available [here](https://github.com/CompVis/latent-diffusion)
|
242
|
+
- @hojonathanho original DDPM implementation, available [here](https://github.com/hojonathanho/diffusion) as well as the extremely useful translation into PyTorch by @pesser, available [here](https://github.com/pesser/pytorch_diffusion)
|
243
|
+
- @ermongroup's DDIM implementation, available [here](https://github.com/ermongroup/ddim)
|
244
|
+
- @yang-song's Score-VE and Score-VP implementations, available [here](https://github.com/yang-song/score_sde_pytorch)
|
245
|
+
|
246
|
+
We also want to thank @heejkoo for the very helpful overview of papers, code and resources on diffusion models, available [here](https://github.com/heejkoo/Awesome-Diffusion-Models) as well as @crowsonkb and @rromb for useful discussions and insights.
|
247
|
+
|
248
|
+
## Citation
|
249
|
+
|
250
|
+
```bibtex
|
251
|
+
@misc{von-platen-etal-2022-diffusers,
|
252
|
+
author = {Patrick von Platen and Suraj Patil and Anton Lozhkov and Pedro Cuenca and Nathan Lambert and Kashif Rasul and Mishig Davaadorj and Thomas Wolf},
|
253
|
+
title = {Diffusers: State-of-the-art diffusion models},
|
254
|
+
year = {2022},
|
255
|
+
publisher = {GitHub},
|
256
|
+
journal = {GitHub repository},
|
257
|
+
howpublished = {\url{https://github.com/huggingface/diffusers}}
|
258
|
+
}
|
259
|
+
```
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<p align="center">
|
2
2
|
<br>
|
3
|
-
<img src="https://
|
3
|
+
<img src="https://raw.githubusercontent.com/huggingface/diffusers/main/docs/source/en/imgs/diffusers_library.jpg" width="400"/>
|
4
4
|
<br>
|
5
5
|
<p>
|
6
6
|
<p align="center">
|
@@ -105,7 +105,7 @@ _deps = [
|
|
105
105
|
"pytest",
|
106
106
|
"pytest-timeout",
|
107
107
|
"pytest-xdist",
|
108
|
-
"ruff
|
108
|
+
"ruff==0.0.280",
|
109
109
|
"safetensors>=0.3.1",
|
110
110
|
"sentencepiece>=0.1.91,!=0.1.92",
|
111
111
|
"scipy",
|
@@ -233,7 +233,7 @@ install_requires = [
|
|
233
233
|
|
234
234
|
setup(
|
235
235
|
name="diffusers",
|
236
|
-
version="0.
|
236
|
+
version="0.20.1", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
|
237
237
|
description="Diffusers",
|
238
238
|
long_description=open("README.md", "r", encoding="utf-8").read(),
|
239
239
|
long_description_content_type="text/markdown",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "0.
|
1
|
+
__version__ = "0.20.1"
|
2
2
|
|
3
3
|
from .configuration_utils import ConfigMixin
|
4
4
|
from .utils import (
|
@@ -38,6 +38,7 @@ else:
|
|
38
38
|
from .models import (
|
39
39
|
AsymmetricAutoencoderKL,
|
40
40
|
AutoencoderKL,
|
41
|
+
AutoencoderTiny,
|
41
42
|
ControlNetModel,
|
42
43
|
ModelMixin,
|
43
44
|
MultiAdapter,
|
@@ -170,6 +171,7 @@ else:
|
|
170
171
|
StableDiffusionControlNetPipeline,
|
171
172
|
StableDiffusionDepth2ImgPipeline,
|
172
173
|
StableDiffusionDiffEditPipeline,
|
174
|
+
StableDiffusionGLIGENPipeline,
|
173
175
|
StableDiffusionImageVariationPipeline,
|
174
176
|
StableDiffusionImg2ImgPipeline,
|
175
177
|
StableDiffusionInpaintPipeline,
|
@@ -27,7 +27,7 @@ import torch
|
|
27
27
|
from huggingface_hub import hf_hub_download
|
28
28
|
from packaging import version
|
29
29
|
|
30
|
-
from ..utils import
|
30
|
+
from ..utils import logging
|
31
31
|
from . import BaseDiffusersCLICommand
|
32
32
|
|
33
33
|
|
@@ -68,12 +68,7 @@ class FP16SafetensorsCommand(BaseDiffusersCLICommand):
|
|
68
68
|
self.local_ckpt_dir = f"/tmp/{ckpt_id}"
|
69
69
|
self.fp16 = fp16
|
70
70
|
|
71
|
-
|
72
|
-
self.use_safetensors = use_safetensors
|
73
|
-
else:
|
74
|
-
raise ImportError(
|
75
|
-
"When `use_safetensors` is set to True, the `safetensors` library needs to be installed. Install it via `pip install safetensors`."
|
76
|
-
)
|
71
|
+
self.use_safetensors = use_safetensors
|
77
72
|
|
78
73
|
if not self.use_safetensors and not self.fp16:
|
79
74
|
raise NotImplementedError(
|
@@ -26,7 +26,7 @@ from pathlib import PosixPath
|
|
26
26
|
from typing import Any, Dict, Tuple, Union
|
27
27
|
|
28
28
|
import numpy as np
|
29
|
-
from huggingface_hub import hf_hub_download
|
29
|
+
from huggingface_hub import create_repo, hf_hub_download
|
30
30
|
from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError, RevisionNotFoundError
|
31
31
|
from requests import HTTPError
|
32
32
|
|
@@ -144,6 +144,12 @@ class ConfigMixin:
|
|
144
144
|
Args:
|
145
145
|
save_directory (`str` or `os.PathLike`):
|
146
146
|
Directory where the configuration JSON file is saved (will be created if it does not exist).
|
147
|
+
push_to_hub (`bool`, *optional*, defaults to `False`):
|
148
|
+
Whether or not to push your model to the Hugging Face Hub after saving it. You can specify the
|
149
|
+
repository you want to push to with `repo_id` (will default to the name of `save_directory` in your
|
150
|
+
namespace).
|
151
|
+
kwargs (`Dict[str, Any]`, *optional*):
|
152
|
+
Additional keyword arguments passed along to the [`~utils.PushToHubMixin.push_to_hub`] method.
|
147
153
|
"""
|
148
154
|
if os.path.isfile(save_directory):
|
149
155
|
raise AssertionError(f"Provided path ({save_directory}) should be a directory, not a file")
|
@@ -156,6 +162,22 @@ class ConfigMixin:
|
|
156
162
|
self.to_json_file(output_config_file)
|
157
163
|
logger.info(f"Configuration saved in {output_config_file}")
|
158
164
|
|
165
|
+
if push_to_hub:
|
166
|
+
commit_message = kwargs.pop("commit_message", None)
|
167
|
+
private = kwargs.pop("private", False)
|
168
|
+
create_pr = kwargs.pop("create_pr", False)
|
169
|
+
token = kwargs.pop("token", None)
|
170
|
+
repo_id = kwargs.pop("repo_id", save_directory.split(os.path.sep)[-1])
|
171
|
+
repo_id = create_repo(repo_id, exist_ok=True, private=private, token=token).repo_id
|
172
|
+
|
173
|
+
self._upload_folder(
|
174
|
+
save_directory,
|
175
|
+
repo_id,
|
176
|
+
token=token,
|
177
|
+
commit_message=commit_message,
|
178
|
+
create_pr=create_pr,
|
179
|
+
)
|
180
|
+
|
159
181
|
@classmethod
|
160
182
|
def from_config(cls, config: Union[FrozenDict, Dict[str, Any]] = None, return_unused_kwargs=False, **kwargs):
|
161
183
|
r"""
|
@@ -29,7 +29,7 @@ deps = {
|
|
29
29
|
"pytest": "pytest",
|
30
30
|
"pytest-timeout": "pytest-timeout",
|
31
31
|
"pytest-xdist": "pytest-xdist",
|
32
|
-
"ruff": "ruff
|
32
|
+
"ruff": "ruff==0.0.280",
|
33
33
|
"safetensors": "safetensors>=0.3.1",
|
34
34
|
"sentencepiece": "sentencepiece>=0.1.91,!=0.1.92",
|
35
35
|
"scipy": "scipy",
|