Comfy-Org / Comfy-Org/ComfyUI

Frontend is not loading when installing packages as symlinks

Open
#9,253 0 comments 3 reactions 0 assignees View on GitHub
bug-cop:non-blocking Feature
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

ComfyUI frontend should load and display stuff, even when web assets are behind symlinks

### Actual Behavior

ComfyUI doesn't load, all static assets return 404

Image

Image

Image

### Steps to Reproduce

1. Clone ComfyUI (and install uv if its not available)
2. Create venv: `uv venv .venv`
3. Activate venv: `source .venv/bin/activate`
4. Install packages as symlinks: `uv pip install --link-mode=symlink -r requirements.txt` (you can also use `export UV_LINK_MODE=symlink` instead of `--link-mode=symlink`)
5. Confirm assets are symlinked by running `ls -lah \/lib/python3.X/site-packages/comfyui_frontend_package/static/assets`
You should see assets as symlinks like this:

Image

6. Start ComfyUI and notice how nothing loads when opening it in the browser

### Debug Logs
The logs do not show any errors or warnings.

### Other

uv's link-mode with hardlink/symlink is a very useful features to deduplicate storage usage across venvs on the same machine using the same libraries. This is especially useful for anything that uses ML related libraries like torch, as they tend to duplicate a lot of space.

However, ComfyUI does not seem to support this as it does not seem to follow symlinks when resolving assets from e.g. \/lib/python3.X/site-packages/comfyui-frontend-package/static

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.