Skip to content

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

Description

@xxliucong

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions