Use comfy user directory

This commit is contained in:
Alexopus
2025-07-21 16:10:29 +02:00
parent c6bce69376
commit b24fd29fac
2 changed files with 9 additions and 2 deletions
+3 -1
View File
@@ -1,2 +1,4 @@
__pycache__
notes/
notes/
.vscode/
+6 -1
View File
@@ -11,7 +11,12 @@ NODE_DISPLAY_NAME_MAPPINGS = {}
class NotesManager:
def __init__(self):
self.notes_dir = os.path.join(os.path.dirname(__file__), "notes")
user_dir = folder_paths.get_user_directory()
if user_dir and os.path.isdir(user_dir):
self.notes_dir = os.path.join(user_dir, "default", "comfyui-notes-sidebar", "notes")
else:
self.notes_dir = os.path.join(os.path.dirname(__file__), "notes")
os.makedirs(self.notes_dir, exist_ok=True)
def get_notes_list(self) -> list[str]: