ComfyUI's web server doesn't follow symlinks for security reasons, causing 404
errors when trying to load JavaScript files. Simplified sync_web_files.py to
always copy files instead of attempting symlinks.
Changes:
- Removed dev/prod mode detection and symlink creation logic
- Always copy files from source to web/ directory
- Hash-based caching still prevents unnecessary re-syncs
- Auto-sync on ComfyUI startup keeps files current
- Updated README.md to reflect copy-only behavior
Workflow: After editing source files, run `python scripts/sync_web_files.py --force`
then restart ComfyUI to see changes.
Tested: Manual copies work, UI loads correctly, cache prevents redundant syncs
Fixed critical bugs in sync_web_files.py that caused copies instead of symlinks:
1. Mode detection now checks ALL nodes instead of just first one
- Prevents false "prod" mode when mixed symlink/submodule states exist
- Returns "dev" if ANY node is a symlink
2. Symlink creation uses absolute paths instead of relative
- Fixes "Source not found" errors during sync
- Ensures symlinks work after atomic temp-to-final move
- Eliminates code duplication in web/ directory
3. Windows console compatibility
- Replaced Unicode characters with ASCII for verbose output
Also adds auto-sync integration to __init__.py and web_src/core/ source directory.
Tested: All 3 JS files created as symlinks (0 copies), zero duplication verified
Changes:
- Add fix_python_association.cmd to fix .py file association
- Update README with Windows Store Python troubleshooting section
- Update Node Mappings section to reflect auto-discovery from .gitmodules
- Script now uses C:\Python312\python.exe for file associations
The Windows Store Python issue:
- Windows Store installs Python "stubs" in WindowsApps folder
- These stubs take precedence over real Python installations
- Running .py files directly uses stubs (wrong Python)
- Running 'python script.py' uses PATH Python (correct)
Three solutions provided:
1. Fix file association with provided batch script (recommended)
2. Disable Windows Store Python stubs in Settings
3. Always prefix with 'python' command (workaround)
Changes:
- Add scripts/requirements.txt with pyyaml dependency
- Update README.md with installation instructions
- Add helpful error message when PyYAML is missing
- Error message shows which Python is running and how to fix
Now when dev_mode.py is run with wrong Python, users see:
- Current Python executable path
- Exact pip install command for that Python
- Suggestion to use 'python dev_mode.py' explicitly
Changes:
- Remove hardcoded NODE_MAPPINGS dictionary
- Add parse_gitmodules() function to auto-discover nodes
- Update all commands (status, dev, publish) to use parsed mappings
- Update config YAML to note that nodes are auto-discovered
- Add nodes_bak/ to .gitignore
- Update fit-mask-to-image submodule to latest (renamed) commit
Benefits:
- No code changes needed when adding new nodes
- Single source of truth (.gitmodules)
- Automatically discovers all nodes/ submodules
- Less maintenance burden as collection grows
Changes:
- Fix __init__.py to use importlib for hyphenated node directories
- Add scripts/dev_mode.py for toggling between dev (symlinks) and publish (submodules) modes
- Add scripts/README.md with documentation
- Add scripts/dev_mode_config.yaml for configuration
The dev_mode.py script allows rapid development by symlinking to source repos,
then restoring git submodules for clean version control when ready to commit.