mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 04:52:31 +08:00
fix: correct folder path resolution for COMBO validation errors
Use input name to derive folder key instead of iterating all folders. Handle paths as list/tuple and join with comma for clean output. Fixes coderabbit Major review on #13105
This commit is contained in:
parent
96430e9d48
commit
d61ec431c4
15
execution.py
15
execution.py
@ -984,12 +984,15 @@ async def validate_inputs(prompt_id, prompt, item, validated):
|
|||||||
folder_path = None
|
folder_path = None
|
||||||
try:
|
try:
|
||||||
import folder_paths as fp
|
import folder_paths as fp
|
||||||
for folder_name in fp.folder_names_and_paths:
|
if x.endswith("_name") or x.endswith("_dir"):
|
||||||
if x.endswith("_name") or x.endswith("_dir"):
|
folder_key = x.removesuffix("_name").removesuffix("_dir")
|
||||||
paths = fp.folder_names_and_paths[folder_name]
|
folder_entry = fp.folder_names_and_paths.get(folder_key)
|
||||||
if paths and paths[0]:
|
if folder_entry and folder_entry[0]:
|
||||||
folder_path = paths[0]
|
paths = folder_entry[0]
|
||||||
break
|
if isinstance(paths, (list, tuple)):
|
||||||
|
folder_path = ", ".join(str(p) for p in paths)
|
||||||
|
else:
|
||||||
|
folder_path = str(paths)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user