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
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Exception: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
cuda 12.2
nvidia:a6000 ada
onediff:1.9.1
No matter what method I use to specify the graphics card or set the number of graphics cards, this CUDA error is always reported
🐛 Describe the bug
(sd3) (base) ubuntu@kemove-Z690-GAMING-X-DDR4-V2:~/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors$ CUDA_VISIBLE_DEVICES=0 python text_to_image_kolors.py --compiler oneflow
/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/xformers/ops/fmha/flash.py:211: FutureWarning: torch.library.impl_abstract was renamed to torch.library.register_fake. Please use that instead; we will remove torch.library.impl_abstract in a future version of PyTorch.
@torch.library.impl_abstract("xformers_flash::flash_fwd")
/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/xformers/ops/fmha/flash.py:344: FutureWarning: torch.library.impl_abstract was renamed to torch.library.register_fake. Please use that instead; we will remove torch.library.impl_abstract in a future version of PyTorch.
@torch.library.impl_abstract("xformers_flash::flash_bwd")
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 15.01it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 11.53it/s]
oneflow backend compile...
Could not load bitsandbytes native library: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 109, in
lib = get_native_library()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 88, in get_native_library
cuda_specs = get_cuda_specs()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cuda_specs.py", line 38, in get_cuda_specs
highest_compute_capability=(get_compute_capabilities()[-1]),
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cuda_specs.py", line 19, in get_compute_capabilities
return sorted(torch.cuda.get_device_capability(torch.cuda.device(i)) for i in range(torch.cuda.device_count()))
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cuda_specs.py", line 19, in
return sorted(torch.cuda.get_device_capability(torch.cuda.device(i)) for i in range(torch.cuda.device_count()))
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
CUDA Setup failed despite CUDA being available. Please run the following command to get more information:
python -m bitsandbytes
Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues
WARNING [2024-12-02 16:26:22] /home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/custom_transform.py:48 - Failed to import register_diffusers from /home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/infer_compiler_registry/register_diffusers. e=RuntimeError("Failed to import diffusers.models.unets because of the following error (look up to see its traceback):\n_get_device_properties(): incompatible function arguments. The following argument types are supported:\n 1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties\n\nInvoked with: 'cuda:0'")
Starting warmup...
0%| | 0/50 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 170, in _get_module
return importlib.import_module(module_name)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/init.py", line 5, in
from .unet_1d import UNet1DModel
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/unet_1d.py", line 24, in
from ..modeling_utils import ModelMixin
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 35, in
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/init.py", line 15, in
from .auto import DiffusersAutoQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/auto.py", line 21, in
from .bitsandbytes import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/init.py", line 2, in
from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/utils.py", line 32, in
import bitsandbytes as bnb
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/init.py", line 6, in
from . import research, utils
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/init.py", line 2, in
from .autograd._functions import (
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/autograd/_functions.py", line 8, in
from bitsandbytes.autograd._functions import GlobalOutlierPooler, MatmulLtState
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/init.py", line 1, in
from ._functions import get_inverse_transform_indices, undo_layout
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 244, in
class MatmulLtState:
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 266, in MatmulLtState
formatB = F.get_special_format_str()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/functional.py", line 413, in get_special_format_str
major, _minor = torch.cuda.get_device_capability()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 41, in wrapper
result = dispatcher(first_param, *args, **kwargs)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/functools.py", line 889, in wrapper
return dispatch(args[0].class)(*args, **kw)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 199, in _
new_md_cls = proxy_class(type(mod))
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 66, in proxy_class
raise RuntimeError(
RuntimeError: An exception occurred during class transformation:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 170, in _get_module
return importlib.import_module(module_name)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/init.py", line 5, in
from .unet_1d import UNet1DModel
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/unet_1d.py", line 24, in
from ..modeling_utils import ModelMixin
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 35, in
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/init.py", line 15, in
from .auto import DiffusersAutoQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/auto.py", line 21, in
from .bitsandbytes import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/init.py", line 2, in
from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/utils.py", line 32, in
import bitsandbytes as bnb
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/init.py", line 6, in
from . import research, utils
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/init.py", line 2, in
from .autograd._functions import (
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/autograd/_functions.py", line 8, in
from bitsandbytes.autograd._functions import GlobalOutlierPooler, MatmulLtState
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/init.py", line 1, in
from ._functions import get_inverse_transform_indices, undo_layout
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 244, in
class MatmulLtState:
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 266, in MatmulLtState
formatB = F.get_special_format_str()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/functional.py", line 413, in get_special_format_str
major, _minor = torch.cuda.get_device_capability()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Exception: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors/text_to_image_kolors.py", line 204, in
main()
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors/text_to_image_kolors.py", line 177, in main
kolors.warmup(gen_args, args.warmup_iterations)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors/text_to_image_kolors.py", line 119, in warmup
self.pipe(**warmup_args)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/pipelines/kolors/pipeline_kolors.py", line 993, in call
noise_pred = self.unet(
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1603, in _call_impl
result = forward_call(*args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/deployable_module.py", line 38, in wrapper
return func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/online_quantization_utils.py", line 65, in wrapper
output = func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/graph_management_utils.py", line 123, in wrapper
ret = func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/args_tree_util.py", line 72, in wrapper
graph_file_management(func)(self, *mapped_args, **mapped_kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/graph_management_utils.py", line 123, in wrapper
ret = func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/deployable_module.py", line 142, in forward
dpl_graph = self.get_graph()
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/deployable_module.py", line 108, in get_graph
self._deployable_module_model.oneflow_module,
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/dual_module.py", line 30, in oneflow_module
self._oneflow_module = torch2oflow(self._torch_module)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 43, in wrapper
raise NotImplementedError(f"Transform failed of {type(first_param)}: {e}")
NotImplementedError: Transform failed of <class 'diffusers.models.unets.unet_2d_condition.UNet2DConditionModel'>: An exception occurred during class transformation:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 170, in _get_module
return importlib.import_module(module_name)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/init.py", line 5, in
from .unet_1d import UNet1DModel
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/unet_1d.py", line 24, in
from ..modeling_utils import ModelMixin
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 35, in
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/init.py", line 15, in
from .auto import DiffusersAutoQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/auto.py", line 21, in
from .bitsandbytes import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/init.py", line 2, in
from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/utils.py", line 32, in
import bitsandbytes as bnb
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/init.py", line 6, in
from . import research, utils
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/init.py", line 2, in
from .autograd._functions import (
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/autograd/_functions.py", line 8, in
from bitsandbytes.autograd._functions import GlobalOutlierPooler, MatmulLtState
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/init.py", line 1, in
from ._functions import get_inverse_transform_indices, undo_layout
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 244, in
class MatmulLtState:
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 266, in MatmulLtState
formatB = F.get_special_format_str()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/functional.py", line 413, in get_special_format_str
major, _minor = torch.cuda.get_device_capability()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Exception: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The text was updated successfully, but these errors were encountered:
Your current environment information
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Exception: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
cuda 12.2
nvidia:a6000 ada
onediff:1.9.1
No matter what method I use to specify the graphics card or set the number of graphics cards, this CUDA error is always reported
🐛 Describe the bug
(sd3) (base) ubuntu@kemove-Z690-GAMING-X-DDR4-V2:~/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors$ CUDA_VISIBLE_DEVICES=0 python text_to_image_kolors.py --compiler oneflow
/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/xformers/ops/fmha/flash.py:211: FutureWarning:
torch.library.impl_abstract
was renamed totorch.library.register_fake
. Please use that instead; we will removetorch.library.impl_abstract
in a future version of PyTorch.@torch.library.impl_abstract("xformers_flash::flash_fwd")
/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/xformers/ops/fmha/flash.py:344: FutureWarning:
torch.library.impl_abstract
was renamed totorch.library.register_fake
. Please use that instead; we will removetorch.library.impl_abstract
in a future version of PyTorch.@torch.library.impl_abstract("xformers_flash::flash_bwd")
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 15.01it/s]
Loading pipeline components...: 100%|████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 11.53it/s]
oneflow backend compile...
Could not load bitsandbytes native library: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 109, in
lib = get_native_library()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cextension.py", line 88, in get_native_library
cuda_specs = get_cuda_specs()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cuda_specs.py", line 38, in get_cuda_specs
highest_compute_capability=(get_compute_capabilities()[-1]),
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cuda_specs.py", line 19, in get_compute_capabilities
return sorted(torch.cuda.get_device_capability(torch.cuda.device(i)) for i in range(torch.cuda.device_count()))
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/cuda_specs.py", line 19, in
return sorted(torch.cuda.get_device_capability(torch.cuda.device(i)) for i in range(torch.cuda.device_count()))
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
CUDA Setup failed despite CUDA being available. Please run the following command to get more information:
python -m bitsandbytes
Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues
WARNING [2024-12-02 16:26:22] /home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/custom_transform.py:48 - Failed to import register_diffusers from /home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/infer_compiler_registry/register_diffusers. e=RuntimeError("Failed to import diffusers.models.unets because of the following error (look up to see its traceback):\n_get_device_properties(): incompatible function arguments. The following argument types are supported:\n 1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties\n\nInvoked with: 'cuda:0'")
Starting warmup...
0%| | 0/50 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 170, in _get_module
return importlib.import_module(module_name)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/init.py", line 5, in
from .unet_1d import UNet1DModel
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/unet_1d.py", line 24, in
from ..modeling_utils import ModelMixin
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 35, in
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/init.py", line 15, in
from .auto import DiffusersAutoQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/auto.py", line 21, in
from .bitsandbytes import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/init.py", line 2, in
from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/utils.py", line 32, in
import bitsandbytes as bnb
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/init.py", line 6, in
from . import research, utils
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/init.py", line 2, in
from .autograd._functions import (
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/autograd/_functions.py", line 8, in
from bitsandbytes.autograd._functions import GlobalOutlierPooler, MatmulLtState
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/init.py", line 1, in
from ._functions import get_inverse_transform_indices, undo_layout
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 244, in
class MatmulLtState:
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 266, in MatmulLtState
formatB = F.get_special_format_str()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/functional.py", line 413, in get_special_format_str
major, _minor = torch.cuda.get_device_capability()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 41, in wrapper
result = dispatcher(first_param, *args, **kwargs)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/functools.py", line 889, in wrapper
return dispatch(args[0].class)(*args, **kw)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 199, in _
new_md_cls = proxy_class(type(mod))
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 66, in proxy_class
raise RuntimeError(
RuntimeError: An exception occurred during class transformation:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 170, in _get_module
return importlib.import_module(module_name)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/init.py", line 5, in
from .unet_1d import UNet1DModel
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/unet_1d.py", line 24, in
from ..modeling_utils import ModelMixin
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 35, in
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/init.py", line 15, in
from .auto import DiffusersAutoQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/auto.py", line 21, in
from .bitsandbytes import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/init.py", line 2, in
from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/utils.py", line 32, in
import bitsandbytes as bnb
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/init.py", line 6, in
from . import research, utils
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/init.py", line 2, in
from .autograd._functions import (
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/autograd/_functions.py", line 8, in
from bitsandbytes.autograd._functions import GlobalOutlierPooler, MatmulLtState
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/init.py", line 1, in
from ._functions import get_inverse_transform_indices, undo_layout
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 244, in
class MatmulLtState:
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 266, in MatmulLtState
formatB = F.get_special_format_str()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/functional.py", line 413, in get_special_format_str
major, _minor = torch.cuda.get_device_capability()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Exception: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors/text_to_image_kolors.py", line 204, in
main()
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors/text_to_image_kolors.py", line 177, in main
kolors.warmup(gen_args, args.warmup_iterations)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/onediff_diffusers_extensions/examples/kolors/text_to_image_kolors.py", line 119, in warmup
self.pipe(**warmup_args)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/pipelines/kolors/pipeline_kolors.py", line 993, in call
noise_pred = self.unet(
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1603, in _call_impl
result = forward_call(*args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/deployable_module.py", line 38, in wrapper
return func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/online_quantization_utils.py", line 65, in wrapper
output = func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/graph_management_utils.py", line 123, in wrapper
ret = func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/args_tree_util.py", line 72, in wrapper
graph_file_management(func)(self, *mapped_args, **mapped_kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/graph_management_utils.py", line 123, in wrapper
ret = func(self, *args, **kwargs)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/deployable_module.py", line 142, in forward
dpl_graph = self.get_graph()
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/deployable_module.py", line 108, in get_graph
self._deployable_module_model.oneflow_module,
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/dual_module.py", line 30, in oneflow_module
self._oneflow_module = torch2oflow(self._torch_module)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 43, in wrapper
raise NotImplementedError(f"Transform failed of {type(first_param)}: {e}")
NotImplementedError: Transform failed of <class 'diffusers.models.unets.unet_2d_condition.UNet2DConditionModel'>: An exception occurred during class transformation:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 170, in _get_module
return importlib.import_module(module_name)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/init.py", line 5, in
from .unet_1d import UNet1DModel
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/unets/unet_1d.py", line 24, in
from ..modeling_utils import ModelMixin
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 35, in
from ..quantizers import DiffusersAutoQuantizer, DiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/init.py", line 15, in
from .auto import DiffusersAutoQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/auto.py", line 21, in
from .bitsandbytes import BnB4BitDiffusersQuantizer, BnB8BitDiffusersQuantizer
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/init.py", line 2, in
from .utils import dequantize_and_replace, dequantize_bnb_weight, replace_with_bnb_linear
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/diffusers/quantizers/bitsandbytes/utils.py", line 32, in
import bitsandbytes as bnb
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/init.py", line 6, in
from . import research, utils
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/init.py", line 2, in
from .autograd._functions import (
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/research/autograd/_functions.py", line 8, in
from bitsandbytes.autograd._functions import GlobalOutlierPooler, MatmulLtState
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/init.py", line 1, in
from ._functions import get_inverse_transform_indices, undo_layout
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 244, in
class MatmulLtState:
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 266, in MatmulLtState
formatB = F.get_special_format_str()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/bitsandbytes/functional.py", line 413, in get_special_format_str
major, _minor = torch.cuda.get_device_capability()
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 76, in get_device_capability
device_prop = get_device_properties(device)
File "/home/ubuntu/miniconda3/envs/sd3/lib/python3.10/site-packages/oneflow/cuda/init.py", line 56, in get_device_properties
return flow._oneflow_internal._get_device_properties(device)
TypeError: _get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/builtin_transform.py", line 62, in proxy_class
out = transform_mgr.transform_cls(cls)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 84, in transform_cls
mock_cls = self._transform_entity(mock_full_cls_name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/transform/manager.py", line 61, in _transform_entity
result = self.mocker.mock_entity(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 95, in mock_entity
return self.load_entity_with_mock(entity)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/importer.py", line 133, in load_entity_with_mock
mock_pkg = getattr(mock_pkg, name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 185, in getattr
obj_entity = self._get_module(name)
File "/home/ubuntu/16T/lsm/ComfyUI_bf/onediff1/src/onediff/infer_compiler/backends/oneflow/import_tools/dyn_mock_mod.py", line 172, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
Exception: Failed to import diffusers.models.unets because of the following error (look up to see its traceback):
_get_device_properties(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> oneflow._oneflow_internal._CudaDeviceProperties
Invoked with: 'cuda:0'
The text was updated successfully, but these errors were encountered: