auto-diffusers 1.4.3__py3-none-any.whl → 1.4.7__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/model_path/create_pipeline.py +2 -2
- auto_diffusers/setup/base_config.py +1 -2
- auto_diffusers/setup/device_config.py +7 -32
- {auto_diffusers-1.4.3.dist-info → auto_diffusers-1.4.7.dist-info}/METADATA +1 -2
- {auto_diffusers-1.4.3.dist-info → auto_diffusers-1.4.7.dist-info}/RECORD +8 -8
- {auto_diffusers-1.4.3.dist-info → auto_diffusers-1.4.7.dist-info}/LICENSE +0 -0
- {auto_diffusers-1.4.3.dist-info → auto_diffusers-1.4.7.dist-info}/WHEEL +0 -0
- {auto_diffusers-1.4.3.dist-info → auto_diffusers-1.4.7.dist-info}/top_level.txt +0 -0
|
@@ -251,6 +251,6 @@ class pipeline_setup(Config_Mix):
|
|
|
251
251
|
self.logger.debug(a)
|
|
252
252
|
raise OSError("Check your internet connection")
|
|
253
253
|
base_pipe = self.pipe_status_check(base_pipe)
|
|
254
|
-
if self.
|
|
254
|
+
if self.device == "cpu" and base_pipe.dtype == torch.float16:
|
|
255
255
|
self.logger.warning("CPU cannot use base_pipe with half precision (torch.float16)")
|
|
256
|
-
return base_pipe, params, model_dict["url_or_path"]
|
|
256
|
+
return base_pipe, params, model_dict["url_or_path"]
|
|
@@ -22,8 +22,7 @@ class Basic_config(
|
|
|
22
22
|
def __init__(self):
|
|
23
23
|
super().__init__()
|
|
24
24
|
self.device_count = self.count_device()
|
|
25
|
-
self.
|
|
26
|
-
self.device = self.extra_device_set()
|
|
25
|
+
self.device = self.device_type_check()
|
|
27
26
|
self.use_TPU = self.is_TPU()
|
|
28
27
|
self.logger = custom_logger()
|
|
29
28
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import torch
|
|
1
2
|
import jax
|
|
2
|
-
import tensorflow as tf
|
|
3
3
|
|
|
4
4
|
from ..utils.get_custom_logger import custom_logger
|
|
5
5
|
|
|
@@ -10,39 +10,14 @@ class device_set:
|
|
|
10
10
|
self.logger = custom_logger()
|
|
11
11
|
|
|
12
12
|
def device_type_check(self):
|
|
13
|
-
if
|
|
14
|
-
device_type = "cuda"
|
|
15
|
-
else:
|
|
16
|
-
try:
|
|
17
|
-
tpu = tf.distribute.cluster_resolver.TPUClusterResolver() # TPUの検出
|
|
18
|
-
tf.tpu.experimental.initialize_tpu_system(tpu)
|
|
19
|
-
device_type = "TPU"
|
|
20
|
-
except ValueError:
|
|
21
|
-
device_type = "cpu"
|
|
22
|
-
return device_type
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def extra_device_type_check(self):
|
|
26
|
-
_device_type = jax.devices()[0].device_kind
|
|
27
|
-
if "TPU" in _device_type:
|
|
28
|
-
return "TPU"
|
|
29
|
-
elif "cpu" in _device_type:
|
|
30
|
-
return "cpu"
|
|
31
|
-
else:
|
|
13
|
+
if torch.cuda.is_available():
|
|
32
14
|
return "cuda"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
def extra_device_set(self):
|
|
36
|
-
device_type = self.device_type_check()
|
|
37
|
-
|
|
38
|
-
if device_type == "TPU":
|
|
39
|
-
#import torch_xla.core.xla_model as xm
|
|
40
|
-
#device = xm.xla_device()
|
|
41
|
-
device = tf.distribute.cluster_resolver.TPUClusterResolver() # TPUの検出
|
|
42
|
-
tf.tpu.experimental.initialize_tpu_system(device)
|
|
43
15
|
else:
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
device_type = jax.devices()[0].device_kind
|
|
17
|
+
if "TPU" in device_type:
|
|
18
|
+
return "TPU"
|
|
19
|
+
else:
|
|
20
|
+
return "cpu"
|
|
46
21
|
|
|
47
22
|
|
|
48
23
|
def count_device(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto_diffusers
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.7
|
|
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
|
|
@@ -24,7 +24,6 @@ Requires-Dist: diffusers
|
|
|
24
24
|
Requires-Dist: transformers
|
|
25
25
|
Requires-Dist: huggingface-hub
|
|
26
26
|
Requires-Dist: safetensors
|
|
27
|
-
Requires-Dist: tensorflow
|
|
28
27
|
Requires-Dist: requests
|
|
29
28
|
Requires-Dist: torch
|
|
30
29
|
Requires-Dist: jax
|
|
@@ -7,16 +7,16 @@ auto_diffusers/checker/checkpoint_type.py,sha256=h3lf-eV6LAiTttKl--Mxp8ELlrRIy6U
|
|
|
7
7
|
auto_diffusers/checker/get_checkpoint_type.py,sha256=Y9nawLezNYsFzNUEpUsW_Z5LN5kYwN_Xgl4VnBXetlQ,6180
|
|
8
8
|
auto_diffusers/checker/memorize_config.py,sha256=OaIXnZJYA4vxabfzpMmmB-8n5XUB2RmwWvda397LNQM,2704
|
|
9
9
|
auto_diffusers/model_path/__init__.py,sha256=ggvMuZ0KkqOFw-ngAkCteMRnRURxcIIAL8uXZEvRcSg,83
|
|
10
|
-
auto_diffusers/model_path/create_pipeline.py,sha256
|
|
10
|
+
auto_diffusers/model_path/create_pipeline.py,sha256=-u2j-va8wj-r9g6IdHsFbAWsEEXhF0vPRDptYP4NP6Q,10526
|
|
11
11
|
auto_diffusers/model_path/flax_config.py,sha256=7B9TAVQZUJJU-bxWsl6djFHiT5g-QADW80BZbWGGSCA,2703
|
|
12
12
|
auto_diffusers/model_path/mix_class.py,sha256=LJw_nEOdfCVDeGZYXaduMpyF4PxkWgsm1fk6Lsap3h4,315
|
|
13
13
|
auto_diffusers/model_path/perform_path_search.py,sha256=gzHR2LKVH3-ZkO_gCitdoDhcG2B6Gcfyhx7fvcxqhkY,12721
|
|
14
14
|
auto_diffusers/model_path/search_civitai.py,sha256=ok1Uj-EmhVU_biQqGW1aDBnmcTJIzD_mtvbbDRdWxIY,14012
|
|
15
15
|
auto_diffusers/model_path/search_hugface.py,sha256=8cr5VJ7qpF2vkdHfRE6ffws6Hd7Mmi24GrXK8bc00O4,18933
|
|
16
16
|
auto_diffusers/setup/__init__.py,sha256=XcM_nPfzhHFdAnO1nOC1q_Mb0x5L4BeRDEEsXZLSQNQ,37
|
|
17
|
-
auto_diffusers/setup/base_config.py,sha256=
|
|
17
|
+
auto_diffusers/setup/base_config.py,sha256=o6BtsKdhkiETGvgi-6puviQD-5eiebaEbo7LZPqMWR4,6201
|
|
18
18
|
auto_diffusers/setup/data_class.py,sha256=KRdYBp2ftBulF5b1ayOoXDHh6U0971GFrareL64rsX0,5359
|
|
19
|
-
auto_diffusers/setup/device_config.py,sha256=
|
|
19
|
+
auto_diffusers/setup/device_config.py,sha256=9VIZAqn6UG8vO3Qex_cks_wV0932cTWxGlgG-S4Ov8c,696
|
|
20
20
|
auto_diffusers/setup/runtime_config.py,sha256=7fe_CA0elfrvP-1zE5iEKb8LqWb-WtCpc3oV_WSwvvc,1514
|
|
21
21
|
auto_diffusers/utils/__init__.py,sha256=KUdilmrFVMPVhVWyP10TPVeO_vJG2n29zN2oQiG0OV8,34
|
|
22
22
|
auto_diffusers/utils/device_config.py,sha256=M196cFg7kuZsMTicPGeucKCNkjFu_oBmQIsK0gQnnU8,948
|
|
@@ -24,8 +24,8 @@ auto_diffusers/utils/get_custom_logger.py,sha256=y8cRyt9y3fFR6eiXiXeV0Nk100F_osm
|
|
|
24
24
|
auto_diffusers/utils/hide_warning.py,sha256=jfanB36r5KyzPvIjw68kP4lkD0I-gs2K_Zk6Q-QC0X8,208
|
|
25
25
|
auto_diffusers/utils/process_bar.py,sha256=0quPhArlQGUfi6uniokUoDNmR_6eNeL9QPEiXtXtOYQ,4922
|
|
26
26
|
auto_diffusers/utils/run_download.py,sha256=nSPWrvFUqIprw6Q1KklrhCEkVVHCFpWEemKxJfFTyRU,3943
|
|
27
|
-
auto_diffusers-1.4.
|
|
28
|
-
auto_diffusers-1.4.
|
|
29
|
-
auto_diffusers-1.4.
|
|
30
|
-
auto_diffusers-1.4.
|
|
31
|
-
auto_diffusers-1.4.
|
|
27
|
+
auto_diffusers-1.4.7.dist-info/LICENSE,sha256=zf63-8GgkO9_0eeAUPRJu_yrc7xhedOdjlJzi6WhelM,1497
|
|
28
|
+
auto_diffusers-1.4.7.dist-info/METADATA,sha256=DKPNVSVhMHDnz7Yk-ZUI0cgA8Cnamx_JXlirXTSGSNs,6094
|
|
29
|
+
auto_diffusers-1.4.7.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
30
|
+
auto_diffusers-1.4.7.dist-info/top_level.txt,sha256=iYkbnc9T-VKVnoCP6AufdXcDUfUaLZ_yMG-USuYf4UQ,15
|
|
31
|
+
auto_diffusers-1.4.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|