You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
“ImportError: cannot import name 'OneFlowStableDiffusionPipeline' from 'diffusers'” ”TypeError: invalid dtype object: only floating-point types are supported as the default type”
#110
from diffusers import (
OneFlowStableDiffusionPipeline as StableDiffusionPipeline,
OneFlowEulerDiscreteScheduler as EulerDiscreteScheduler,
)
from diffusers import utils
改为
from onediff import OneFlowStableDiffusionPipeline as StableDiffusionPipeline
from diffusers import EulerDiscreteScheduler
from diffusers import utils
后,执行报错
==> Try to run graph save...
==> function get_pipe try to run...
get_pipe cuda mem before 2854.75 MB
get_pipe host mem before 1729.0 MB
Fetching 12 files: 100%|████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 49490.31it/s]
<frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead
E
======================================================================
ERROR: test_sd_graph_save_and_load (__main__.OneFlowPipeLineGraphSaveLoadTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/zhaodi/work/test.py", line 171, in test_sd_graph_save_and_load
_test_sd_graph_save_and_load(True, f0 ,f1, f2)
File "/home/zhaodi/work/test.py", line 76, in _test_sd_graph_save_and_load
sch, pipe = get_pipe()
File "/home/zhaodi/work/test.py", line 28, in new_fn
out = fn(*args, **kwargs)
File "/home/zhaodi/work/test.py", line 72, in get_pipe
sd_pipe = StableDiffusionPipeline.from_pretrained(
File "/home/zhaodi/miniconda3/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 739, in from_pretrained
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "/home/zhaodi/miniconda3/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2325, in from_pretrained
dtype_orig = cls._set_default_torch_dtype(torch_dtype)
File "/home/zhaodi/miniconda3/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1109, in _set_default_torch_dtype
torch.set_default_dtype(dtype)
File "/home/zhaodi/miniconda3/lib/python3.10/site-packages/torch/__init__.py", line 395, in set_default_dtype
_C._set_default_dtype(d)
TypeError: invalid dtype object: only floating-point types are supported as the default type
----------------------------------------------------------------------
Ran 1 test in 8.609s
Linux
diffusers 0.12.1
onediff 0.1.0 /home/zhaodi/onediff/src
The text was updated successfully, but these errors were encountered:
Alokia
changed the title
”TypeError: invalid dtype object: only floating-point types are supported as the default type” “ImportError: cannot import name 'OneFlowStableDiffusionPipeline' from 'diffusers'”
“ImportError: cannot import name 'OneFlowStableDiffusionPipeline' from 'diffusers'” ”TypeError: invalid dtype object: only floating-point types are supported as the default type”
Feb 17, 2023
diffusers仓库更新,原tests样例几乎全部无法执行。
参照新样例 https://github.com/Oneflow-Inc/diffusers/blob/main/examples/text_to_image_sd2.py
将 https://github.com/Oneflow-Inc/diffusers/blob/oneflow-fork/tests/test_pipelines_oneflow_graph_load.py 中的导入方式从
改为
后,执行报错
Linux
diffusers 0.12.1
onediff 0.1.0 /home/zhaodi/onediff/src
The text was updated successfully, but these errors were encountered: