fix: 🐛 i/o sidebar for custom paths
In utils I uses a constant for these which doesn't update with the global... calling the getters should solve that. This issue is probably in other places where I use these utils. fixes #219
This commit is contained in:
+5
-2
@@ -4,6 +4,7 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import Any, Literal
|
||||
|
||||
import folder_paths
|
||||
from aiohttp import web
|
||||
|
||||
from .log import mklog
|
||||
@@ -13,8 +14,6 @@ from .utils import (
|
||||
build_glob_patterns,
|
||||
glob_multiple,
|
||||
import_install,
|
||||
input_dir,
|
||||
output_dir,
|
||||
reqs_map,
|
||||
run_command,
|
||||
styles_dir,
|
||||
@@ -70,6 +69,10 @@ def ACTIONS_getUserImages(
|
||||
# return {"error": "Session not authorized to getInputs"}
|
||||
|
||||
imgs = {}
|
||||
|
||||
input_dir = Path(folder_paths.get_input_directory())
|
||||
output_dir = Path(folder_paths.get_output_directory())
|
||||
|
||||
entry_dir = input_dir if mode == "input" else output_dir
|
||||
supported = ["png", "jpg", "jpeg", "webp", "gif"]
|
||||
|
||||
|
||||
@@ -498,8 +498,12 @@ here = Path(__file__).parent.absolute()
|
||||
# - Construct the absolute path to the ComfyUI directory
|
||||
comfy_dir = Path(folder_paths.base_path)
|
||||
models_dir = Path(folder_paths.models_dir)
|
||||
|
||||
|
||||
# NOTE: these aren't reliable, better call the getters each time
|
||||
output_dir = Path(folder_paths.output_directory)
|
||||
input_dir = Path(folder_paths.input_directory)
|
||||
|
||||
styles_dir = comfy_dir / "styles"
|
||||
session_id = str(uuid.uuid4())
|
||||
# - Construct the path to the font file
|
||||
|
||||
Reference in New Issue
Block a user