mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[GH-ISSUE #1524] [Bug]: [Windows] [Desktop] Profile directory with space causes extra_model_paths_config parsing error #447
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#447
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @beachtrash on GitHub (Jan 10, 2026).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1524
App Version
ComfyUI _desktop v0.7.2
ComfyUI v0.8.2
Expected Behavior
ComfyUI should properly quote, or escape, or encode spaces in the user profile directory automatically provided as a parameter to
python main.pyActual Behavior
My user profile directory is "C:\Users\Firstname Lastname" with a space in it. This is not uncommon for Windows users.
ComfyUI logged error:
I then modified that area of code around line 83 of main.py.
New code:
New output:
Steps to Reproduce
Install ComfyUI Desktop on Windows, and run it as a user whose profile directory has a space in it. When you edit anything with Manager and attempt to restart, ComfyUI backend will crash and the frontend will hang.
This bug should be simple to fix in the place where ComfyUI.exe builds the commandline to call
python main.pyin the restart scenario.Debug Logs
Browser Logs
No response
Settings JSON
No response
Other
No response
┆Issue is synchronized with this Notion page by Unito
@dosubot[bot] commented on GitHub (Jan 10, 2026):
Hi @beachtrash! I'm Dosu and I’m helping the desktop team.
This is a known issue with how ComfyUI Desktop constructs and passes command-line arguments for Python. The code is designed to use arrays for arguments, which should preserve spaces in paths when launching Python via Node.js's spawn API. However, your logs show that the path is still being split at the space, which suggests that somewhere in the argument construction or passing, the path string is being split into multiple arguments instead of being kept as a single string. This results in Python receiving an incomplete path and triggering a FileNotFoundError.
The relevant code is in
src/main-process/comfyServer.ts, where arguments are built as an array and passed to the Python process. There is no explicit quoting or escaping of arguments with spaces, but with Node.js spawn, this should not be necessary if each argument is a single string in the array. If the array is constructed incorrectly (for example, by splitting a path string on spaces before adding it to the array), this bug can occur. You can see the relevant logic here:comfyServer.ts#L88-L194
There is no documentation or prior issue that addresses this bug directly, and no evidence of a fix or workaround in the codebase as of now.
Workaround:
If you need an immediate workaround, you can try moving your profile or config directory to a path without spaces, or manually edit the configuration to use a path without spaces. Otherwise, a code fix is needed to ensure that all paths with spaces are passed as single arguments in the array and not split.
If you are able to patch locally, check that wherever the argument array is constructed, each path (including those with spaces) is added as a single string, not split or joined with spaces. This should resolve the issue until an official fix is released.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
@beachtrash commented on GitHub (Jan 10, 2026):
It appears that the raw startup path is working, and this bug occurs in the manager restart codepath after an update is applied. Since there are likely several places where arguments are built for main.py, we'd have to check them all to be sure they are escaping spaces in profile paths correctly. At the moment, any time the Manager makes any changes on startup, the UI loads to black and the backend crashes.
This is a bug in default configuration and is not able to be avoided without a code fix. The Desktop app uses our windows user profile directory as the root of its configuration system, so this must work in order for ComfyUI to load anything.
@benceruleanlu commented on GitHub (Jan 15, 2026):
This looks pretty bad! Just letting you know that I've seen it and will look to fix this soon.
@dosubot[bot] commented on GitHub (Apr 16, 2026):
Hi, @beachtrash. I'm Dosu, and I'm helping the desktop team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thanks for your understanding and contribution!