ComfyUI-NODEJS

ComfyUI-NODEJS
★ 16

Node.js集成Windows自动安装包管理与更新多脚本并行
在ComfyUI内启动并管理Node.js进程,使Python子进程可执行Node.js脚本;支持Windows自动安装、包自动更新、多脚本并行与随ComfyUI优雅退出。
💡 在ComfyUI中运行并管理外部Node.js脚本和服务
🍴 6 Forks💻 Python🔄 2024-11-28
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/b6135d9bd930
COMFY-UI
image
image
image
image
image
📄 README

ComfyUI-NODEJS

This node allows the execution of Node.js application within ComfyUI by leveraging the ComfyUI-NODEJS, which starts alongside ComfyUI and facilitates the installation of Node.js. The integration enables Python subprocesses to execute Node.js scripts.

Features:

  • Node.js Installer: An semi-automated installation process of nodejs for windows users only.
  • Package Installer: Supports the installation and automatic updating of Node.js packages upon each startup.
  • Multiple scripts Execution: Enables running multiple projects simultaneously.
  • Graceful Shutdown: The service terminates when ComfyUI exits.
  • NodeJS Installation:

    Note: For non-windows user please install NodeJS before running this node

    NodeJS Installation: https://nodejs.org/en/download

    Windows users can skip this section

    For any query you can join my discord server: https://discord.gg/Z44Zjpurjp

    Node Installation:

  • Using comfy-cli
  • comfy node registry-install comfyui-nodejs

  • Using manual method
  • Go to your Comfyui > Custom Nodes folder
  • Run CMD from folder path box or right click on empty area and click open in terminal.
  • Copy and Paste this command git clone “https://github.com/daxcay/ComfyUI-NODEJS.git
  • Then go inside ComfyUI-NODEJS with cmd or open new and type pip install -r requirements.txt to install the requirements.
  • Using Comfy Manager (https://github.com/ltdrdata/ComfyUI-Manager)
  • Inside ComfyUI > Click Manager Button on Side.
  • Click Install Custom Node and Search for nodejs and Install this node:
  • Restart ComfyUI and it should be good to go
  • Configuration

    To run nodejs project(s) you will need to do paste your project(s) folder in the nodejs directory of ComfyUI-NODEJS.

    
    
    ![image](https://github.com/daxcay/ComfyUI-NODEJS/assets/164315771/9adabe4a-c25a-4604-85f3-7f2020167f30)
    
    
    
    ![image](https://github.com/daxcay/ComfyUI-NODEJS/assets/164315771/c6d990c0-7f3e-40ef-8a20-874d798f2c7b)
    
    
    
    **To run a project successfully verify the below steps carefully.**
    
    
    
    ### Project structure to be followed
    
    
    
    Every project should have two mandatory files in root folder one **app.js** and another **package.json** like this 
    
    
    
    ![image](https://github.com/daxcay/ComfyUI-NODEJS/assets/164315771/c6731bf1-6db8-479f-ba53-f593a1bcf31f)
    
    
    
    **app.js** is just for representation actual name could be anything. (main.js, foo.js). 
    
    but in package.json file mention correct name.
    
    
    
    **package.json** looks something like this:
    
    
    

    {

    “name”: “project1”,

    “version”: “1.0.0”,

    “description”: “”,

    “main”: “app.js”,

    “scripts”: {

    “dev” : “node dev.js”,

    “production” : “node app.js”,

    “test”: “node test.js”

    },

    “author”: “”,

    “license”: “ISC”,

    “dependencies”: {

    “express”: “^4.19.2”

    }

    }