[Bug]: Desktop installer ignores custom install location — models, input, output, and dozens of other folders written to undisclosed user-space paths
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Bug Description
When installing ComfyUI Desktop, the installer prompts the user to choose a custom installation folder. However, even when a non-default location is explicitly selected, the installer proceeds to write models, data, and supporting folders to locations that were never disclosed during the install flow — including the user's home directory, AppData, and a `comfyui-shared` folder. This results in large files (model checkpoints, outputs, cached inputs, etc.) being scattered across the user's filesystem rather than contained within the directory the user explicitly chose.
This is a disk-space and filesystem-hygiene problem. Users who choose a custom install location typically do so because their system drive is space-constrained or because they want to keep all application data in one managed location. Silently writing tens of gigabytes of model files to paths the user never agreed to undermines the purpose of offering a custom install path in the first place.
---
### Environment
- **OS:** Windows 10/11
- **ComfyUI Desktop** version: 1.0.28
- **Install type:** Desktop installer (Electron-based desktop app)
- **Custom install path selected during install:** *(redacted)*
---
### Steps to Reproduce
1. Download and launch the ComfyUI Desktop installer.
2. When prompted for the installation location, specify a custom folder (e.g., `D:\ComfyUI` or any non-default path).
3. Complete the installation.
4. Launch ComfyUI Desktop and allow it to initialize / download models.
5. Inspect the filesystem. Observe that, in addition to the chosen install folder, the following have been created **outside** the specified location:
- A `comfyui-shared` folder in the user's home directory (or under AppData)
- `models/` subdirectories (checkpoints, loras, vae, controlnet, embeddings, upscale_models, etc.)
- `input/` folder
- `output/` folder
- Additional AppData entries (Local and/or Roaming)
- Dozens of other supporting folders
The debug log shows search paths referencing the **custom** location (e.g., `Adding extra search path checkpoints D:\ComfyUI\models\checkpoints`), confirming the installer **knows** the custom path — yet still writes to undisclosed locations.
---
### Expected Behaviour
All ComfyUI data — models, input, output, temporary files, cached data, and the `comfyui-shared` folder — should be written **exclusively** under the custom install directory the user selected during installation. If any data must be placed elsewhere (e.g., AppData for settings), the installer should:
1. Disclose those locations during the install flow, and
2. Provide an option to redirect or disable them.
The user's explicit choice of install location should be honored as the root for all application data.
---
### Actual Behaviour
The installer creates the custom install folder **and** writes large amounts of data to undisclosed locations:
| Location | Contents | Disclosed during install? |
|---|---|---|
| User home directory (`~`) | `comfyui-shared` folder, `models/`, `input/`, `output/`, and dozens of other folders | No |
| `%LOCALAPPDATA%` | ComfyUI application data | No |
| `%APPDATA%` (Roaming) | ComfyUI configuration / state | No |
| Custom install path (as chosen) | Some models and application files | Yes |
The custom path receives **some** content (the debug log confirms search paths point to it), but substantial data still lands in user-space folders the user never agreed to. All of these folders show recently modified files, confirming they are actively used — not vestigial.
---
### Root Cause Analysis
The desktop installer appears to use a mix of hardcoded default paths and the user-specified path:
1. The installer **does** register the custom path as a model search path (visible in debug logs: `Adding extra search path \models\checkpoints`, etc.).
2. However, several core directories — `input/`, `output/`, `comfyui-shared/`, and potentially the base `models/` tree — are still resolved against hardcoded defaults (e.g., the user's home directory or a `ComfyUI/` folder created under the user profile) rather than being rooted under the custom install path.
3. AppData entries (Local and Roaming) are likely created by the Electron app shell or the Python runtime bootstrap, independently of the install-path setting.
This suggests the "custom install location" setting only partially propagates through the application's path resolution logic — the installer sets it as a search path but does not override the base output/input/shared directories.
---
### Suggested Fix
1. **Honor the custom install path as the root for all writable data.** All of `models/`, `input/`, `output/`, `comfyui-shared/`, and any cache/temp directories should resolve under the user-specified install directory, not the user's home or AppData.
2. **Disclose any unavoidable external paths during install.** If AppData entries are required by the Electron shell or OS conventions, list them explicitly in the installer with their sizes so the user can make an informed decision.
3. **Provide a "data directory" setting** (distinct from the application install directory) so users can control where models, inputs, and outputs are stored — even after installation. This was previously requested in #5201 (closed) and remains relevant.
4. **Migrate existing data** on settings change: if a user changes the data directory post-install, move existing files rather than silently creating a new empty tree and leaving the old data behind.
---
### Additional Context
- **Issue #14443** ("Constant moving of folders") reports the same core problem: files appear in AppData/Local, AppData/Roaming, the user directory, and the custom install folder simultaneously, all with recently modified files.
- **Issue #14656** requests letting Windows users choose the Python environment location instead of always using the C: drive — another facet of the same install-path-not-respected problem.
- **Issue #5201** (closed) was a feature request for custom model folder paths. The need persists; the desktop installer's custom path option exists but does not fully deliver on the promise.
- This issue is particularly impactful for users with small system drives (common on modern Windows laptops with 256 GB SSDs) who install ComfyUI on a secondary drive specifically to keep large model files off the system drive.
Contributor guide
Research direction
Start by reproducing the Windows 10/11 installation with a custom path and tracing how that path propagates through the Electron installer and Python bootstrap. Compare the debug-log search paths with the locations of models, input, output, shared, cache, and AppData files; done means writable data follows the selected or explicitly disclosed data location, with existing-data migration addressed if settings can change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, python
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100