Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Jun 19, 2024
1 parent 7eb6734 commit 21e3bf5
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
# ComfyUI_frontend

Front end of [ComfyUI](https://github.com/comfyanonymous/ComfyUI) modernized. This repo is fully compatible with existing extension system.
Front-end of [ComfyUI](https://github.com/comfyanonymous/ComfyUI) modernized. This repo is fully compatible with the existing extension system.

## The grand migration to TypeScript
## Road Map

This repo is an experiment trying to migrate ComfyUI's front-end code to TypeScript for a better front-end development experience.
### What has been done

## Tasks
- Migrate all code to TypeScript with minimal change modification to the original logic.
- Bundle all code with vite's rollup build.
- Added a shim layer to be backward compatible with the existing extension system. https://github.com/huchenlei/ComfyUI_frontend/pull/15
- Front-end dev server.
- Zod schema for input validation on ComfyUI workflow.

- [x] Gradually migrate the code to TypeScript in this repo, while monitoring the change
in ComfyUI's front-end code.
- [ ] Using zod schema to add static/runtime type check for core structures.
- [ ] Figure out a way to reliably embed compiled code to ComfyUI distribution.

- It can be a bot regularly pulling the new changes in the front-end repo and submitting them to the main repo. (Chrome does a similar process for Chrome devtools, which is hosted in a separate repo.)
### What to be done

- Make litegraph a npm dependency.
- Replace the existing ComfyUI front-end impl.
- Turn on `strict` on `tsconfig.json`.
- Introduce react to start managing part of the UI.
- Introduce a UI library to add more widget types for node developers.
- LLM streaming node.
- Linear mode (Similar to InvokeAI's linear mode).
- Invoke AI canvas.
- Better node search. Sherlock https://github.com/Nuked88/ComfyUI-N-Sidebar.

## Development
Note: You need to patch comfyanonymous/ComfyUI#3779 for the dev server to work.

Note1: You need to patch comfyanonymous/ComfyUI#3779 for the dev server to work.

Note2: The dev server will NOT load any extension from the ComfyUI server. Only
core extensions will be loaded.

- Run `npm install` to install the necessary packages
- Start local ComfyUI backend at `localhost:8188`
- Run `npm run dev` to start the dev server

## Test

- `npm run build` to build the front end
- `cd tests-ui`
- `npm i` to install all test dependencies
- `npm run test:generate` to fetch `data/object_info.json`
- `npm i` to install all dependencies
- `npm run test:generate` to fetch `tests-ui/data/object_info.json`
- `npm run test` to execute all unit tests.

## Deploy

Copy everything under `dist/` to `ComfyUI/web/` in your ComfyUI checkout.

0 comments on commit 21e3bf5

Please sign in to comment.