ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Database location doesn't respect --base-directory

Open stuttlepress opened this issue 2 months ago • 1 comments

Custom Node Testing

Expected Behavior

  • move temp, user, input, custom_nodes, output, models, web, config directories from ComfyUI to f:\ComfyUI_workdirs
  • python -s main.py --base-directory f:\comfyui_workdirs --disable-all-custom-nodes
  • database at F:\ComfyUI_workdirs\user is initialized, no warning in console

Actual Behavior

  • If ComfyUI/user directory does not exist:

    Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: (sqlite3.OperationalError) unable to open database file (Background on this error at: https://sqlalche.me/e/20/e3q8)

  • If ComfyUI/user does exist, database file is initialized there, not in the user directory specified by --base-directory

Steps to Reproduce

  • python -s main.py --base-directory f:\comfyui_workdirs --disable-all-custom-nodes

  • If ComfyUI/user directory does not exist:

    Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: (sqlite3.OperationalError) unable to open database file (Background on this error at: https://sqlalche.me/e/20/e3q8)

  • If ComfyUI/user does exist, database file is initialized there, not in the user directory specified by --base-directory

Debug Logs

Setting up Visual Studio environment...
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.14.9
** Copyright (c) 2025 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Starting ComfyUI_raw...
[START] Security scan
[DONE] Security scan
** ComfyUI startup time: 2025-12-10 03:19:21.964
** Platform: Windows
** Python version: 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)]
** Python executable: F:\ComfyUI_raw\.ComfyUI_raw\Scripts\python.exe
** ComfyUI Path: f:\ComfyUI_raw\ComfyUI
** ComfyUI Base Folder Path: f:\ComfyUI_raw\ComfyUI
** User directory: f:\comfyui_workdirs\user
** ComfyUI-Manager config path: f:\comfyui_workdirs\user\__manager\config.ini
** Log path: f:\comfyui_workdirs\user\comfyui.log
[PRE] ComfyUI-Manager
Checkpoint files will always be loaded safely.
Total VRAM 32607 MB, total RAM 130848 MB
pytorch version: 2.10.0.dev20251209+cu130
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5090 : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 58881.0
working around nvidia conv3d memory bug.
Using pytorch attention
Python version: 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)]
ComfyUI version: 0.4.0
ComfyUI frontend version: 1.34.8
[Prompt Server] web root: F:\ComfyUI_raw\.ComfyUI_raw\Lib\site-packages\comfyui_frontend_package\static
[START] ComfyUI-Manager
[ComfyUI-Manager] network_mode: public
Total VRAM 32607 MB, total RAM 130848 MB
pytorch version: 2.10.0.dev20251209+cu130
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5090 : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 58881.0
Skipping loading of custom nodes
Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Starting server

To see the GUI go to: http://127.0.0.1:8188

Other

No response

stuttlepress avatar Dec 10 '25 09:12 stuttlepress

Can confirm on latest master 0899012 Creating user folder solves it but I assume data is being stored in an undesirable location

arijoon avatar Dec 20 '25 11:12 arijoon