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]: Tmp Folder [WinError5] Permission Error #2482

Closed
1 task done
Talshiar2 opened this issue Jan 16, 2024 · 8 comments · Fixed by #2493
Closed
1 task done

[Bug]: Tmp Folder [WinError5] Permission Error #2482

Talshiar2 opened this issue Jan 16, 2024 · 8 comments · Fixed by #2493
Labels
wontfix This will not be worked on

Comments

@Talshiar2
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

What happened?

I tried installing ControlNet via link and via extension tab, always run in this problem, other extensions loaded problem free.

Steps to reproduce the problem

  1. Go to extension, for sd-webui-controlnet
    manipulations]
  2. Press/hit "install"

What should have happened?

It should have installed ControlNet

Commit where the problem happens

webui: 1.7.0
controlnet: n/a --> happens at installing it

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

set COMMANDLINE_ARGS=--use-directml --onnx --skip-torch-cuda-test

List of enabled extensions

canvas-zoom
sd-webui-animatediff
sd-webui-aspectratio-helper

Console logs

To create a public link, set `share=True` in `launch()`.
Startup time: 12.8s (prepare environment: 4.6s, import torch: 2.6s, import gradio: 1.5s, setup paths: 1.6s, initialize shared: 1.1s, other imports: 0.3s, load scripts: 1.7s, create ui: 0.8s, gradio launch: 0.2s).
*** Error completing request
*** Arguments: ('https://github.com/Mikubill/sd-webui-controlnet.git', ['ads', 'localization', 'installed'], 0, '') {}
    Traceback (most recent call last):
      File "F:\andreai\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "F:\andreai\stable-diffusion-webui-directml\modules\ui_extensions.py", line 399, in install_extension_from_index
        ext_table, message = install_extension_from_url(None, url)
      File "F:\andreai\stable-diffusion-webui-directml\modules\ui_extensions.py", line 387, in install_extension_from_url
        raise err
      File "F:\andreai\stable-diffusion-webui-directml\modules\ui_extensions.py", line 379, in install_extension_from_url
        os.rename(tmpdir, target_dir)
    PermissionError: [WinError 5] Zugriff verweigert: 'F:\\andreai\\stable-diffusion-webui-directml\\tmp\\sd-webui-controlnet' -> 'F:\\andreai\\stable-diffusion-webui-directml\\extensions\\sd-webui-controlnet'

---
*** Error completing request
*** Arguments: ('https://github.com/Mikubill/sd-webui-controlnet.git', ['ads', 'localization', 'installed'], 0, '') {}
    Traceback (most recent call last):
      File "F:\andreai\stable-diffusion-webui-directml\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "F:\andreai\stable-diffusion-webui-directml\modules\ui_extensions.py", line 399, in install_extension_from_index
        ext_table, message = install_extension_from_url(None, url)
      File "F:\andreai\stable-diffusion-webui-directml\modules\ui_extensions.py", line 387, in install_extension_from_url
        raise err
      File "F:\andreai\stable-diffusion-webui-directml\modules\ui_extensions.py", line 379, in install_extension_from_url
        os.rename(tmpdir, target_dir)
    PermissionError: [WinError 5] Zugriff verweigert: 'F:\\andreai\\stable-diffusion-webui-directml\\tmp\\sd-webui-controlnet' -> 'F:\\andreai\\stable-diffusion-webui-directml\\extensions\\sd-webui-controlnet'

Additional information

No response

@Nileneb
Copy link

Nileneb commented Jan 16, 2024

Got the same problem. All other add´s are working without problems. Only controlnet give mit the Permission Error.
When I installed the old controlnet per link I could install, but it doesnt work.

@Nileneb
Copy link

Nileneb commented Jan 17, 2024

Today i used this link: https://github.com/lllyasviel/webui-controlnet-v1-archived.git
And this version is working for me. Now the problem is, I got no updates for this.

@sdbds
Copy link
Collaborator

sdbds commented Jan 17, 2024

i think it is network or environment problem, close all you webui then just try to use git clone to extension.

@Nileneb
Copy link

Nileneb commented Jan 17, 2024

yes, git clone worked and controllnet is running. But now i get this message:
Version: v1.7.0
Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e
SHA could not be resolved, git returned: b''
Warning: ControlNet failed to sync submodules. Please try run git submodule init and git submodule update manually.
You are up to date with the most recent release.
Launching Web UI with arguments: --xformers --allow-code --update-check --enable-insecure-extension-access --listen --api
Style database not found: C:\Users\benel\Desktop\KI\stable-diffusion-webui\styles.csv
ControlNet preprocessor location: C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2024-01-17 10:18:07,860 - ControlNet - INFO - ControlNet v1.1.431
2024-01-17 10:18:07,923 - ControlNet - INFO - ControlNet v1.1.431

I try in Terminal in extensions/stable-diffusion-webui the "git submodule init" and "git submodule update" and after that "git pull", but the message is still there.

@Nileneb
Copy link

Nileneb commented Jan 17, 2024

Error running process: C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\modules\scripts.py", line 718, in process
script.process(p, *script_args)
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1069, in process
self.controlnet_hack(p)
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 1054, in controlnet_hack
self.controlnet_main_entry(p)
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 885, in controlnet_main_entry
detected_map, is_image = preprocessor(
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 75, in decorated_func
return cached_func(*args, **kwargs)
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\utils.py", line 63, in cached_func
return func(*args, **kwargs)
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 37, in unified_preprocessor
return preprocessor_modules[preprocessor_name](*args, **kwargs)
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\processor.py", line 538, in normal_bae
img, remove_pad = resize_image_with_pad(img, res)
File "C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\processor.py", line 32, in resize_image_with_pad
img = cv2.resize(img, (W_target, H_target), interpolation=interpolation)
cv2.error: OpenCV(4.9.0) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\resize.cpp:4155: error: (-215:Assertion failed) inv_scale_x > 0 in function 'cv::resize'

@huchenlei
Copy link
Collaborator

According to #1751, set the processor resolution to 512 may help.

@huchenlei
Copy link
Collaborator

huchenlei commented Jan 17, 2024

yes, git clone worked and controllnet is running. But now i get this message: Version: v1.7.0 Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e SHA could not be resolved, git returned: b'' Warning: ControlNet failed to sync submodules. Please try run git submodule init and git submodule update manually. You are up to date with the most recent release. Launching Web UI with arguments: --xformers --allow-code --update-check --enable-insecure-extension-access --listen --api Style database not found: C:\Users\benel\Desktop\KI\stable-diffusion-webui\styles.csv ControlNet preprocessor location: C:\Users\benel\Desktop\KI\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads 2024-01-17 10:18:07,860 - ControlNet - INFO - ControlNet v1.1.431 2024-01-17 10:18:07,923 - ControlNet - INFO - ControlNet v1.1.431

I try in Terminal in extensions/stable-diffusion-webui the "git submodule init" and "git submodule update" and after that "git pull", but the message is still there.

This seems like a GitPython issue: gitpython-developers/GitPython#1016. If you have successfully synced submodule once, you should be good to ignore that warning, as we have no plan to update hand refiner submodule any time soon.

@mariobermudezjr
Copy link

mariobermudezjr commented Jan 18, 2024

i think it is network or environment problem, close all you webui then just try to use git clone to extension.

This worked for my situation. cmd in file explorer path and hit ENTER. Then in cmd prompt type the following.
screenshot
git clone https://github.com/Mikubill/sd-webui-controlnet.git restart web-ui and start again using the webui-user.bat to make sure it installs dependencies and vuala!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants