auto-diffusers 2.0.19__tar.gz → 2.0.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ include LICENSE
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: auto_diffusers
3
- Version: 2.0.19
3
+ Version: 2.0.21
4
4
  Summary: Customized diffusers with model search and other functions.
5
5
  Home-page: https://github.com/suzukimain/auto_diffusers
6
6
  Author: suzukimain
@@ -11,28 +11,19 @@ Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: Education
13
13
  Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: Apache Software License
14
15
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
16
  Classifier: Programming Language :: Python :: 3
16
17
  Classifier: Programming Language :: Python :: 3.8
17
18
  Classifier: Programming Language :: Python :: 3.9
18
19
  Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.8.0
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: torch
24
24
  Requires-Dist: diffusers
25
+ Requires-Dist: transformers
25
26
  Requires-Dist: huggingface-hub>=0.26.2
26
- Dynamic: author
27
- Dynamic: author-email
28
- Dynamic: classifier
29
- Dynamic: description
30
- Dynamic: description-content-type
31
- Dynamic: home-page
32
- Dynamic: keywords
33
- Dynamic: license
34
- Dynamic: requires-dist
35
- Dynamic: summary
36
27
 
37
28
  # auto_diffusers
38
29
 
@@ -7,15 +7,12 @@ from setuptools import find_packages, setup
7
7
  _deps = [
8
8
  "torch",
9
9
  "diffusers",
10
+ "transformers",
10
11
  "huggingface-hub>=0.26.2",
11
12
  ]
12
13
 
13
14
  deps = {b: a for a, b in (re.findall(r"^(([^!=<>~]+)(?:[!=<>~].*)?$)", x)[0] for x in _deps)}
14
15
 
15
- def read_version():
16
- with open(os.path.join(os.path.dirname(__file__), 'Version.txt')) as version_file:
17
- return version_file.read().strip()
18
-
19
16
 
20
17
  def deps_list(*pkgs):
21
18
  return [deps[pkg] for pkg in pkgs]
@@ -25,7 +22,7 @@ version_range_max = max(sys.version_info[1], 10) + 1
25
22
 
26
23
  setup(
27
24
  name="auto_diffusers",
28
- version=read_version(),
25
+ version="2.0.21",
29
26
  description="Customized diffusers with model search and other functions.",
30
27
  long_description=open("README.md", "r", encoding="utf-8").read(),
31
28
  long_description_content_type="text/markdown",
@@ -37,6 +34,7 @@ setup(
37
34
  package_dir={"": "src"},
38
35
  packages=find_packages("src"),
39
36
  package_data={"": ["py.typed"]},
37
+ python_requires=">=3.8.0",
40
38
  include_package_data=True,
41
39
  install_requires=list(_deps),
42
40
  classifiers=[
@@ -44,6 +42,7 @@ setup(
44
42
  "Intended Audience :: Developers",
45
43
  "Intended Audience :: Education",
46
44
  "Intended Audience :: Science/Research",
45
+ "License :: OSI Approved :: Apache Software License",
47
46
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
48
47
  "Programming Language :: Python :: 3",
49
48
  ]
@@ -1,3 +1,5 @@
1
+ __version__ = "2.0.21"
2
+
1
3
  from .pipeline_easy import (
2
4
  search_huggingface,
3
5
  search_civitai,
@@ -589,10 +589,18 @@ def search_huggingface(search_word: str, **kwargs) -> Union[str, SearchResult, N
589
589
  gated = kwargs.pop("gated", False)
590
590
  skip_error = kwargs.pop("skip_error", False)
591
591
 
592
+ file_list = []
593
+ hf_repo_info = {}
594
+ hf_security_info = {}
595
+ model_path = ""
596
+ repo_id, file_name = "", ""
597
+ diffusers_model_exists = False
598
+
592
599
  # Get the type and loading method for the keyword
593
600
  search_word_status = get_keyword_types(search_word)
594
601
 
595
602
  if search_word_status["type"]["hf_repo"]:
603
+ hf_repo_info = hf_api.model_info(repo_id=search_word, securityStatus=True)
596
604
  if download:
597
605
  model_path = DiffusionPipeline.download(
598
606
  search_word,
@@ -635,13 +643,6 @@ def search_huggingface(search_word: str, **kwargs) -> Union[str, SearchResult, N
635
643
  )
636
644
  model_dicts = [asdict(value) for value in list(hf_models)]
637
645
 
638
- file_list = []
639
- hf_repo_info = {}
640
- hf_security_info = {}
641
- model_path = ""
642
- repo_id, file_name = "", ""
643
- diffusers_model_exists = False
644
-
645
646
  # Loop through models to find a suitable candidate
646
647
  for repo_info in model_dicts:
647
648
  repo_id = repo_info["id"]
@@ -706,6 +707,10 @@ def search_huggingface(search_word: str, **kwargs) -> Union[str, SearchResult, N
706
707
  force_download=force_download,
707
708
  )
708
709
 
710
+ # `pathlib.PosixPath` may be returned
711
+ if model_path:
712
+ model_path = str(model_path)
713
+
709
714
  if file_name:
710
715
  download_url = f"https://huggingface.co/{repo_id}/blob/main/{file_name}"
711
716
  else:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.1
2
2
  Name: auto_diffusers
3
- Version: 2.0.19
3
+ Version: 2.0.21
4
4
  Summary: Customized diffusers with model search and other functions.
5
5
  Home-page: https://github.com/suzukimain/auto_diffusers
6
6
  Author: suzukimain
@@ -11,28 +11,19 @@ Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: Education
13
13
  Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: Apache Software License
14
15
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
16
  Classifier: Programming Language :: Python :: 3
16
17
  Classifier: Programming Language :: Python :: 3.8
17
18
  Classifier: Programming Language :: Python :: 3.9
18
19
  Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.8.0
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: torch
24
24
  Requires-Dist: diffusers
25
+ Requires-Dist: transformers
25
26
  Requires-Dist: huggingface-hub>=0.26.2
26
- Dynamic: author
27
- Dynamic: author-email
28
- Dynamic: classifier
29
- Dynamic: description
30
- Dynamic: description-content-type
31
- Dynamic: home-page
32
- Dynamic: keywords
33
- Dynamic: license
34
- Dynamic: requires-dist
35
- Dynamic: summary
36
27
 
37
28
  # auto_diffusers
38
29
 
@@ -1,7 +1,6 @@
1
1
  LICENSE
2
2
  MANIFEST.in
3
3
  README.md
4
- Version.txt
5
4
  setup.py
6
5
  src/auto_diffusers/__init__.py
7
6
  src/auto_diffusers/pipeline_easy.py
@@ -1,3 +1,4 @@
1
1
  torch
2
2
  diffusers
3
+ transformers
3
4
  huggingface-hub>=0.26.2
@@ -1,3 +0,0 @@
1
- include LICENSE
2
- include Version.txt
3
- include requirements.txt
@@ -1 +0,0 @@
1
- 2.0.19
File without changes