auto-diffusers 2.0.18__py3-none-any.whl → 2.0.20__py3-none-any.whl
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.
- auto_diffusers/__init__.py +2 -0
- auto_diffusers/pipeline_easy.py +17 -12
- {auto_diffusers-2.0.18.dist-info → auto_diffusers-2.0.20.dist-info}/METADATA +14 -2
- auto_diffusers-2.0.20.dist-info/RECORD +8 -0
- {auto_diffusers-2.0.18.dist-info → auto_diffusers-2.0.20.dist-info}/WHEEL +1 -1
- auto_diffusers-2.0.18.dist-info/RECORD +0 -8
- {auto_diffusers-2.0.18.dist-info → auto_diffusers-2.0.20.dist-info}/LICENSE +0 -0
- {auto_diffusers-2.0.18.dist-info → auto_diffusers-2.0.20.dist-info}/top_level.txt +0 -0
auto_diffusers/__init__.py
CHANGED
auto_diffusers/pipeline_easy.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2025 suzukimain
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -17,7 +17,7 @@ import os
|
|
|
17
17
|
import re
|
|
18
18
|
import types
|
|
19
19
|
from collections import OrderedDict
|
|
20
|
-
from dataclasses import asdict, dataclass
|
|
20
|
+
from dataclasses import asdict, dataclass, field
|
|
21
21
|
from typing import Dict, List, Optional, Union
|
|
22
22
|
|
|
23
23
|
import requests
|
|
@@ -321,9 +321,9 @@ class SearchResult:
|
|
|
321
321
|
model_path: str = ""
|
|
322
322
|
loading_method: Union[str, None] = None
|
|
323
323
|
checkpoint_format: Union[str, None] = None
|
|
324
|
-
repo_status: RepoStatus = RepoStatus
|
|
325
|
-
model_status: ModelStatus = ModelStatus
|
|
326
|
-
extra_status: ExtraStatus = ExtraStatus
|
|
324
|
+
repo_status: RepoStatus = field(default_factory=RepoStatus)
|
|
325
|
+
model_status: ModelStatus = field(default_factory=ModelStatus)
|
|
326
|
+
extra_status: ExtraStatus = field(default_factory=ExtraStatus)
|
|
327
327
|
|
|
328
328
|
|
|
329
329
|
@validate_hf_hub_args
|
|
@@ -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.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: auto_diffusers
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.20
|
|
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,6 +11,7 @@ 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
|
|
@@ -22,7 +23,18 @@ Description-Content-Type: text/markdown
|
|
|
22
23
|
License-File: LICENSE
|
|
23
24
|
Requires-Dist: torch
|
|
24
25
|
Requires-Dist: diffusers
|
|
26
|
+
Requires-Dist: transformers
|
|
25
27
|
Requires-Dist: huggingface-hub>=0.26.2
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: requires-dist
|
|
37
|
+
Dynamic: summary
|
|
26
38
|
|
|
27
39
|
# auto_diffusers
|
|
28
40
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
auto_diffusers/__init__.py,sha256=3F2JjAz8ifuVBXv7uHHhnZi7iCoFLvTwx5cb-xzpxqk,228
|
|
2
|
+
auto_diffusers/pipeline_easy.py,sha256=cx3vRXgeyWmIaOaIJplaC9FH-h6p4W0AmYM-7bhRnaE,92593
|
|
3
|
+
auto_diffusers/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
auto_diffusers-2.0.20.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
+
auto_diffusers-2.0.20.dist-info/METADATA,sha256=MRXIbpeDeo5lOXtJuBmeu6JGtBHcRDZmtJilDxHDO6U,10210
|
|
6
|
+
auto_diffusers-2.0.20.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
7
|
+
auto_diffusers-2.0.20.dist-info/top_level.txt,sha256=iYkbnc9T-VKVnoCP6AufdXcDUfUaLZ_yMG-USuYf4UQ,15
|
|
8
|
+
auto_diffusers-2.0.20.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
auto_diffusers/__init__.py,sha256=2VKCeWUc38yM2JVLhR9oqSQMC6513XEWPuBzk2pdRrM,204
|
|
2
|
-
auto_diffusers/pipeline_easy.py,sha256=UdThaZqwqNkTTFNIQApkFIcQImHEO6qpxEbkuuq4vr8,92365
|
|
3
|
-
auto_diffusers/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
auto_diffusers-2.0.18.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
-
auto_diffusers-2.0.18.dist-info/METADATA,sha256=v2IvranqZWMl8ghgTzXrvOP3Qk9BFCoTDPzwkrPhMS4,9912
|
|
6
|
-
auto_diffusers-2.0.18.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
7
|
-
auto_diffusers-2.0.18.dist-info/top_level.txt,sha256=iYkbnc9T-VKVnoCP6AufdXcDUfUaLZ_yMG-USuYf4UQ,15
|
|
8
|
-
auto_diffusers-2.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|