Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。 #438

Open
2 tasks done
xxliucong opened this issue Aug 9, 2024 · 2 comments

Comments

@xxliucong
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Is EasyPhoto the latest version?

  • I have updated EasyPhoto to the latest version and the bug still exists.

What happened?

训练LORA时报错提示:ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。具体如下:

Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors for some common causes and solutions.
If you need help, create an issue at https://github.com/tensorflow/tensorflow/issues and include the entire stack trace above this error message.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\extensions\sd-webui-EasyPhoto\scripts\train_kohya\train_lora.py", line 42, in
from diffusers import DDPMScheduler, DPMSolverMultistepScheduler, StableDiffusionInpaintPipeline
File "", line 1075, in _handle_fromlist
File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 701, in getattr
value = getattr(module, name)
File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 701, in getattr
value = getattr(module, name)
File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 700, in getattr
module = self._get_module(self._class_to_module[name])
File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 712, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_inpaint because of the following error (look up to see its traceback):
Failed to import transformers.models.clip.image_processing_clip because of the following error (look up to see its traceback):
Traceback (most recent call last):
File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 70, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。

Steps to reproduce the problem

  1. 点击开始训练之后报错

What should have happened?

正常完成训练

Commit where the problem happens

webui:
EastPhoto:

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

List of enabled extensions

9ea002e08caeda21ff70b0003324d34

Console logs

Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors for some common causes and solutions.
If you need help, create an issue at https://github.com/tensorflow/tensorflow/issues and include the entire stack trace above this error message.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\extensions\sd-webui-EasyPhoto\scripts\train_kohya\train_lora.py", line 42, in <module>
    from diffusers import DDPMScheduler, DPMSolverMultistepScheduler, StableDiffusionInpaintPipeline
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 701, in __getattr__
    value = getattr(module, name)
  File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 701, in __getattr__
    value = getattr(module, name)
  File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 700, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\diffusers\utils\import_utils.py", line 712, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_inpaint because of the following error (look up to see its traceback):
Failed to import transformers.models.clip.image_processing_clip because of the following error (look up to see its traceback):
Traceback (most recent call last):
  File "D:\sd-webui-aki-v4.8\sd-webui-aki-v4.8\sd-webui-aki-v4.8\python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 70, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: 动态链接库(DLL)初始化例程失败。

Additional information

No response

@l378500947
Copy link

我也遇到了,不知道如何解决

@l378500947
Copy link

我在主板BIOS设置里打开了AVX2指令集,这个报错消失了,你可以尝试一下。
I opened the AVX2 Instruction Set Architecture in the main board BIOS settings, and this error disappeared. You can try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants