[GH-ISSUE #243] A1111 Trouble getting controlnet to start with webUI < The directory name is invalid: > #173

Closed
opened 2026-10-30 21:20:29 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @NehilV on GitHub (Sep 28, 2023).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/243

Hey, it all started when i was trying to get the new t2i and ip adapters to work with my controlnet. (they were completely ignored when used, other basic controlnet models like openpose worked fine). Somewhere i got that the yaml missing might be the problem, and i might tell a111 ui to look for it in settings>controlnet>"now i forgot exactly, but i put a path in the second box".

This path, a1111 doesnt recognize. next time i started my web ui, controlnet was gone from the interface, AND settings. i deleted and reinstalled it many times, but it has that path stored somewhere and just doesnt let controlnet start. and gives this error in the terminal during start:


 ControlNet preprocessor location: G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads

*** Error loading script: controlnet.py
Traceback (most recent call last):
File "G:\A1111\stable-diffusion-webui\modules\scripts.py", line 382, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "G:\A1111\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 "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 86, in
global_state.update_cn_models()
File "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 225, in update_cn_models
found = get_all_models(sort_by, filter_by, path)
File "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 192, in get_all_models
fileinfos = traverse_all_files(path, [])
File "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 178, in traverse_all_files
for entry in os.scandir(curr_path)
NotADirectoryError: [WinError 267] The directory name is invalid: 'models\ControlNet\cldm_v15.yaml'

-----------

The last line was the path that i put in the webUI settings, which now i want a1111 UI to forget, so the contorlnet might start. How can i find the file that stores these paths from the settings?

Please help, i can provide more info if the issue is not clear.

Originally created by @NehilV on GitHub (Sep 28, 2023). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/243 Hey, it all started when i was trying to get the new t2i and ip adapters to work with my controlnet. (they were completely ignored when used, other basic controlnet models like openpose worked fine). Somewhere i got that the yaml missing might be the problem, and i might tell a111 ui to look for it in settings>controlnet>"now i forgot exactly, but i put a path in the second box". This path, a1111 doesnt recognize. next time i started my web ui, controlnet was gone from the interface, AND settings. i deleted and reinstalled it many times, but it has that path stored somewhere and just doesnt let controlnet start. and gives this error in the terminal during start: -------- ControlNet preprocessor location: G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads *** Error loading script: controlnet.py Traceback (most recent call last): File "G:\A1111\stable-diffusion-webui\modules\scripts.py", line 382, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "G:\A1111\stable-diffusion-webui\modules\script_loading.py", line 10, in load_module module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 86, in <module> global_state.update_cn_models() File "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 225, in update_cn_models found = get_all_models(sort_by, filter_by, path) File "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 192, in get_all_models fileinfos = traverse_all_files(path, []) File "G:\A1111\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\global_state.py", line 178, in traverse_all_files for entry in os.scandir(curr_path) NotADirectoryError: [WinError 267] The directory name is invalid: 'models\\ControlNet\\cldm_v15.yaml' ----------- The last line was the path that i put in the webUI settings, which now i want a1111 UI to forget, so the contorlnet might start. How can i find the file that stores these paths from the settings? Please help, i can provide more info if the issue is not clear.
bsakaguchi 2026-10-30 21:20:29 +00:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@DominikDoom commented on GitHub (Sep 28, 2023):

I think you're at the wrong place, this is for the tag-autocomplete extension, not controlnet.

But to answer your question, in the root folder of your webui (so G:\A1111\stable-diffusion-webui\ in your case) is a file named config.json. Search for "control_net" in that file and look for which line has that path (likely "control_net_models_path"). Then either delete the whole line or just the text between the quotes and save the file. Next time you start the webui it will pull the settings from there.

<!-- gh-comment-id:1738991018 --> @DominikDoom commented on GitHub (Sep 28, 2023): I think you're at the wrong place, this is for the tag-autocomplete extension, not controlnet. But to answer your question, in the root folder of your webui (so `G:\A1111\stable-diffusion-webui\` in your case) is a file named `config.json`. Search for "control_net" in that file and look for which line has that path (likely "control_net_models_path"). Then either delete the whole line or just the text between the quotes and save the file. Next time you start the webui it will pull the settings from there.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#173
No description provided.