diffusers 0.24.0__py3-none-any.whl → 0.25.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. diffusers/__init__.py +11 -1
  2. diffusers/commands/fp16_safetensors.py +10 -11
  3. diffusers/configuration_utils.py +12 -8
  4. diffusers/dependency_versions_table.py +2 -1
  5. diffusers/experimental/rl/value_guided_sampling.py +1 -1
  6. diffusers/image_processor.py +286 -46
  7. diffusers/loaders/ip_adapter.py +11 -9
  8. diffusers/loaders/lora.py +198 -60
  9. diffusers/loaders/single_file.py +24 -18
  10. diffusers/loaders/textual_inversion.py +10 -14
  11. diffusers/loaders/unet.py +130 -37
  12. diffusers/models/__init__.py +18 -12
  13. diffusers/models/activations.py +9 -6
  14. diffusers/models/attention.py +137 -16
  15. diffusers/models/attention_processor.py +133 -46
  16. diffusers/models/autoencoders/__init__.py +5 -0
  17. diffusers/models/{autoencoder_asym_kl.py → autoencoders/autoencoder_asym_kl.py} +4 -4
  18. diffusers/models/{autoencoder_kl.py → autoencoders/autoencoder_kl.py} +45 -6
  19. diffusers/models/{autoencoder_kl_temporal_decoder.py → autoencoders/autoencoder_kl_temporal_decoder.py} +8 -8
  20. diffusers/models/{autoencoder_tiny.py → autoencoders/autoencoder_tiny.py} +4 -4
  21. diffusers/models/{consistency_decoder_vae.py → autoencoders/consistency_decoder_vae.py} +14 -14
  22. diffusers/models/{vae.py → autoencoders/vae.py} +9 -5
  23. diffusers/models/downsampling.py +338 -0
  24. diffusers/models/embeddings.py +112 -29
  25. diffusers/models/modeling_flax_utils.py +12 -7
  26. diffusers/models/modeling_utils.py +10 -10
  27. diffusers/models/normalization.py +108 -2
  28. diffusers/models/resnet.py +15 -699
  29. diffusers/models/transformer_2d.py +2 -2
  30. diffusers/models/unet_2d_condition.py +37 -0
  31. diffusers/models/{unet_kandi3.py → unet_kandinsky3.py} +105 -159
  32. diffusers/models/upsampling.py +454 -0
  33. diffusers/models/uvit_2d.py +471 -0
  34. diffusers/models/vq_model.py +9 -2
  35. diffusers/pipelines/__init__.py +81 -73
  36. diffusers/pipelines/amused/__init__.py +62 -0
  37. diffusers/pipelines/amused/pipeline_amused.py +328 -0
  38. diffusers/pipelines/amused/pipeline_amused_img2img.py +347 -0
  39. diffusers/pipelines/amused/pipeline_amused_inpaint.py +378 -0
  40. diffusers/pipelines/animatediff/pipeline_animatediff.py +38 -10
  41. diffusers/pipelines/auto_pipeline.py +17 -13
  42. diffusers/pipelines/controlnet/pipeline_controlnet.py +27 -10
  43. diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py +47 -5
  44. diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py +25 -8
  45. diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py +4 -6
  46. diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py +26 -10
  47. diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py +4 -3
  48. diffusers/pipelines/deprecated/__init__.py +153 -0
  49. diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/__init__.py +3 -3
  50. diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/pipeline_alt_diffusion.py +91 -18
  51. diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/pipeline_alt_diffusion_img2img.py +91 -18
  52. diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/pipeline_output.py +1 -1
  53. diffusers/pipelines/{audio_diffusion → deprecated/audio_diffusion}/__init__.py +1 -1
  54. diffusers/pipelines/{audio_diffusion → deprecated/audio_diffusion}/mel.py +2 -2
  55. diffusers/pipelines/{audio_diffusion → deprecated/audio_diffusion}/pipeline_audio_diffusion.py +4 -4
  56. diffusers/pipelines/{latent_diffusion_uncond → deprecated/latent_diffusion_uncond}/__init__.py +1 -1
  57. diffusers/pipelines/{latent_diffusion_uncond → deprecated/latent_diffusion_uncond}/pipeline_latent_diffusion_uncond.py +4 -4
  58. diffusers/pipelines/{pndm → deprecated/pndm}/__init__.py +1 -1
  59. diffusers/pipelines/{pndm → deprecated/pndm}/pipeline_pndm.py +4 -4
  60. diffusers/pipelines/{repaint → deprecated/repaint}/__init__.py +1 -1
  61. diffusers/pipelines/{repaint → deprecated/repaint}/pipeline_repaint.py +5 -5
  62. diffusers/pipelines/{score_sde_ve → deprecated/score_sde_ve}/__init__.py +1 -1
  63. diffusers/pipelines/{score_sde_ve → deprecated/score_sde_ve}/pipeline_score_sde_ve.py +4 -4
  64. diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/__init__.py +6 -6
  65. diffusers/pipelines/{spectrogram_diffusion/continous_encoder.py → deprecated/spectrogram_diffusion/continuous_encoder.py} +2 -2
  66. diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/midi_utils.py +1 -1
  67. diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/notes_encoder.py +2 -2
  68. diffusers/pipelines/{spectrogram_diffusion → deprecated/spectrogram_diffusion}/pipeline_spectrogram_diffusion.py +7 -7
  69. diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py +55 -0
  70. diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_cycle_diffusion.py +16 -11
  71. diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_onnx_stable_diffusion_inpaint_legacy.py +6 -6
  72. diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_inpaint_legacy.py +11 -11
  73. diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_model_editing.py +16 -11
  74. diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_paradigms.py +10 -10
  75. diffusers/pipelines/{stable_diffusion → deprecated/stable_diffusion_variants}/pipeline_stable_diffusion_pix2pix_zero.py +13 -13
  76. diffusers/pipelines/{stochastic_karras_ve → deprecated/stochastic_karras_ve}/__init__.py +1 -1
  77. diffusers/pipelines/{stochastic_karras_ve → deprecated/stochastic_karras_ve}/pipeline_stochastic_karras_ve.py +4 -4
  78. diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/__init__.py +3 -3
  79. diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/modeling_text_unet.py +54 -11
  80. diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion.py +4 -4
  81. diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion_dual_guided.py +6 -6
  82. diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion_image_variation.py +6 -6
  83. diffusers/pipelines/{versatile_diffusion → deprecated/versatile_diffusion}/pipeline_versatile_diffusion_text_to_image.py +6 -6
  84. diffusers/pipelines/{vq_diffusion → deprecated/vq_diffusion}/__init__.py +3 -3
  85. diffusers/pipelines/{vq_diffusion → deprecated/vq_diffusion}/pipeline_vq_diffusion.py +5 -5
  86. diffusers/pipelines/kandinsky3/__init__.py +4 -4
  87. diffusers/pipelines/kandinsky3/convert_kandinsky3_unet.py +98 -0
  88. diffusers/pipelines/kandinsky3/{kandinsky3_pipeline.py → pipeline_kandinsky3.py} +172 -35
  89. diffusers/pipelines/kandinsky3/{kandinsky3img2img_pipeline.py → pipeline_kandinsky3_img2img.py} +228 -34
  90. diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py +46 -5
  91. diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py +47 -6
  92. diffusers/pipelines/onnx_utils.py +8 -5
  93. diffusers/pipelines/pipeline_flax_utils.py +7 -6
  94. diffusers/pipelines/pipeline_utils.py +30 -29
  95. diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py +51 -2
  96. diffusers/pipelines/shap_e/pipeline_shap_e_img2img.py +3 -3
  97. diffusers/pipelines/stable_diffusion/__init__.py +1 -72
  98. diffusers/pipelines/stable_diffusion/convert_from_ckpt.py +67 -75
  99. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +92 -8
  100. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +92 -8
  101. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +138 -10
  102. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py +57 -7
  103. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py +3 -0
  104. diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py +6 -0
  105. diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py +5 -0
  106. diffusers/pipelines/stable_diffusion/pipeline_stable_unclip_img2img.py +5 -0
  107. diffusers/pipelines/stable_diffusion_attend_and_excite/__init__.py +48 -0
  108. diffusers/pipelines/{stable_diffusion → stable_diffusion_attend_and_excite}/pipeline_stable_diffusion_attend_and_excite.py +5 -2
  109. diffusers/pipelines/stable_diffusion_diffedit/__init__.py +48 -0
  110. diffusers/pipelines/{stable_diffusion → stable_diffusion_diffedit}/pipeline_stable_diffusion_diffedit.py +2 -3
  111. diffusers/pipelines/stable_diffusion_gligen/__init__.py +50 -0
  112. diffusers/pipelines/{stable_diffusion → stable_diffusion_gligen}/pipeline_stable_diffusion_gligen.py +2 -2
  113. diffusers/pipelines/{stable_diffusion → stable_diffusion_gligen}/pipeline_stable_diffusion_gligen_text_image.py +3 -3
  114. diffusers/pipelines/stable_diffusion_k_diffusion/__init__.py +60 -0
  115. diffusers/pipelines/{stable_diffusion → stable_diffusion_k_diffusion}/pipeline_stable_diffusion_k_diffusion.py +6 -1
  116. diffusers/pipelines/stable_diffusion_ldm3d/__init__.py +48 -0
  117. diffusers/pipelines/{stable_diffusion → stable_diffusion_ldm3d}/pipeline_stable_diffusion_ldm3d.py +50 -7
  118. diffusers/pipelines/stable_diffusion_panorama/__init__.py +48 -0
  119. diffusers/pipelines/{stable_diffusion → stable_diffusion_panorama}/pipeline_stable_diffusion_panorama.py +56 -8
  120. diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py +58 -6
  121. diffusers/pipelines/stable_diffusion_sag/__init__.py +48 -0
  122. diffusers/pipelines/{stable_diffusion → stable_diffusion_sag}/pipeline_stable_diffusion_sag.py +67 -10
  123. diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl.py +97 -15
  124. diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py +98 -14
  125. diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_inpaint.py +97 -14
  126. diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_instruct_pix2pix.py +7 -5
  127. diffusers/pipelines/stable_video_diffusion/pipeline_stable_video_diffusion.py +12 -9
  128. diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_xl_adapter.py +6 -0
  129. diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth.py +5 -0
  130. diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_synth_img2img.py +5 -0
  131. diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py +331 -9
  132. diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero_sdxl.py +468 -9
  133. diffusers/pipelines/unclip/pipeline_unclip.py +2 -1
  134. diffusers/pipelines/unclip/pipeline_unclip_image_variation.py +1 -0
  135. diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py +1 -1
  136. diffusers/pipelines/wuerstchen/pipeline_wuerstchen_prior.py +4 -0
  137. diffusers/schedulers/__init__.py +2 -0
  138. diffusers/schedulers/scheduling_amused.py +162 -0
  139. diffusers/schedulers/scheduling_consistency_models.py +2 -0
  140. diffusers/schedulers/scheduling_ddim_inverse.py +1 -4
  141. diffusers/schedulers/scheduling_ddpm.py +46 -0
  142. diffusers/schedulers/scheduling_ddpm_parallel.py +46 -0
  143. diffusers/schedulers/scheduling_deis_multistep.py +13 -1
  144. diffusers/schedulers/scheduling_dpmsolver_multistep.py +13 -1
  145. diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py +13 -1
  146. diffusers/schedulers/scheduling_dpmsolver_sde.py +2 -0
  147. diffusers/schedulers/scheduling_dpmsolver_singlestep.py +13 -1
  148. diffusers/schedulers/scheduling_euler_ancestral_discrete.py +58 -0
  149. diffusers/schedulers/scheduling_euler_discrete.py +62 -3
  150. diffusers/schedulers/scheduling_heun_discrete.py +2 -0
  151. diffusers/schedulers/scheduling_k_dpm_2_ancestral_discrete.py +2 -0
  152. diffusers/schedulers/scheduling_k_dpm_2_discrete.py +2 -0
  153. diffusers/schedulers/scheduling_lms_discrete.py +2 -0
  154. diffusers/schedulers/scheduling_unipc_multistep.py +13 -1
  155. diffusers/schedulers/scheduling_utils.py +3 -1
  156. diffusers/schedulers/scheduling_utils_flax.py +3 -1
  157. diffusers/training_utils.py +1 -1
  158. diffusers/utils/__init__.py +0 -2
  159. diffusers/utils/constants.py +2 -5
  160. diffusers/utils/dummy_pt_objects.py +30 -0
  161. diffusers/utils/dummy_torch_and_transformers_objects.py +45 -0
  162. diffusers/utils/dynamic_modules_utils.py +14 -18
  163. diffusers/utils/hub_utils.py +24 -36
  164. diffusers/utils/logging.py +1 -1
  165. diffusers/utils/state_dict_utils.py +8 -0
  166. diffusers/utils/testing_utils.py +199 -1
  167. diffusers/utils/torch_utils.py +3 -3
  168. {diffusers-0.24.0.dist-info → diffusers-0.25.0.dist-info}/METADATA +54 -53
  169. {diffusers-0.24.0.dist-info → diffusers-0.25.0.dist-info}/RECORD +174 -155
  170. {diffusers-0.24.0.dist-info → diffusers-0.25.0.dist-info}/WHEEL +1 -1
  171. {diffusers-0.24.0.dist-info → diffusers-0.25.0.dist-info}/entry_points.txt +0 -1
  172. /diffusers/pipelines/{alt_diffusion → deprecated/alt_diffusion}/modeling_roberta_series.py +0 -0
  173. {diffusers-0.24.0.dist-info → diffusers-0.25.0.dist-info}/LICENSE +0 -0
  174. {diffusers-0.24.0.dist-info → diffusers-0.25.0.dist-info}/top_level.txt +0 -0
@@ -25,20 +25,21 @@ from typing import Dict, Optional, Union
25
25
  from uuid import uuid4
26
26
 
27
27
  from huggingface_hub import (
28
- HfFolder,
29
28
  ModelCard,
30
29
  ModelCardData,
31
30
  create_repo,
31
+ get_full_repo_name,
32
32
  hf_hub_download,
33
33
  upload_folder,
34
- whoami,
35
34
  )
35
+ from huggingface_hub.constants import HF_HUB_CACHE, HF_HUB_DISABLE_TELEMETRY, HF_HUB_OFFLINE
36
36
  from huggingface_hub.file_download import REGEX_COMMIT_HASH
37
37
  from huggingface_hub.utils import (
38
38
  EntryNotFoundError,
39
39
  RepositoryNotFoundError,
40
40
  RevisionNotFoundError,
41
41
  is_jinja_available,
42
+ validate_hf_hub_args,
42
43
  )
43
44
  from packaging import version
44
45
  from requests import HTTPError
@@ -46,7 +47,6 @@ from requests import HTTPError
46
47
  from .. import __version__
47
48
  from .constants import (
48
49
  DEPRECATED_REVISION_ARGS,
49
- DIFFUSERS_CACHE,
50
50
  HUGGINGFACE_CO_RESOLVE_ENDPOINT,
51
51
  SAFETENSORS_WEIGHTS_NAME,
52
52
  WEIGHTS_NAME,
@@ -69,9 +69,6 @@ logger = get_logger(__name__)
69
69
 
70
70
  MODEL_CARD_TEMPLATE_PATH = Path(__file__).parent / "model_card_template.md"
71
71
  SESSION_ID = uuid4().hex
72
- HF_HUB_OFFLINE = os.getenv("HF_HUB_OFFLINE", "").upper() in ENV_VARS_TRUE_VALUES
73
- DISABLE_TELEMETRY = os.getenv("DISABLE_TELEMETRY", "").upper() in ENV_VARS_TRUE_VALUES
74
- HUGGINGFACE_CO_TELEMETRY = HUGGINGFACE_CO_RESOLVE_ENDPOINT + "/api/telemetry/"
75
72
 
76
73
 
77
74
  def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str:
@@ -79,7 +76,7 @@ def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str:
79
76
  Formats a user-agent string with basic info about a request.
80
77
  """
81
78
  ua = f"diffusers/{__version__}; python/{sys.version.split()[0]}; session_id/{SESSION_ID}"
82
- if DISABLE_TELEMETRY or HF_HUB_OFFLINE:
79
+ if HF_HUB_DISABLE_TELEMETRY or HF_HUB_OFFLINE:
83
80
  return ua + "; telemetry/off"
84
81
  if is_torch_available():
85
82
  ua += f"; torch/{_torch_version}"
@@ -98,16 +95,6 @@ def http_user_agent(user_agent: Union[Dict, str, None] = None) -> str:
98
95
  return ua
99
96
 
100
97
 
101
- def get_full_repo_name(model_id: str, organization: Optional[str] = None, token: Optional[str] = None):
102
- if token is None:
103
- token = HfFolder.get_token()
104
- if organization is None:
105
- username = whoami(token)["name"]
106
- return f"{username}/{model_id}"
107
- else:
108
- return f"{organization}/{model_id}"
109
-
110
-
111
98
  def create_model_card(args, model_name):
112
99
  if not is_jinja_available():
113
100
  raise ValueError(
@@ -183,7 +170,7 @@ old_diffusers_cache = os.path.join(hf_cache_home, "diffusers")
183
170
 
184
171
  def move_cache(old_cache_dir: Optional[str] = None, new_cache_dir: Optional[str] = None) -> None:
185
172
  if new_cache_dir is None:
186
- new_cache_dir = DIFFUSERS_CACHE
173
+ new_cache_dir = HF_HUB_CACHE
187
174
  if old_cache_dir is None:
188
175
  old_cache_dir = old_diffusers_cache
189
176
 
@@ -203,7 +190,7 @@ def move_cache(old_cache_dir: Optional[str] = None, new_cache_dir: Optional[str]
203
190
  # At this point, old_cache_dir contains symlinks to the new cache (it can still be used).
204
191
 
205
192
 
206
- cache_version_file = os.path.join(DIFFUSERS_CACHE, "version_diffusers_cache.txt")
193
+ cache_version_file = os.path.join(HF_HUB_CACHE, "version_diffusers_cache.txt")
207
194
  if not os.path.isfile(cache_version_file):
208
195
  cache_version = 0
209
196
  else:
@@ -233,12 +220,12 @@ if cache_version < 1:
233
220
 
234
221
  if cache_version < 1:
235
222
  try:
236
- os.makedirs(DIFFUSERS_CACHE, exist_ok=True)
223
+ os.makedirs(HF_HUB_CACHE, exist_ok=True)
237
224
  with open(cache_version_file, "w") as f:
238
225
  f.write("1")
239
226
  except Exception:
240
227
  logger.warning(
241
- f"There was a problem when trying to write in your cache folder ({DIFFUSERS_CACHE}). Please, ensure "
228
+ f"There was a problem when trying to write in your cache folder ({HF_HUB_CACHE}). Please, ensure "
242
229
  "the directory exists and can be written to."
243
230
  )
244
231
 
@@ -252,20 +239,21 @@ def _add_variant(weights_name: str, variant: Optional[str] = None) -> str:
252
239
  return weights_name
253
240
 
254
241
 
242
+ @validate_hf_hub_args
255
243
  def _get_model_file(
256
- pretrained_model_name_or_path,
244
+ pretrained_model_name_or_path: Union[str, Path],
257
245
  *,
258
- weights_name,
259
- subfolder,
260
- cache_dir,
261
- force_download,
262
- proxies,
263
- resume_download,
264
- local_files_only,
265
- use_auth_token,
266
- user_agent,
267
- revision,
268
- commit_hash=None,
246
+ weights_name: str,
247
+ subfolder: Optional[str],
248
+ cache_dir: Optional[str],
249
+ force_download: bool,
250
+ proxies: Optional[Dict],
251
+ resume_download: bool,
252
+ local_files_only: bool,
253
+ token: Optional[str],
254
+ user_agent: Union[Dict, str, None],
255
+ revision: Optional[str],
256
+ commit_hash: Optional[str] = None,
269
257
  ):
270
258
  pretrained_model_name_or_path = str(pretrained_model_name_or_path)
271
259
  if os.path.isfile(pretrained_model_name_or_path):
@@ -300,7 +288,7 @@ def _get_model_file(
300
288
  proxies=proxies,
301
289
  resume_download=resume_download,
302
290
  local_files_only=local_files_only,
303
- use_auth_token=use_auth_token,
291
+ token=token,
304
292
  user_agent=user_agent,
305
293
  subfolder=subfolder,
306
294
  revision=revision or commit_hash,
@@ -325,7 +313,7 @@ def _get_model_file(
325
313
  proxies=proxies,
326
314
  resume_download=resume_download,
327
315
  local_files_only=local_files_only,
328
- use_auth_token=use_auth_token,
316
+ token=token,
329
317
  user_agent=user_agent,
330
318
  subfolder=subfolder,
331
319
  revision=revision or commit_hash,
@@ -336,7 +324,7 @@ def _get_model_file(
336
324
  raise EnvironmentError(
337
325
  f"{pretrained_model_name_or_path} is not a local folder and is not a valid model identifier "
338
326
  "listed on 'https://huggingface.co/models'\nIf this is a private repository, make sure to pass a "
339
- "token having permission to this repo with `use_auth_token` or log in with `huggingface-cli "
327
+ "token having permission to this repo with `token` or log in with `huggingface-cli "
340
328
  "login`."
341
329
  )
342
330
  except RevisionNotFoundError:
@@ -213,7 +213,7 @@ def remove_handler(handler: logging.Handler) -> None:
213
213
 
214
214
  _configure_library_root_logger()
215
215
 
216
- assert handler is not None and handler not in _get_library_root_logger().handlers
216
+ assert handler is not None and handler in _get_library_root_logger().handlers
217
217
  _get_library_root_logger().removeHandler(handler)
218
218
 
219
219
 
@@ -79,6 +79,14 @@ PEFT_TO_DIFFUSERS = {
79
79
  ".v_proj.lora_A": ".v_proj.lora_linear_layer.down",
80
80
  ".out_proj.lora_B": ".out_proj.lora_linear_layer.up",
81
81
  ".out_proj.lora_A": ".out_proj.lora_linear_layer.down",
82
+ "to_k.lora_A": "to_k.lora.down",
83
+ "to_k.lora_B": "to_k.lora.up",
84
+ "to_q.lora_A": "to_q.lora.down",
85
+ "to_q.lora_B": "to_q.lora.up",
86
+ "to_v.lora_A": "to_v.lora.down",
87
+ "to_v.lora_B": "to_v.lora.up",
88
+ "to_out.0.lora_A": "to_out.0.lora.down",
89
+ "to_out.0.lora_B": "to_out.0.lora.up",
82
90
  }
83
91
 
84
92
  DIFFUSERS_OLD_TO_DIFFUSERS = {
@@ -17,7 +17,7 @@ from contextlib import contextmanager
17
17
  from distutils.util import strtobool
18
18
  from io import BytesIO, StringIO
19
19
  from pathlib import Path
20
- from typing import List, Optional, Union
20
+ from typing import Callable, Dict, List, Optional, Union
21
21
 
22
22
  import numpy as np
23
23
  import PIL.Image
@@ -58,6 +58,17 @@ USE_PEFT_BACKEND = _required_peft_version and _required_transformers_version
58
58
  if is_torch_available():
59
59
  import torch
60
60
 
61
+ # Set a backend environment variable for any extra module import required for a custom accelerator
62
+ if "DIFFUSERS_TEST_BACKEND" in os.environ:
63
+ backend = os.environ["DIFFUSERS_TEST_BACKEND"]
64
+ try:
65
+ _ = importlib.import_module(backend)
66
+ except ModuleNotFoundError as e:
67
+ raise ModuleNotFoundError(
68
+ f"Failed to import `DIFFUSERS_TEST_BACKEND` '{backend}'! This should be the name of an installed module \
69
+ to enable a specified backend.):\n{e}"
70
+ ) from e
71
+
61
72
  if "DIFFUSERS_TEST_DEVICE" in os.environ:
62
73
  torch_device = os.environ["DIFFUSERS_TEST_DEVICE"]
63
74
  try:
@@ -210,6 +221,36 @@ def require_torch_gpu(test_case):
210
221
  )
211
222
 
212
223
 
224
+ # These decorators are for accelerator-specific behaviours that are not GPU-specific
225
+ def require_torch_accelerator(test_case):
226
+ """Decorator marking a test that requires an accelerator backend and PyTorch."""
227
+ return unittest.skipUnless(is_torch_available() and torch_device != "cpu", "test requires accelerator+PyTorch")(
228
+ test_case
229
+ )
230
+
231
+
232
+ def require_torch_accelerator_with_fp16(test_case):
233
+ """Decorator marking a test that requires an accelerator with support for the FP16 data type."""
234
+ return unittest.skipUnless(_is_torch_fp16_available(torch_device), "test requires accelerator with fp16 support")(
235
+ test_case
236
+ )
237
+
238
+
239
+ def require_torch_accelerator_with_fp64(test_case):
240
+ """Decorator marking a test that requires an accelerator with support for the FP64 data type."""
241
+ return unittest.skipUnless(_is_torch_fp64_available(torch_device), "test requires accelerator with fp64 support")(
242
+ test_case
243
+ )
244
+
245
+
246
+ def require_torch_accelerator_with_training(test_case):
247
+ """Decorator marking a test that requires an accelerator with support for training."""
248
+ return unittest.skipUnless(
249
+ is_torch_available() and backend_supports_training(torch_device),
250
+ "test requires accelerator with training support",
251
+ )(test_case)
252
+
253
+
213
254
  def skip_mps(test_case):
214
255
  """Decorator marking a test to skip if torch_device is 'mps'"""
215
256
  return unittest.skipUnless(torch_device != "mps", "test requires non 'mps' device")(test_case)
@@ -259,6 +300,23 @@ def require_peft_backend(test_case):
259
300
  return unittest.skipUnless(USE_PEFT_BACKEND, "test requires PEFT backend")(test_case)
260
301
 
261
302
 
303
+ def require_peft_version_greater(peft_version):
304
+ """
305
+ Decorator marking a test that requires PEFT backend with a specific version, this would require some specific
306
+ versions of PEFT and transformers.
307
+ """
308
+
309
+ def decorator(test_case):
310
+ correct_peft_version = is_peft_available() and version.parse(
311
+ version.parse(importlib.metadata.version("peft")).base_version
312
+ ) > version.parse(peft_version)
313
+ return unittest.skipUnless(
314
+ correct_peft_version, f"test requires PEFT backend with the version greater than {peft_version}"
315
+ )(test_case)
316
+
317
+ return decorator
318
+
319
+
262
320
  def deprecate_after_peft_backend(test_case):
263
321
  """
264
322
  Decorator marking a test that will be skipped after PEFT backend
@@ -766,3 +824,143 @@ def disable_full_determinism():
766
824
  os.environ["CUDA_LAUNCH_BLOCKING"] = "0"
767
825
  os.environ["CUBLAS_WORKSPACE_CONFIG"] = ""
768
826
  torch.use_deterministic_algorithms(False)
827
+
828
+
829
+ # Utils for custom and alternative accelerator devices
830
+ def _is_torch_fp16_available(device):
831
+ if not is_torch_available():
832
+ return False
833
+
834
+ import torch
835
+
836
+ device = torch.device(device)
837
+
838
+ try:
839
+ x = torch.zeros((2, 2), dtype=torch.float16).to(device)
840
+ _ = torch.mul(x, x)
841
+ return True
842
+
843
+ except Exception as e:
844
+ if device.type == "cuda":
845
+ raise ValueError(
846
+ f"You have passed a device of type 'cuda' which should work with 'fp16', but 'cuda' does not seem to be correctly installed on your machine: {e}"
847
+ )
848
+
849
+ return False
850
+
851
+
852
+ def _is_torch_fp64_available(device):
853
+ if not is_torch_available():
854
+ return False
855
+
856
+ import torch
857
+
858
+ try:
859
+ x = torch.zeros((2, 2), dtype=torch.float64).to(device)
860
+ _ = torch.mul(x, x)
861
+ return True
862
+
863
+ except Exception as e:
864
+ if device.type == "cuda":
865
+ raise ValueError(
866
+ f"You have passed a device of type 'cuda' which should work with 'fp64', but 'cuda' does not seem to be correctly installed on your machine: {e}"
867
+ )
868
+
869
+ return False
870
+
871
+
872
+ # Guard these lookups for when Torch is not used - alternative accelerator support is for PyTorch
873
+ if is_torch_available():
874
+ # Behaviour flags
875
+ BACKEND_SUPPORTS_TRAINING = {"cuda": True, "cpu": True, "mps": False, "default": True}
876
+
877
+ # Function definitions
878
+ BACKEND_EMPTY_CACHE = {"cuda": torch.cuda.empty_cache, "cpu": None, "mps": None, "default": None}
879
+ BACKEND_DEVICE_COUNT = {"cuda": torch.cuda.device_count, "cpu": lambda: 0, "mps": lambda: 0, "default": 0}
880
+ BACKEND_MANUAL_SEED = {"cuda": torch.cuda.manual_seed, "cpu": torch.manual_seed, "default": torch.manual_seed}
881
+
882
+
883
+ # This dispatches a defined function according to the accelerator from the function definitions.
884
+ def _device_agnostic_dispatch(device: str, dispatch_table: Dict[str, Callable], *args, **kwargs):
885
+ if device not in dispatch_table:
886
+ return dispatch_table["default"](*args, **kwargs)
887
+
888
+ fn = dispatch_table[device]
889
+
890
+ # Some device agnostic functions return values. Need to guard against 'None' instead at
891
+ # user level
892
+ if fn is None:
893
+ return None
894
+
895
+ return fn(*args, **kwargs)
896
+
897
+
898
+ # These are callables which automatically dispatch the function specific to the accelerator
899
+ def backend_manual_seed(device: str, seed: int):
900
+ return _device_agnostic_dispatch(device, BACKEND_MANUAL_SEED, seed)
901
+
902
+
903
+ def backend_empty_cache(device: str):
904
+ return _device_agnostic_dispatch(device, BACKEND_EMPTY_CACHE)
905
+
906
+
907
+ def backend_device_count(device: str):
908
+ return _device_agnostic_dispatch(device, BACKEND_DEVICE_COUNT)
909
+
910
+
911
+ # These are callables which return boolean behaviour flags and can be used to specify some
912
+ # device agnostic alternative where the feature is unsupported.
913
+ def backend_supports_training(device: str):
914
+ if not is_torch_available():
915
+ return False
916
+
917
+ if device not in BACKEND_SUPPORTS_TRAINING:
918
+ device = "default"
919
+
920
+ return BACKEND_SUPPORTS_TRAINING[device]
921
+
922
+
923
+ # Guard for when Torch is not available
924
+ if is_torch_available():
925
+ # Update device function dict mapping
926
+ def update_mapping_from_spec(device_fn_dict: Dict[str, Callable], attribute_name: str):
927
+ try:
928
+ # Try to import the function directly
929
+ spec_fn = getattr(device_spec_module, attribute_name)
930
+ device_fn_dict[torch_device] = spec_fn
931
+ except AttributeError as e:
932
+ # If the function doesn't exist, and there is no default, throw an error
933
+ if "default" not in device_fn_dict:
934
+ raise AttributeError(
935
+ f"`{attribute_name}` not found in '{device_spec_path}' and no default fallback function found."
936
+ ) from e
937
+
938
+ if "DIFFUSERS_TEST_DEVICE_SPEC" in os.environ:
939
+ device_spec_path = os.environ["DIFFUSERS_TEST_DEVICE_SPEC"]
940
+ if not Path(device_spec_path).is_file():
941
+ raise ValueError(f"Specified path to device specification file is not found. Received {device_spec_path}")
942
+
943
+ try:
944
+ import_name = device_spec_path[: device_spec_path.index(".py")]
945
+ except ValueError as e:
946
+ raise ValueError(f"Provided device spec file is not a Python file! Received {device_spec_path}") from e
947
+
948
+ device_spec_module = importlib.import_module(import_name)
949
+
950
+ try:
951
+ device_name = device_spec_module.DEVICE_NAME
952
+ except AttributeError:
953
+ raise AttributeError("Device spec file did not contain `DEVICE_NAME`")
954
+
955
+ if "DIFFUSERS_TEST_DEVICE" in os.environ and torch_device != device_name:
956
+ msg = f"Mismatch between environment variable `DIFFUSERS_TEST_DEVICE` '{torch_device}' and device found in spec '{device_name}'\n"
957
+ msg += "Either unset `DIFFUSERS_TEST_DEVICE` or ensure it matches device spec name."
958
+ raise ValueError(msg)
959
+
960
+ torch_device = device_name
961
+
962
+ # Add one entry here for each `BACKEND_*` dictionary.
963
+ update_mapping_from_spec(BACKEND_MANUAL_SEED, "MANUAL_SEED_FN")
964
+ update_mapping_from_spec(BACKEND_EMPTY_CACHE, "EMPTY_CACHE_FN")
965
+ update_mapping_from_spec(BACKEND_DEVICE_COUNT, "DEVICE_COUNT_FN")
966
+ update_mapping_from_spec(BACKEND_SUPPORTS_TRAINING, "SUPPORTS_TRAINING")
@@ -89,7 +89,7 @@ def is_compiled_module(module) -> bool:
89
89
  return isinstance(module, torch._dynamo.eval_frame.OptimizedModule)
90
90
 
91
91
 
92
- def fourier_filter(x_in: torch.Tensor, threshold: int, scale: int) -> torch.Tensor:
92
+ def fourier_filter(x_in: "torch.Tensor", threshold: int, scale: int) -> "torch.Tensor":
93
93
  """Fourier filter as introduced in FreeU (https://arxiv.org/abs/2309.11497).
94
94
 
95
95
  This version of the method comes from here:
@@ -121,8 +121,8 @@ def fourier_filter(x_in: torch.Tensor, threshold: int, scale: int) -> torch.Tens
121
121
 
122
122
 
123
123
  def apply_freeu(
124
- resolution_idx: int, hidden_states: torch.Tensor, res_hidden_states: torch.Tensor, **freeu_kwargs
125
- ) -> Tuple[torch.Tensor, torch.Tensor]:
124
+ resolution_idx: int, hidden_states: "torch.Tensor", res_hidden_states: "torch.Tensor", **freeu_kwargs
125
+ ) -> Tuple["torch.Tensor", "torch.Tensor"]:
126
126
  """Applies the FreeU mechanism as introduced in https:
127
127
  //arxiv.org/abs/2309.11497. Adapted from the official code repository: https://github.com/ChenyangSi/FreeU.
128
128
 
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: diffusers
3
- Version: 0.24.0
3
+ Version: 0.25.0
4
4
  Summary: State-of-the-art diffusion in PyTorch and JAX.
5
5
  Home-page: https://github.com/huggingface/diffusers
6
- Author: The HuggingFace team
6
+ Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors)
7
7
  Author-email: patrick@huggingface.co
8
- License: Apache
8
+ License: Apache 2.0 License
9
9
  Keywords: deep learning diffusion jax pytorch stable diffusion audioldm
10
- Platform: UNKNOWN
11
10
  Classifier: Development Status :: 5 - Production/Stable
12
11
  Classifier: Intended Audience :: Developers
13
12
  Classifier: Intended Audience :: Education
@@ -22,81 +21,85 @@ Classifier: Programming Language :: Python :: 3.10
22
21
  Requires-Python: >=3.8.0
23
22
  Description-Content-Type: text/markdown
24
23
  License-File: LICENSE
25
- Requires-Dist: Pillow
26
- Requires-Dist: filelock
27
- Requires-Dist: huggingface-hub (>=0.19.4)
28
24
  Requires-Dist: importlib-metadata
25
+ Requires-Dist: filelock
26
+ Requires-Dist: huggingface-hub >=0.19.4
29
27
  Requires-Dist: numpy
30
- Requires-Dist: regex (!=2019.12.17)
28
+ Requires-Dist: regex !=2019.12.17
31
29
  Requires-Dist: requests
32
- Requires-Dist: safetensors (>=0.3.1)
30
+ Requires-Dist: safetensors >=0.3.1
31
+ Requires-Dist: Pillow
33
32
  Provides-Extra: dev
34
- Requires-Dist: Jinja2 ; extra == 'dev'
35
- Requires-Dist: accelerate (>=0.11.0) ; extra == 'dev'
36
- Requires-Dist: compel (==0.1.8) ; extra == 'dev'
33
+ Requires-Dist: urllib3 <=2.0.0 ; extra == 'dev'
34
+ Requires-Dist: isort >=5.5.4 ; extra == 'dev'
35
+ Requires-Dist: ruff ==0.1.5 ; 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: GitPython <3.1.19 ; extra == 'dev'
37
39
  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'
40
+ Requires-Dist: Jinja2 ; extra == 'dev'
41
+ Requires-Dist: invisible-watermark >=0.2.0 ; extra == 'dev'
42
+ Requires-Dist: k-diffusion >=0.0.12 ; extra == 'dev'
45
43
  Requires-Dist: librosa ; extra == 'dev'
46
44
  Requires-Dist: omegaconf ; extra == 'dev'
47
45
  Requires-Dist: parameterized ; extra == 'dev'
48
- Requires-Dist: protobuf (<4,>=3.20.3) ; extra == 'dev'
49
46
  Requires-Dist: pytest ; extra == 'dev'
50
47
  Requires-Dist: pytest-timeout ; extra == 'dev'
51
48
  Requires-Dist: pytest-xdist ; extra == 'dev'
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'
49
+ Requires-Dist: requests-mock ==1.10.0 ; extra == 'dev'
50
+ Requires-Dist: safetensors >=0.3.1 ; extra == 'dev'
51
+ Requires-Dist: sentencepiece !=0.1.92,>=0.1.91 ; extra == 'dev'
55
52
  Requires-Dist: scipy ; extra == 'dev'
56
- Requires-Dist: sentencepiece (!=0.1.92,>=0.1.91) ; extra == 'dev'
57
- Requires-Dist: tensorboard ; extra == 'dev'
58
- Requires-Dist: torch (>=1.4) ; extra == 'dev'
59
53
  Requires-Dist: torchvision ; extra == 'dev'
60
- Requires-Dist: transformers (>=4.25.1) ; extra == 'dev'
61
- Requires-Dist: urllib3 (<=2.0.0) ; extra == 'dev'
54
+ Requires-Dist: transformers >=4.25.1 ; extra == 'dev'
55
+ Requires-Dist: accelerate >=0.11.0 ; extra == 'dev'
56
+ Requires-Dist: protobuf <4,>=3.20.3 ; extra == 'dev'
57
+ Requires-Dist: tensorboard ; extra == 'dev'
58
+ Requires-Dist: peft >=0.6.0 ; extra == 'dev'
59
+ Requires-Dist: torch >=1.4 ; extra == 'dev'
60
+ Requires-Dist: jax >=0.4.1 ; extra == 'dev'
61
+ Requires-Dist: jaxlib >=0.4.1 ; extra == 'dev'
62
+ Requires-Dist: flax >=0.4.1 ; extra == 'dev'
62
63
  Provides-Extra: docs
63
- Requires-Dist: hf-doc-builder (>=0.3.0) ; extra == 'docs'
64
+ Requires-Dist: hf-doc-builder >=0.3.0 ; extra == 'docs'
64
65
  Provides-Extra: flax
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'
66
+ Requires-Dist: jax >=0.4.1 ; extra == 'flax'
67
+ Requires-Dist: jaxlib >=0.4.1 ; extra == 'flax'
68
+ Requires-Dist: flax >=0.4.1 ; extra == 'flax'
68
69
  Provides-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'
70
+ Requires-Dist: urllib3 <=2.0.0 ; extra == 'quality'
71
+ Requires-Dist: isort >=5.5.4 ; extra == 'quality'
72
+ Requires-Dist: ruff ==0.1.5 ; extra == 'quality'
73
+ Requires-Dist: hf-doc-builder >=0.3.0 ; extra == 'quality'
73
74
  Provides-Extra: test
74
- Requires-Dist: Jinja2 ; extra == 'test'
75
- Requires-Dist: compel (==0.1.8) ; extra == 'test'
75
+ Requires-Dist: compel ==0.1.8 ; extra == 'test'
76
+ Requires-Dist: GitPython <3.1.19 ; extra == 'test'
76
77
  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'
78
+ Requires-Dist: Jinja2 ; extra == 'test'
79
+ Requires-Dist: invisible-watermark >=0.2.0 ; extra == 'test'
80
+ Requires-Dist: k-diffusion >=0.0.12 ; extra == 'test'
79
81
  Requires-Dist: librosa ; extra == 'test'
80
82
  Requires-Dist: omegaconf ; extra == 'test'
81
83
  Requires-Dist: parameterized ; extra == 'test'
82
84
  Requires-Dist: pytest ; extra == 'test'
83
85
  Requires-Dist: pytest-timeout ; extra == 'test'
84
86
  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: requests-mock ==1.10.0 ; extra == 'test'
88
+ Requires-Dist: safetensors >=0.3.1 ; extra == 'test'
89
+ Requires-Dist: sentencepiece !=0.1.92,>=0.1.91 ; extra == 'test'
87
90
  Requires-Dist: scipy ; extra == 'test'
88
- Requires-Dist: sentencepiece (!=0.1.92,>=0.1.91) ; extra == 'test'
89
91
  Requires-Dist: torchvision ; extra == 'test'
90
- Requires-Dist: transformers (>=4.25.1) ; extra == 'test'
92
+ Requires-Dist: transformers >=4.25.1 ; extra == 'test'
91
93
  Provides-Extra: torch
92
- Requires-Dist: accelerate (>=0.11.0) ; extra == 'torch'
93
- Requires-Dist: torch (>=1.4) ; extra == 'torch'
94
+ Requires-Dist: torch >=1.4 ; extra == 'torch'
95
+ Requires-Dist: accelerate >=0.11.0 ; extra == 'torch'
94
96
  Provides-Extra: training
95
- Requires-Dist: Jinja2 ; extra == 'training'
96
- Requires-Dist: accelerate (>=0.11.0) ; extra == 'training'
97
+ Requires-Dist: accelerate >=0.11.0 ; extra == 'training'
97
98
  Requires-Dist: datasets ; extra == 'training'
98
- Requires-Dist: protobuf (<4,>=3.20.3) ; extra == 'training'
99
+ Requires-Dist: protobuf <4,>=3.20.3 ; extra == 'training'
99
100
  Requires-Dist: tensorboard ; extra == 'training'
101
+ Requires-Dist: Jinja2 ; extra == 'training'
102
+ Requires-Dist: peft >=0.6.0 ; extra == 'training'
100
103
 
101
104
  <!---
102
105
  Copyright 2022 - The HuggingFace Team. All rights reserved.
@@ -177,7 +180,7 @@ Please refer to the [How to use Stable Diffusion in Apple Silicon](https://huggi
177
180
 
178
181
  ## Quickstart
179
182
 
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):
183
+ 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 16000+ checkpoints):
181
184
 
182
185
  ```python
183
186
  from diffusers import DiffusionPipeline
@@ -319,7 +322,7 @@ Also, say 👋 in our public Discord channel <a href="https://discord.gg/G7tWnz9
319
322
  - https://github.com/deep-floyd/IF
320
323
  - https://github.com/bentoml/BentoML
321
324
  - https://github.com/bmaltais/kohya_ss
322
- - +6000 other amazing GitHub repositories 💪
325
+ - +7000 other amazing GitHub repositories 💪
323
326
 
324
327
  Thank you for using us ❤️.
325
328
 
@@ -346,5 +349,3 @@ We also want to thank @heejkoo for the very helpful overview of papers, code and
346
349
  howpublished = {\url{https://github.com/huggingface/diffusers}}
347
350
  }
348
351
  ```
349
-
350
-