.. | ||
README.md | ||
WORKFLOWS_DESIGN_IMPLEMENTATION.md |
Invoke UI
Core Libraries
Invoke's UI is made possible by a number of excellent open-source libraries. The most heavily-used are listed below, but there are many others.
Package Scripts
See package.json
for all scripts.
Run with pnpm <script name>
.
dev
: run the frontend in dev mode, enabling hot reloadingbuild
: run all checks (madge, eslint, prettier, tsc) and then build the frontendtypegen
: generate types from the OpenAPI schema (see Client Types Generation)lint:madge
: check frontend for circular dependencieslint:eslint
: check frontend for code qualitylint:prettier
: check frontend for code formattinglint:tsc
: check frontend for type issueslint
: run all checks concurrentlyfix
: runeslint
andprettier
, fixing fixable issues
Client Types Generation
We use openapi-typescript to generate types from the app's OpenAPI schema.
The generated types are written to invokeai/frontend/web/src/services/api/schema.d.ts
. This file is committed to the repo.
The server must be started and available at http://127.0.0.1:9090.
# from the repo root, start the server
python scripts/invokeai-web.py
# from invokeai/frontend/web/, run the script
pnpm typegen
Contributing
Thanks for your interest in contributing to the Invoke Web UI!
We encourage you to ping @psychedelicious and @blessedcoolant on discord if you want to contribute, just to touch base and ensure your work doesn't conflict with anything else going on. The project is very active.
Localization
We use i18next for localization, but translation to languages other than English happens on our Weblate project.
Only the English source strings should be changed on this repo.
Dev Environment
From invokeai/frontend/web/
run pnpm i
to get everything set up.
Start everything in dev mode:
- From
invokeai/frontend/web/
:pnpm dev
- From repo root:
python scripts/invokeai-web.py
- Point your browser to the dev server address e.g. http://localhost:5173/
VSCode Remote Dev
We've noticed an intermittent issue with the VSCode Remote Dev port forwarding. If you use this feature of VSCode, you may intermittently click the Invoke button and then get nothing until the request times out.
We suggest disabling the IDE's port forwarding feature and doing it manually via SSH:
ssh -L 9090:localhost:9090 -L 5173:localhost:5173 user@host