Comfy-Org / Comfy-Org/ComfyUI

comfyui not starting with empty base directory

Open
#8,434 3 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

I've tried to start comfyui in docker - therefore I've cloned the repo
```
git clone https://github.com/comfyanonymous/ComfyUI.git
```
installed the requirements
```
pip install -r requirements.txt
```

and tried to start comfyui with
```
python main.py --listen --base-directory /data
```
but this results in
```
comfyui-1 | Traceback (most recent call last):
comfyui-1 | File "/app/main.py", line 99, in
comfyui-1 | execute_prestartup_script()
comfyui-1 | File "/app/main.py", line 75, in execute_prestartup_script
comfyui-1 | possible_modules = os.listdir(custom_node_path)
comfyui-1 | FileNotFoundError: [Errno 2] No such file or directory: '/data/custom_nodes'
```

as workaround I can use this as startup command
```
mkdir /data/custom_nodes && python main.py --listen --base-directory "/data"
```
but it would be nice if this is done automatically

### Actual Behavior

comfyui is not starting

### Steps to Reproduce

run comfyui with an empty base-directory
`python main.py --listen --base-directory /data`

### Debug Logs

```powershell
comfyui-1 | Traceback (most recent call last):
comfyui-1 | File "/app/main.py", line 99, in
comfyui-1 | execute_prestartup_script()
comfyui-1 | File "/app/main.py", line 75, in execute_prestartup_script
comfyui-1 | possible_modules = os.listdir(custom_node_path)
comfyui-1 | FileNotFoundError: [Errno 2] No such file or directory: '/data/custom_nodes'
```

### Other

It would be nice if all needed folder would be created autoamtically
model/checkpoints, model/loras, ...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.