AUTOMATIC1111 / stable-diffusion-webui-tensorrt

MIT License
310 stars 20 forks source link

Error loading script: trt.py #16

Open sunwukong0727 opened 1 year ago

sunwukong0727 commented 1 year ago

script_module = script_loading.load_module(scriptfile.path) File "H:\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "H:\stable-diffusion-webui\extensions\stable-diffusion-webui-tensorrt\scripts\trt.py", line 6, in from modules import script_callbacks, sd_unet, devices, shared, paths_internal ImportError: cannot import name 'sd_unet' from 'modules' (unknown location)

jepjoo commented 1 year ago

edit: found the problem: apparently need to use "dev" branch

I'm having a similar problem.

I installed 2019 c++ build tools and pycuda & onnx after which they both seem to have installed fine and errors related to those are gone. Now I get this:

Error loading script: trt.py Traceback (most recent call last): File "C:\Auto1111\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\Auto1111\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Auto1111\extensions\stable-diffusion-webui-tensorrt\scripts\trt.py", line 6, in from modules import script_callbacks, sd_unet, devices, shared, paths_internal ImportError: cannot import name 'sd_unet' from 'modules' (unknown location)

sunwukong0727 commented 1 year ago

git checkout dev 感谢jilekjosef

MxDeWitt commented 1 year ago

@sunwukong0727 @jepjoo dev branch seems to be invisible for me both in web and in Git bash when I call $ git branch -r --list from the directory of the extension. Is it visible/accessible for everyone else? How does that work?

sunwukong0727 commented 1 year ago

在stable diffution 主目录下 鼠标右键 git checkout dev

On Mon, May 29, 2023 at 5:37 PM jepjoo @.***> wrote:

I'm havin a similar problem.

I installed 2019 c++ build tools and pycuda & onnx after which they both seem to have installed fine and errors related to those are gone. Now I get this:

Error loading script: trt.py Traceback (most recent call last): File "C:\Auto1111\modules\scripts.py", line 263, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "C:\Auto1111\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Auto1111\extensions\stable-diffusion-webui-tensorrt\scripts\trt.py", line 6, in from modules import script_callbacks, sd_unet, devices, shared, paths_internal ImportError: cannot import name 'sd_unet' from 'modules' (unknown location)

— Reply to this email directly, view it on GitHub https://github.com/AUTOMATIC1111/stable-diffusion-webui-tensorrt/issues/16#issuecomment-1566853235, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6ZIEIEY3W7XBWQGVAKOJGTXIRU6PANCNFSM6AAAAAAYSQTUBU . You are receiving this because you authored the thread.Message ID: @.*** .com>

zaazii commented 1 year ago

Excuse my noobness but how can I get the "dev" branch? Or what should I do before I type "git checkout dev"?

TigerFox57 commented 1 year ago

@sunwukong0727 @jepjoo dev branch seems to be invisible for me both in web and in Git bash when I call $ git branch -r --list from the directory of the extension. Is it visible/accessible for everyone else? How does that work?

I think you have to do git checkout dev from the directory of the main repo, not the extension.

sunwukong0727 commented 1 year ago

Find a blank space in the main directory of stable diffusion, right-click on git base, and enter git checkout dev

On Mon, May 29, 2023 at 11:07 PM zaazii @.***> wrote:

Excuse my noobness but how can I get the "dev" branch?

— Reply to this email directly, view it on GitHub https://github.com/AUTOMATIC1111/stable-diffusion-webui-tensorrt/issues/16#issuecomment-1567254789, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6ZIEIEHLOZ3HZIY45AAOKLXIS3RVANCNFSM6AAAAAAYSQTUBU . You are receiving this because you were mentioned.Message ID: @.*** .com>

zaazii commented 1 year ago

Thank you. It said branch is up to date with origin\dev. But I am still getting the Error loading script: trt.py

Xility-Wil commented 1 year ago

Thank you. It said branch is up to date with origin\dev. But I am still getting the Error loading script: trt.py

I am also getting the same error despite being on dev.

No module 'xformers'. Proceeding without it. Error loading script: trt.py Traceback (most recent call last): File "E:\StableDiffusion\web-ui\modules\scripts.py", line 256, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\StableDiffusion\web-ui\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\StableDiffusion\web-ui\extensions\stable-diffusion-webui-tensorrt\scripts\trt.py", line 6, in from modules import script_callbacks, sd_unet, devices, shared, paths_internal ImportError: cannot import name 'sd_unet' from 'modules' (unknown location)

Proof on dev branch:

PS E:\StableDiffusion\web-ui> git checkout dev Already on 'dev' Your branch is up to date with 'origin/dev'

papuSpartan commented 1 year ago

Did you guys fetch the latest changes to dev with git fetch --all (or equivalent)?

Xility-Wil commented 1 year ago

Did you guys fetch the latest changes to dev with git fetch --all (or equivalent)?

I can confirm about an hour after I originally posted, I realized I forgot to pull the new branch 🤦‍♂️

4lt3r3go commented 1 year ago

i did all and still get Error loading script: trt.py

CyberTimon commented 1 year ago

(base) cybertimon@server:~/Repositories/stable-diffusion-webui/extensions/stable-diffusion-webui-tensorrt$ git checkout dev error: pathspec 'dev' did not match any file(s) known to git

I get this error everytime I try to checkout to dev branch. Any help?