diffusers 0.23.0__py3-none-any.whl → 0.24.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- diffusers/__init__.py +16 -2
- diffusers/configuration_utils.py +1 -0
- diffusers/dependency_versions_check.py +1 -14
- diffusers/dependency_versions_table.py +5 -4
- diffusers/image_processor.py +186 -14
- diffusers/loaders/__init__.py +82 -0
- diffusers/loaders/ip_adapter.py +157 -0
- diffusers/loaders/lora.py +1415 -0
- diffusers/loaders/lora_conversion_utils.py +284 -0
- diffusers/loaders/single_file.py +631 -0
- diffusers/loaders/textual_inversion.py +459 -0
- diffusers/loaders/unet.py +735 -0
- diffusers/loaders/utils.py +59 -0
- diffusers/models/__init__.py +12 -1
- diffusers/models/attention.py +165 -14
- diffusers/models/attention_flax.py +9 -1
- diffusers/models/attention_processor.py +286 -1
- diffusers/models/autoencoder_asym_kl.py +14 -9
- diffusers/models/autoencoder_kl.py +3 -18
- diffusers/models/autoencoder_kl_temporal_decoder.py +402 -0
- diffusers/models/autoencoder_tiny.py +20 -24
- diffusers/models/consistency_decoder_vae.py +37 -30
- diffusers/models/controlnet.py +59 -39
- diffusers/models/controlnet_flax.py +19 -18
- diffusers/models/embeddings_flax.py +2 -0
- diffusers/models/lora.py +131 -1
- diffusers/models/modeling_flax_utils.py +2 -1
- diffusers/models/modeling_outputs.py +17 -0
- diffusers/models/modeling_utils.py +27 -19
- diffusers/models/normalization.py +2 -2
- diffusers/models/resnet.py +390 -59
- diffusers/models/transformer_2d.py +20 -3
- diffusers/models/transformer_temporal.py +183 -1
- diffusers/models/unet_2d_blocks_flax.py +5 -0
- diffusers/models/unet_2d_condition.py +9 -0
- diffusers/models/unet_2d_condition_flax.py +13 -13
- diffusers/models/unet_3d_blocks.py +957 -173
- diffusers/models/unet_3d_condition.py +16 -8
- diffusers/models/unet_kandi3.py +589 -0
- diffusers/models/unet_motion_model.py +48 -33
- diffusers/models/unet_spatio_temporal_condition.py +489 -0
- diffusers/models/vae.py +63 -13
- diffusers/models/vae_flax.py +7 -0
- diffusers/models/vq_model.py +3 -1
- diffusers/optimization.py +16 -9
- diffusers/pipelines/__init__.py +65 -12
- diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion.py +93 -23
- diffusers/pipelines/alt_diffusion/pipeline_alt_diffusion_img2img.py +97 -25
- diffusers/pipelines/animatediff/pipeline_animatediff.py +34 -4
- diffusers/pipelines/audioldm/pipeline_audioldm.py +1 -0
- diffusers/pipelines/auto_pipeline.py +6 -0
- diffusers/pipelines/consistency_models/pipeline_consistency_models.py +1 -0
- diffusers/pipelines/controlnet/pipeline_controlnet.py +217 -31
- diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py +101 -32
- diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py +136 -39
- diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py +119 -37
- diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py +196 -35
- diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py +102 -31
- diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py +1 -0
- diffusers/pipelines/ddim/pipeline_ddim.py +1 -0
- diffusers/pipelines/ddpm/pipeline_ddpm.py +1 -0
- diffusers/pipelines/deepfloyd_if/pipeline_if.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py +13 -1
- diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py +13 -1
- diffusers/pipelines/dit/pipeline_dit.py +1 -0
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py +1 -1
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py +3 -3
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_img2img.py +1 -1
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py +1 -1
- diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_prior.py +1 -1
- diffusers/pipelines/kandinsky3/__init__.py +49 -0
- diffusers/pipelines/kandinsky3/kandinsky3_pipeline.py +452 -0
- diffusers/pipelines/kandinsky3/kandinsky3img2img_pipeline.py +460 -0
- diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py +65 -6
- diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py +55 -3
- diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py +1 -0
- diffusers/pipelines/musicldm/pipeline_musicldm.py +1 -1
- diffusers/pipelines/paint_by_example/pipeline_paint_by_example.py +7 -2
- diffusers/pipelines/pipeline_flax_utils.py +4 -2
- diffusers/pipelines/pipeline_utils.py +33 -13
- diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py +196 -36
- diffusers/pipelines/score_sde_ve/pipeline_score_sde_ve.py +1 -0
- diffusers/pipelines/spectrogram_diffusion/pipeline_spectrogram_diffusion.py +1 -0
- diffusers/pipelines/stable_diffusion/__init__.py +64 -21
- diffusers/pipelines/stable_diffusion/convert_from_ckpt.py +8 -3
- diffusers/pipelines/stable_diffusion/pipeline_cycle_diffusion.py +18 -2
- diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py +2 -2
- diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_img2img.py +2 -4
- diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint_legacy.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +88 -9
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py +8 -3
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_diffedit.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_gligen.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_gligen_text_image.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +92 -9
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +92 -9
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint_legacy.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py +17 -13
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_k_diffusion.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_ldm3d.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_model_editing.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_panorama.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_paradigms.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_pix2pix_zero.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_sag.py +1 -0
- diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py +1 -0
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py +103 -8
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py +113 -8
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py +115 -9
- diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py +16 -12
- diffusers/pipelines/stable_video_diffusion/__init__.py +58 -0
- diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py +649 -0
- diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py +108 -12
- diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py +109 -14
- diffusers/pipelines/text_to_video_synthesis/__init__.py +2 -0
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py +1 -0
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py +18 -3
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py +4 -2
- diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py +872 -0
- diffusers/pipelines/versatile_diffusion/modeling_text_unet.py +29 -40
- diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_dual_guided.py +1 -0
- diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_image_variation.py +1 -0
- diffusers/pipelines/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py +1 -0
- diffusers/pipelines/wuerstchen/modeling_wuerstchen_common.py +14 -4
- diffusers/pipelines/wuerstchen/modeling_wuerstchen_prior.py +9 -5
- diffusers/pipelines/wuerstchen/pipeline_wuerstchen.py +1 -1
- diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py +2 -2
- diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py +1 -1
- diffusers/schedulers/__init__.py +2 -4
- diffusers/schedulers/deprecated/__init__.py +50 -0
- diffusers/schedulers/{scheduling_karras_ve.py → deprecated/scheduling_karras_ve.py} +4 -4
- diffusers/schedulers/{scheduling_sde_vp.py → deprecated/scheduling_sde_vp.py} +4 -6
- diffusers/schedulers/scheduling_ddim.py +1 -3
- diffusers/schedulers/scheduling_ddim_inverse.py +1 -3
- diffusers/schedulers/scheduling_ddim_parallel.py +1 -3
- diffusers/schedulers/scheduling_ddpm.py +1 -3
- diffusers/schedulers/scheduling_ddpm_parallel.py +1 -3
- diffusers/schedulers/scheduling_deis_multistep.py +15 -5
- diffusers/schedulers/scheduling_dpmsolver_multistep.py +15 -5
- diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py +15 -5
- diffusers/schedulers/scheduling_dpmsolver_sde.py +1 -3
- diffusers/schedulers/scheduling_dpmsolver_singlestep.py +15 -5
- diffusers/schedulers/scheduling_euler_ancestral_discrete.py +1 -3
- diffusers/schedulers/scheduling_euler_discrete.py +40 -13
- diffusers/schedulers/scheduling_heun_discrete.py +15 -5
- diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py +15 -5
- diffusers/schedulers/scheduling_k_dpm_2_discrete.py +15 -5
- diffusers/schedulers/scheduling_lcm.py +123 -29
- diffusers/schedulers/scheduling_lms_discrete.py +1 -3
- diffusers/schedulers/scheduling_pndm.py +1 -3
- diffusers/schedulers/scheduling_repaint.py +1 -3
- diffusers/schedulers/scheduling_unipc_multistep.py +15 -5
- diffusers/utils/__init__.py +1 -0
- diffusers/utils/constants.py +11 -6
- diffusers/utils/dummy_pt_objects.py +45 -0
- diffusers/utils/dummy_torch_and_transformers_objects.py +60 -0
- diffusers/utils/dynamic_modules_utils.py +4 -4
- diffusers/utils/export_utils.py +8 -3
- diffusers/utils/logging.py +10 -10
- diffusers/utils/outputs.py +5 -5
- diffusers/utils/peft_utils.py +88 -44
- diffusers/utils/torch_utils.py +2 -2
- diffusers/utils/versions.py +117 -0
- {diffusers-0.23.0.dist-info → diffusers-0.24.0.dist-info}/METADATA +83 -64
- {diffusers-0.23.0.dist-info → diffusers-0.24.0.dist-info}/RECORD +176 -157
- {diffusers-0.23.0.dist-info → diffusers-0.24.0.dist-info}/WHEEL +1 -1
- {diffusers-0.23.0.dist-info → diffusers-0.24.0.dist-info}/entry_points.txt +1 -0
- diffusers/loaders.py +0 -3336
- {diffusers-0.23.0.dist-info → diffusers-0.24.0.dist-info}/LICENSE +0 -0
- {diffusers-0.23.0.dist-info → diffusers-0.24.0.dist-info}/top_level.txt +0 -0
@@ -1,102 +1,118 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: diffusers
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.24.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 HuggingFace team
|
7
7
|
Author-email: patrick@huggingface.co
|
8
8
|
License: Apache
|
9
9
|
Keywords: deep learning diffusion jax pytorch stable diffusion audioldm
|
10
|
+
Platform: UNKNOWN
|
10
11
|
Classifier: Development Status :: 5 - Production/Stable
|
11
12
|
Classifier: Intended Audience :: Developers
|
12
13
|
Classifier: Intended Audience :: Education
|
13
14
|
Classifier: Intended Audience :: Science/Research
|
14
15
|
Classifier: License :: OSI Approved :: Apache Software License
|
15
16
|
Classifier: Operating System :: OS Independent
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
16
18
|
Classifier: Programming Language :: Python :: 3
|
17
19
|
Classifier: Programming Language :: Python :: 3.8
|
18
20
|
Classifier: Programming Language :: Python :: 3.9
|
19
|
-
Classifier:
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
20
22
|
Requires-Python: >=3.8.0
|
21
23
|
Description-Content-Type: text/markdown
|
22
24
|
License-File: LICENSE
|
23
|
-
Requires-Dist:
|
25
|
+
Requires-Dist: Pillow
|
24
26
|
Requires-Dist: filelock
|
25
|
-
Requires-Dist: huggingface-hub >=0.
|
27
|
+
Requires-Dist: huggingface-hub (>=0.19.4)
|
28
|
+
Requires-Dist: importlib-metadata
|
26
29
|
Requires-Dist: numpy
|
27
|
-
Requires-Dist: regex !=2019.12.17
|
30
|
+
Requires-Dist: regex (!=2019.12.17)
|
28
31
|
Requires-Dist: requests
|
29
|
-
Requires-Dist: safetensors >=0.3.1
|
30
|
-
Requires-Dist: Pillow
|
32
|
+
Requires-Dist: safetensors (>=0.3.1)
|
31
33
|
Provides-Extra: dev
|
32
|
-
Requires-Dist: urllib3 <=2.0.0 ; extra == 'dev'
|
33
|
-
Requires-Dist: black ~=23.1 ; extra == 'dev'
|
34
|
-
Requires-Dist: isort >=5.5.4 ; extra == 'dev'
|
35
|
-
Requires-Dist: ruff ==0.0.280 ; extra == 'dev'
|
36
|
-
Requires-Dist: hf-doc-builder >=0.3.0 ; extra == 'dev'
|
37
|
-
Requires-Dist: compel ==0.1.8 ; extra == 'dev'
|
38
|
-
Requires-Dist: datasets ; extra == 'dev'
|
39
34
|
Requires-Dist: Jinja2 ; extra == 'dev'
|
40
|
-
Requires-Dist:
|
41
|
-
Requires-Dist:
|
35
|
+
Requires-Dist: accelerate (>=0.11.0) ; extra == 'dev'
|
36
|
+
Requires-Dist: compel (==0.1.8) ; extra == 'dev'
|
37
|
+
Requires-Dist: datasets ; extra == 'dev'
|
38
|
+
Requires-Dist: flax (>=0.4.1) ; extra == 'dev'
|
39
|
+
Requires-Dist: hf-doc-builder (>=0.3.0) ; extra == 'dev'
|
40
|
+
Requires-Dist: invisible-watermark (>=0.2.0) ; extra == 'dev'
|
41
|
+
Requires-Dist: isort (>=5.5.4) ; extra == 'dev'
|
42
|
+
Requires-Dist: jax (>=0.4.1) ; extra == 'dev'
|
43
|
+
Requires-Dist: jaxlib (>=0.4.1) ; extra == 'dev'
|
44
|
+
Requires-Dist: k-diffusion (>=0.0.12) ; extra == 'dev'
|
42
45
|
Requires-Dist: librosa ; extra == 'dev'
|
43
46
|
Requires-Dist: omegaconf ; extra == 'dev'
|
44
47
|
Requires-Dist: parameterized ; extra == 'dev'
|
48
|
+
Requires-Dist: protobuf (<4,>=3.20.3) ; extra == 'dev'
|
45
49
|
Requires-Dist: pytest ; extra == 'dev'
|
46
50
|
Requires-Dist: pytest-timeout ; extra == 'dev'
|
47
51
|
Requires-Dist: pytest-xdist ; extra == 'dev'
|
48
|
-
Requires-Dist: requests-mock ==1.10.0 ; extra == 'dev'
|
49
|
-
Requires-Dist:
|
50
|
-
Requires-Dist:
|
52
|
+
Requires-Dist: requests-mock (==1.10.0) ; extra == 'dev'
|
53
|
+
Requires-Dist: ruff (<=0.2,>=0.1.5) ; extra == 'dev'
|
54
|
+
Requires-Dist: safetensors (>=0.3.1) ; extra == 'dev'
|
51
55
|
Requires-Dist: scipy ; extra == 'dev'
|
52
|
-
Requires-Dist:
|
53
|
-
Requires-Dist: transformers >=4.25.1 ; extra == 'dev'
|
54
|
-
Requires-Dist: accelerate >=0.11.0 ; extra == 'dev'
|
55
|
-
Requires-Dist: protobuf <4,>=3.20.3 ; extra == 'dev'
|
56
|
+
Requires-Dist: sentencepiece (!=0.1.92,>=0.1.91) ; extra == 'dev'
|
56
57
|
Requires-Dist: tensorboard ; extra == 'dev'
|
57
|
-
Requires-Dist: torch >=1.4 ; extra == 'dev'
|
58
|
-
Requires-Dist:
|
59
|
-
Requires-Dist:
|
60
|
-
Requires-Dist:
|
58
|
+
Requires-Dist: torch (>=1.4) ; extra == 'dev'
|
59
|
+
Requires-Dist: torchvision ; extra == 'dev'
|
60
|
+
Requires-Dist: transformers (>=4.25.1) ; extra == 'dev'
|
61
|
+
Requires-Dist: urllib3 (<=2.0.0) ; extra == 'dev'
|
61
62
|
Provides-Extra: docs
|
62
|
-
Requires-Dist: hf-doc-builder >=0.3.0 ; extra == 'docs'
|
63
|
+
Requires-Dist: hf-doc-builder (>=0.3.0) ; extra == 'docs'
|
63
64
|
Provides-Extra: flax
|
64
|
-
Requires-Dist:
|
65
|
-
Requires-Dist:
|
66
|
-
Requires-Dist:
|
65
|
+
Requires-Dist: flax (>=0.4.1) ; extra == 'flax'
|
66
|
+
Requires-Dist: jax (>=0.4.1) ; extra == 'flax'
|
67
|
+
Requires-Dist: jaxlib (>=0.4.1) ; extra == 'flax'
|
67
68
|
Provides-Extra: quality
|
68
|
-
Requires-Dist:
|
69
|
-
Requires-Dist:
|
70
|
-
Requires-Dist:
|
71
|
-
Requires-Dist:
|
72
|
-
Requires-Dist: hf-doc-builder >=0.3.0 ; extra == 'quality'
|
69
|
+
Requires-Dist: hf-doc-builder (>=0.3.0) ; extra == 'quality'
|
70
|
+
Requires-Dist: isort (>=5.5.4) ; extra == 'quality'
|
71
|
+
Requires-Dist: ruff (<=0.2,>=0.1.5) ; extra == 'quality'
|
72
|
+
Requires-Dist: urllib3 (<=2.0.0) ; extra == 'quality'
|
73
73
|
Provides-Extra: test
|
74
|
-
Requires-Dist: compel ==0.1.8 ; extra == 'test'
|
75
|
-
Requires-Dist: datasets ; extra == 'test'
|
76
74
|
Requires-Dist: Jinja2 ; extra == 'test'
|
77
|
-
Requires-Dist:
|
78
|
-
Requires-Dist:
|
75
|
+
Requires-Dist: compel (==0.1.8) ; extra == 'test'
|
76
|
+
Requires-Dist: datasets ; extra == 'test'
|
77
|
+
Requires-Dist: invisible-watermark (>=0.2.0) ; extra == 'test'
|
78
|
+
Requires-Dist: k-diffusion (>=0.0.12) ; extra == 'test'
|
79
79
|
Requires-Dist: librosa ; extra == 'test'
|
80
80
|
Requires-Dist: omegaconf ; extra == 'test'
|
81
81
|
Requires-Dist: parameterized ; extra == 'test'
|
82
82
|
Requires-Dist: pytest ; extra == 'test'
|
83
83
|
Requires-Dist: pytest-timeout ; extra == 'test'
|
84
84
|
Requires-Dist: pytest-xdist ; extra == 'test'
|
85
|
-
Requires-Dist: requests-mock ==1.10.0 ; extra == 'test'
|
86
|
-
Requires-Dist: safetensors >=0.3.1 ; extra == 'test'
|
87
|
-
Requires-Dist: sentencepiece !=0.1.92,>=0.1.91 ; extra == 'test'
|
85
|
+
Requires-Dist: requests-mock (==1.10.0) ; extra == 'test'
|
86
|
+
Requires-Dist: safetensors (>=0.3.1) ; extra == 'test'
|
88
87
|
Requires-Dist: scipy ; extra == 'test'
|
88
|
+
Requires-Dist: sentencepiece (!=0.1.92,>=0.1.91) ; extra == 'test'
|
89
89
|
Requires-Dist: torchvision ; extra == 'test'
|
90
|
-
Requires-Dist: transformers >=4.25.1 ; extra == 'test'
|
90
|
+
Requires-Dist: transformers (>=4.25.1) ; extra == 'test'
|
91
91
|
Provides-Extra: torch
|
92
|
-
Requires-Dist:
|
93
|
-
Requires-Dist:
|
92
|
+
Requires-Dist: accelerate (>=0.11.0) ; extra == 'torch'
|
93
|
+
Requires-Dist: torch (>=1.4) ; extra == 'torch'
|
94
94
|
Provides-Extra: training
|
95
|
-
Requires-Dist:
|
95
|
+
Requires-Dist: Jinja2 ; extra == 'training'
|
96
|
+
Requires-Dist: accelerate (>=0.11.0) ; extra == 'training'
|
96
97
|
Requires-Dist: datasets ; extra == 'training'
|
97
|
-
Requires-Dist: protobuf <4,>=3.20.3 ; extra == 'training'
|
98
|
+
Requires-Dist: protobuf (<4,>=3.20.3) ; extra == 'training'
|
98
99
|
Requires-Dist: tensorboard ; extra == 'training'
|
99
|
-
|
100
|
+
|
101
|
+
<!---
|
102
|
+
Copyright 2022 - The HuggingFace Team. All rights reserved.
|
103
|
+
|
104
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
105
|
+
you may not use this file except in compliance with the License.
|
106
|
+
You may obtain a copy of the License at
|
107
|
+
|
108
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
109
|
+
|
110
|
+
Unless required by applicable law or agreed to in writing, software
|
111
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
112
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
113
|
+
See the License for the specific language governing permissions and
|
114
|
+
limitations under the License.
|
115
|
+
-->
|
100
116
|
|
101
117
|
<p align="center">
|
102
118
|
<br>
|
@@ -114,7 +130,10 @@ Requires-Dist: Jinja2 ; extra == 'training'
|
|
114
130
|
<img alt="GitHub release" src="https://static.pepy.tech/badge/diffusers/month">
|
115
131
|
</a>
|
116
132
|
<a href="CODE_OF_CONDUCT.md">
|
117
|
-
<img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-2.
|
133
|
+
<img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg">
|
134
|
+
</a>
|
135
|
+
<a href="https://twitter.com/diffuserslib">
|
136
|
+
<img alt="X account" src="https://img.shields.io/twitter/url/https/twitter.com/diffuserslib.svg?style=social&label=Follow%20%40diffuserslib">
|
118
137
|
</a>
|
119
138
|
</p>
|
120
139
|
|
@@ -124,11 +143,11 @@ Requires-Dist: Jinja2 ; extra == 'training'
|
|
124
143
|
|
125
144
|
- 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.
|
126
145
|
- Interchangeable noise [schedulers](https://huggingface.co/docs/diffusers/api/schedulers/overview) for different diffusion speeds and output quality.
|
127
|
-
- 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.
|
146
|
+
- Pretrained [models](https://huggingface.co/docs/diffusers/api/models/overview) that can be used as building blocks, and combined with schedulers, for creating your own end-to-end diffusion systems.
|
128
147
|
|
129
148
|
## Installation
|
130
149
|
|
131
|
-
We recommend installing 🤗 Diffusers in a virtual environment from
|
150
|
+
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.
|
132
151
|
|
133
152
|
### PyTorch
|
134
153
|
|
@@ -158,7 +177,7 @@ Please refer to the [How to use Stable Diffusion in Apple Silicon](https://huggi
|
|
158
177
|
|
159
178
|
## Quickstart
|
160
179
|
|
161
|
-
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
|
180
|
+
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 15000+ checkpoints):
|
162
181
|
|
163
182
|
```python
|
164
183
|
from diffusers import DiffusionPipeline
|
@@ -175,14 +194,13 @@ You can also dig into the models and schedulers toolbox to build your own diffus
|
|
175
194
|
from diffusers import DDPMScheduler, UNet2DModel
|
176
195
|
from PIL import Image
|
177
196
|
import torch
|
178
|
-
import numpy as np
|
179
197
|
|
180
198
|
scheduler = DDPMScheduler.from_pretrained("google/ddpm-cat-256")
|
181
199
|
model = UNet2DModel.from_pretrained("google/ddpm-cat-256").to("cuda")
|
182
200
|
scheduler.set_timesteps(50)
|
183
201
|
|
184
202
|
sample_size = model.config.sample_size
|
185
|
-
noise = torch.randn((1, 3, sample_size, sample_size)
|
203
|
+
noise = torch.randn((1, 3, sample_size, sample_size), device="cuda")
|
186
204
|
input = noise
|
187
205
|
|
188
206
|
for t in scheduler.timesteps:
|
@@ -217,8 +235,7 @@ You can look out for [issues](https://github.com/huggingface/diffusers/issues) y
|
|
217
235
|
- 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
|
218
236
|
- See [New scheduler](https://github.com/huggingface/diffusers/issues?q=is%3Aopen+is%3Aissue+label%3A%22New+scheduler%22)
|
219
237
|
|
220
|
-
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
|
221
|
-
just hang out ☕.
|
238
|
+
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 just hang out ☕.
|
222
239
|
|
223
240
|
|
224
241
|
## Popular Tasks & Pipelines
|
@@ -241,12 +258,12 @@ just hang out ☕.
|
|
241
258
|
</tr>
|
242
259
|
<tr>
|
243
260
|
<td>Text-to-Image</td>
|
244
|
-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/unclip">
|
261
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/unclip">unCLIP</a></td>
|
245
262
|
<td><a href="https://huggingface.co/kakaobrain/karlo-v1-alpha"> kakaobrain/karlo-v1-alpha </a></td>
|
246
263
|
</tr>
|
247
264
|
<tr>
|
248
265
|
<td>Text-to-Image</td>
|
249
|
-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/
|
266
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/deepfloyd_if">DeepFloyd IF</a></td>
|
250
267
|
<td><a href="https://huggingface.co/DeepFloyd/IF-I-XL-v1.0"> DeepFloyd/IF-I-XL-v1.0 </a></td>
|
251
268
|
</tr>
|
252
269
|
<tr>
|
@@ -256,12 +273,12 @@ just hang out ☕.
|
|
256
273
|
</tr>
|
257
274
|
<tr style="border-top: 2px solid black">
|
258
275
|
<td>Text-guided Image-to-Image</td>
|
259
|
-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/
|
276
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/controlnet">ControlNet</a></td>
|
260
277
|
<td><a href="https://huggingface.co/lllyasviel/sd-controlnet-canny"> lllyasviel/sd-controlnet-canny </a></td>
|
261
278
|
</tr>
|
262
279
|
<tr>
|
263
280
|
<td>Text-guided Image-to-Image</td>
|
264
|
-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/pix2pix">
|
281
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/pix2pix">InstructPix2Pix</a></td>
|
265
282
|
<td><a href="https://huggingface.co/timbrooks/instruct-pix2pix"> timbrooks/instruct-pix2pix </a></td>
|
266
283
|
</tr>
|
267
284
|
<tr>
|
@@ -271,7 +288,7 @@ just hang out ☕.
|
|
271
288
|
</tr>
|
272
289
|
<tr style="border-top: 2px solid black">
|
273
290
|
<td>Text-guided Image Inpainting</td>
|
274
|
-
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/inpaint">Stable Diffusion
|
291
|
+
<td><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/inpaint">Stable Diffusion Inpainting</a></td>
|
275
292
|
<td><a href="https://huggingface.co/runwayml/stable-diffusion-inpainting"> runwayml/stable-diffusion-inpainting </a></td>
|
276
293
|
</tr>
|
277
294
|
<tr style="border-top: 2px solid black">
|
@@ -302,9 +319,9 @@ just hang out ☕.
|
|
302
319
|
- https://github.com/deep-floyd/IF
|
303
320
|
- https://github.com/bentoml/BentoML
|
304
321
|
- https://github.com/bmaltais/kohya_ss
|
305
|
-
- +
|
322
|
+
- +6000 other amazing GitHub repositories 💪
|
306
323
|
|
307
|
-
Thank you for using us
|
324
|
+
Thank you for using us ❤️.
|
308
325
|
|
309
326
|
## Credits
|
310
327
|
|
@@ -329,3 +346,5 @@ We also want to thank @heejkoo for the very helpful overview of papers, code and
|
|
329
346
|
howpublished = {\url{https://github.com/huggingface/diffusers}}
|
330
347
|
}
|
331
348
|
```
|
349
|
+
|
350
|
+
|