An Electron-based desktop application designed for ComfyUI API control and Face Fusion automation. This repository features a completely portable and independent python and node.js runtime environment. It does not require pre-installed Python, Node.js, or Git on the host system. All necessary environments are automatically downloaded, configured, and isolated within the project directory upon first setup.
ComfyUI Listener/
├── .node_venv/ # Auto-downloaded portable Node.js runtime (v20.11.1)
├── .venv/ # Auto-downloaded portable Python runtime (v3.10.11)
├── git/ # Auto-downloaded portable Git runtime (MinGit)
├── src/ # Electron application source code (HTML, CSS, JS)
│ ├── main.js # Electron main process
│ ├── preload.js # Electron preload script
│ ├── renderer.js # Electron renderer process (UI & automation logic)
│ ├── index.html # Main user interface
│ └── style.css # Modern, high-performance UI stylesheet
├── workflow/ # Tracked reference ComfyUI workflow JSON templates
├── requirements.txt # Python dependencies list
├── package.json # Node.js dependencies list (Electron, etc.)
├── setup.bat / .ps1 # One-click Python & Git setup scripts (CMD / PowerShell)
├── setup_node.bat / .ps1 # One-click Node.js & Electron setup scripts (CMD / PowerShell)
├── run.bat / .ps1 # Run script for Python CLI mode (CMD / PowerShell)
├── run_electron.bat / .ps1 # Run script for the Electron GUI desktop app (CMD / PowerShell)
└── .gitignore # Git exclusion patterns
To set up and run the application, follow these two setup steps to configure the isolated runtimes:
Double-click and run setup.bat (or execute .\setup.ps1 in a PowerShell terminal).
This script automates:
- Portable Python: Downloads the Python 3.10.11 Windows portable package from python.org and extracts it into
.venv/. - Path & Loader Config: Modifies the Python path files so that local dependencies can be loaded properly.
- Pip Installer: Downloads and installs a local
pippackage manager inside the sandbox. - Portable Git: Downloads the lightweight portable Git (
MinGit) from GitHub and extracts it to thegit/folder. - Python Dependencies: Uses the local sandbox pip to install all packages specified in
requirements.txt.
Double-click and run setup_node.bat (or execute .\setup_node.ps1 in PowerShell).
This script automates:
- Portable Node.js: Downloads Node.js v20.11.1 Windows portable binary zip and extracts it to
.node_venv/. - Sandbox Configuration: Sets the local
npmprefix and cache directories inside.node_venv/npm_globalto avoid interfering with global system configurations. - App Dependencies: Automatically installs Electron and all node modules declared in
package.json.
Double-click run_electron.bat (or execute .\run_electron.ps1 in PowerShell).
- This injects the sandbox paths (
.node_venv,git, and.venv) temporarily into the session's environment variablePATH. - Even if your Windows host has no global Git, Node.js, or Python, the desktop GUI will launch and run seamlessly.
- This interface lets you control ComfyUI, configure workflow templates, load API/WebUI parameters, monitor outputs, and automate Face Fusion face-swapping steps.
Double-click run.bat (or execute .\run.ps1 in PowerShell).
- Runs the python entrypoint
main.pyusing the isolated sandbox.venvenvironment. - Supports arguments forwarding, e.g.:
.\run.bat --arg1 value1.
- Open
requirements.txt. - Add your required package names (with optional version tags), e.g.:
requests>=2.31.0 websocket-client>=1.6.0 - Re-run
setup.batto automatically install the new dependencies.
If you need to manually invoke the isolated runtime command-line for testing or debugging:
- Run commands using isolated Python:
.venv\python.exe -m <Command>
- Install a package directly using isolated Pip:
.venv\python.exe -m pip install <PackageName>