Closed DoogeJ closed 1 year ago
Error handling request
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\site-packages\aiohttp\web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "C:\Program Files\Python310\lib\site-packages\aiohttp\web_app.py", line 504, in _handle
resp = await handler(request)
File "C:\Program Files\Python310\lib\site-packages\aiohttp\web_middlewares.py", line 117, in impl
return await handler(request)
File "X:\ComfyUI\server.py", line 42, in cache_control
response: web.Response = await handler(request)
File "X:\ComfyUI\server.py", line 390, in get_object_info
out[x] = node_info(x)
File "X:\ComfyUI\server.py", line 369, in node_info
info['input'] = obj_class.INPUT_TYPES()
File "X:\ComfyUI\custom_nodes\comfy-nodes\civitai_lora_loader.py", line 34, in INPUT_TYPES
lora_paths = short_paths_map(LORAS)
File "X:\ComfyUI\custom_nodes\comfy-nodes\utils.py", line 8, in short_paths_map
key = os.path.join(path_parts[-2], path_parts[-1])
IndexError: list index out of range
Just adding that I'm also getting the same error. Same version of python as OP but I'm on Windows 11. This is on a fresh install of ComfyUI and this plugin.
@barney1511 are you using ComfyUI with the option to use Automatic1111 folder structures by defining the path in extra_model_paths.yaml
?
I feel like this might cause an issue. My Python is horrible, but when I delete or rename extra_model_paths.yaml
in my setup, suddenly everything starts working as expected. I suppose it's time to get rid of Automatic1111 and move my models over until this is fixed :)
If paths are too short, we can't shorten the paths any further, so we get a key error. I failed to account for this. In this patch: https://github.com/civitai/comfy-nodes/commit/d556af6e3663329868bee416ed517c945f13b7f0#diff-09d0cbaf891d623ac245ccf84485a687b554217349ca55557c60b33234b969aeR8 I am just using the "full" path when we can't shorten it.
Works for me now! Thanks a lot for the rapid response! :)
I am probably doing something wrong, but I cloned
civitai/comfy-nodes
in myComfyUI\custom_nodes
-folder, where it created a nice subfolder.But now ComfyUI fails to load with an
IndexError: list index out of range
incomfy-nodes\utils.py
onkey = os.path.join(path_parts[-2], path_parts[-1])
.Full stacktrace:
Environment information:
C:\dev\ComfyUI_windows_portable
Suggestions very welcome!