Code Monkey home page Code Monkey logo

comfyui-nodejs's Introduction

COMFY-UI

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:

  1. Using comfy-cli

    comfy node registry-install comfyui-nodejs

  2. 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.
  3. 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:

    image

    • 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.

ComfyUI\custom_nodes\ComfyUI-NODEJS\nodejs

image

image

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

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"
  }
}

Ensure your project package.json to have a "production" script in scripts objects.

image

Now run/restart comfyui.

Open any browser and head to http://localhost:3000. If NodeJs is installed successfully it should return:

image

Demo projects are given in nodejs folder in case you don't understand anything. delete them when running actual projects or build upon them.

Credits

◉ Daxton Caylor - ComfyUI Node Developer

Support ❤️

comfyui-nodejs's People

Contributors

daxcay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.