Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
fix(frontend): use webv1 for legacy launch and tooling
Josh Corbett3033b535efd5
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERSindex d87050d379..7f12507950 100644--- a/.github/CODEOWNERS+++ b/.github/CODEOWNERS@@ -27,5 +27,5 @@/invokeai/frontend/install @lstein/invokeai/frontend/merge @lstein @blessedcoolant/invokeai/frontend/training @lstein @blessedcoolant-/invokeai/frontend/web @blessedcoolant @lstein @dunkeroni @Pfannkuchensack @jpphoto+/invokeai/frontend/webv1 @blessedcoolant @lstein @dunkeroni @Pfannkuchensack @jpphoto/invokeai/frontend/webv2 @blessedcoolant @lstein @dunkeroni @Pfannkuchensack @jpphotodiff --git a/.github/pr_labels.yml b/.github/pr_labels.ymlindex 5eea8a75f9..2c258c5c04 100644--- a/.github/pr_labels.yml+++ b/.github/pr_labels.yml@@ -10,7 +10,7 @@ python:- changed-files:- all-globs-to-any-file:- 'invokeai/**'- - '!invokeai/frontend/web/**'+ - '!invokeai/frontend/webv1/**'- '!invokeai/frontend/webv2/**'python-tests:@@ -58,5 +58,5 @@ frontend-deps:frontend:- changed-files:- any-glob-to-any-file:- - 'invokeai/frontend/web/**'+ - 'invokeai/frontend/webv1/**'- 'invokeai/frontend/webv2/**'diff --git a/.github/workflows/frontend-checks.yml b/.github/workflows/frontend-checks.ymlindex 342b3ad8a9..62c43a897c 100644--- a/.github/workflows/frontend-checks.yml+++ b/.github/workflows/frontend-checks.yml@@ -45,7 +45,7 @@ jobs:timeout-minutes: 10 # expected run time: <2 mindefaults:run:- working-directory: invokeai/frontend/web+ working-directory: invokeai/frontend/webv1steps:- uses: actions/checkout@v6@@ -64,13 +64,13 @@ jobs:- '.github/workflows/frontend-checks.yml'- '.nvmrc'- '.github/actions/install-frontend-deps/**'- - 'invokeai/frontend/web/**'+ - 'invokeai/frontend/webv1/**'- name: install dependenciesif: ${{ steps.changed-files.outputs.frontend_any_changed == 'true' || inputs.always_run == true }}uses: ./.github/actions/install-frontend-depswith:- working-directory: invokeai/frontend/web+ working-directory: invokeai/frontend/webv1- name: tscif: ${{ steps.changed-files.outputs.frontend_any_changed == 'true' || inputs.always_run == true }}diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.ymlindex cd3ffbdbbe..c524306072 100644--- a/.github/workflows/frontend-tests.yml+++ b/.github/workflows/frontend-tests.yml@@ -45,7 +45,7 @@ jobs:timeout-minutes: 10 # expected run time: <2 mindefaults:run:- working-directory: invokeai/frontend/web+ working-directory: invokeai/frontend/webv1steps:- uses: actions/checkout@v6@@ -64,13 +64,13 @@ jobs:- '.github/workflows/frontend-tests.yml'- '.nvmrc'- '.github/actions/install-frontend-deps/**'- - 'invokeai/frontend/web/**'+ - 'invokeai/frontend/webv1/**'- name: install dependenciesif: ${{ steps.changed-files.outputs.frontend_any_changed == 'true' || inputs.always_run == true }}uses: ./.github/actions/install-frontend-depswith:- working-directory: invokeai/frontend/web+ working-directory: invokeai/frontend/webv1- name: vitestif: ${{ steps.changed-files.outputs.frontend_any_changed == 'true' || inputs.always_run == true }}diff --git a/.github/workflows/openapi-checks.yml b/.github/workflows/openapi-checks.ymlindex 60fc1c2269..591012ce24 100644--- a/.github/workflows/openapi-checks.yml+++ b/.github/workflows/openapi-checks.yml@@ -110,22 +110,22 @@ jobs:if: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}uses: ./.github/actions/install-frontend-depswith:- working-directory: invokeai/frontend/web+ working-directory: invokeai/frontend/webv1- name: copy schemaif: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}- run: cp invokeai/frontend/web/openapi.json invokeai/frontend/web/openapi_orig.json+ run: cp invokeai/frontend/webv1/openapi.json invokeai/frontend/webv1/openapi_orig.jsonshell: bash- name: generate schemaif: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}- run: cd invokeai/frontend/web && uv run ../../../scripts/generate_openapi_schema.py > openapi.json && pnpm prettier --write openapi.json+ run: cd invokeai/frontend/webv1 && uv run ../../../scripts/generate_openapi_schema.py > openapi.json && pnpm prettier --write openapi.jsonshell: bash- name: compare filesif: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}run: |- if ! diff invokeai/frontend/web/openapi.json invokeai/frontend/web/openapi_orig.json; then+ if ! diff invokeai/frontend/webv1/openapi.json invokeai/frontend/webv1/openapi_orig.json; thenecho "Files are different!";exit 1;fidiff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.ymlindex 9c8314f1ca..c39e9a3da3 100644--- a/.github/workflows/python-tests.yml+++ b/.github/workflows/python-tests.yml@@ -110,11 +110,11 @@ jobs:- 'uv.lock'- '.github/workflows/python-tests.yml'- 'invokeai/**'- - '!invokeai/frontend/web/**'+ - '!invokeai/frontend/webv1/**'- '!invokeai/frontend/webv2/**'# Re-includes must follow the exclusions above.# test_imports.py walks every package, including the frontend ones.- - 'invokeai/frontend/web/**/*.py'+ - 'invokeai/frontend/webv1/**/*.py'- 'invokeai/frontend/webv2/**/*.py'# test_workflow_graph_builder.py validates these editor fixtures against the backend.- 'invokeai/frontend/webv2/src/features/workflow/core/fixtures/**'diff --git a/.github/workflows/typegen-checks.yml b/.github/workflows/typegen-checks.ymlindex 267b507bdc..fae6925b8c 100644--- a/.github/workflows/typegen-checks.yml+++ b/.github/workflows/typegen-checks.yml@@ -110,22 +110,22 @@ jobs:if: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}uses: ./.github/actions/install-frontend-depswith:- working-directory: invokeai/frontend/web+ working-directory: invokeai/frontend/webv1- name: copy schemaif: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}- run: cp invokeai/frontend/web/src/services/api/schema.ts invokeai/frontend/web/src/services/api/schema_orig.ts+ run: cp invokeai/frontend/webv1/src/services/api/schema.ts invokeai/frontend/webv1/src/services/api/schema_orig.tsshell: bash- name: generate schemaif: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}- run: set -o pipefail; cd invokeai/frontend/web && uv run ../../../scripts/generate_openapi_schema.py | pnpm typegen+ run: set -o pipefail; cd invokeai/frontend/webv1 && uv run ../../../scripts/generate_openapi_schema.py | pnpm typegenshell: bash- name: compare filesif: ${{ steps.changed-files.outputs.src_any_changed == 'true' || inputs.always_run == true }}run: |- if ! diff invokeai/frontend/web/src/services/api/schema.ts invokeai/frontend/web/src/services/api/schema_orig.ts; then+ if ! diff invokeai/frontend/webv1/src/services/api/schema.ts invokeai/frontend/webv1/src/services/api/schema_orig.ts; thenecho "Files are different!";exit 1;fidiff --git a/.gitignore b/.gitignoreindex d11f0c34f9..bcd02dde49 100644--- a/.gitignore+++ b/.gitignore@@ -180,7 +180,7 @@ cython_debug/.DS_Store# Let the frontend manage its own gitignore-!invokeai/frontend/web/*+!invokeai/frontend/webv1/*# Scratch folder.scratch/diff --git a/AGENTS.md b/AGENTS.mdindex 5317b6f865..4ecead9358 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -15,7 +15,7 @@ Before editing, read `AGENTS.md` along each target path; scoped rules supplement| API, services, invocations | [app/AGENTS.md](invokeai/app/AGENTS.md) || Inference and model management | [backend/AGENTS.md](invokeai/backend/AGENTS.md) || Python tests | [tests/AGENTS.md](tests/AGENTS.md); also read guidance for the production code under test |-| Legacy frontend and generated API artifacts | [web/AGENTS.md](invokeai/frontend/web/AGENTS.md) |+| Legacy frontend and generated API artifacts | [webv1/AGENTS.md](invokeai/frontend/webv1/AGENTS.md) || CI and contribution tooling | [.github/AGENTS.md](.github/AGENTS.md) || Documentation | `docs/README.md` and `docs/package.json`; keep documentation about the implemented product current |diff --git a/Makefile b/Makefileindex ea8c445807..cd0cb2caeb 100644--- a/Makefile+++ b/Makefile@@ -66,14 +66,14 @@ frontend-build:frontendv2-install: frontend-installfrontend-legacy-install:- rm -rf invokeai/frontend/web/node_modules- cd invokeai/frontend/web && pnpm install+ rm -rf invokeai/frontend/webv1/node_modules+ cd invokeai/frontend/webv1 && pnpm install# Build the legacy frontendfrontendv2-build: frontend-buildfrontend-legacy-build:- cd invokeai/frontend/web && pnpm build+ cd invokeai/frontend/webv1 && pnpm build# Run the frontend test suite oncefrontend-test:@@ -87,16 +87,16 @@ frontend-dev:frontendv2-dev: frontend-devfrontend-legacy-dev:- cd invokeai/frontend/web && pnpm run dev+ cd invokeai/frontend/webv1 && pnpm run dev# Generate the OpenAPI Schema for the appfrontend-openapi:- cd invokeai/frontend/web && \+ cd invokeai/frontend/webv1 && \python ../../../scripts/generate_openapi_schema.py > openapi.json && \pnpm prettier --write openapi.jsonfrontend-typegen:- set -o pipefail; cd invokeai/frontend/web && python ../../../scripts/generate_openapi_schema.py | pnpm typegen+ set -o pipefail; cd invokeai/frontend/webv1 && python ../../../scripts/generate_openapi_schema.py | pnpm typegenfrontend-lint:pnpm -C invokeai/frontend/webv2 lintdiff --git a/docker/Dockerfile b/docker/Dockerfileindex e45c171a28..1f2b24c012 100644--- a/docker/Dockerfile+++ b/docker/Dockerfile@@ -15,7 +15,7 @@ RUN pnpm exec vite buildFROM web-builder AS legacy-web-builderWORKDIR /legacy-build-COPY invokeai/frontend/web/ ./+COPY invokeai/frontend/webv1/ ./RUN --mount=type=cache,target=/pnpm/store \pnpm install --frozen-lockfileRUN pnpm exec vite build@@ -103,7 +103,7 @@ CMD ["invokeai-web"]# --link requires buldkit w/ dockerfile syntax 1.4, does not work with podmanCOPY --link --from=web-builder /build/dist ${INVOKEAI_SRC}/invokeai/frontend/webv2/dist-COPY --link --from=legacy-web-builder /legacy-build/dist ${INVOKEAI_SRC}/invokeai/frontend/web/dist+COPY --link --from=legacy-web-builder /legacy-build/dist ${INVOKEAI_SRC}/invokeai/frontend/webv1/dist# add sources last to minimize image changes on code changesCOPY invokeai ${INVOKEAI_SRC}/invokeaidiff --git a/docs/src/content/docs/contributing/external-providers.md b/docs/src/content/docs/contributing/external-providers.mdindex 13dfd2df5b..ab62fb886e 100644--- a/docs/src/content/docs/contributing/external-providers.md+++ b/docs/src/content/docs/contributing/external-providers.md@@ -118,7 +118,7 @@ If your model uses a provider that is not already integrated:`ExternalGenerationService`.5. Add starter model entries using `source="external://<provider>/<model-id>"`.6. Optional UI ordering tweak:- `invokeai/frontend/web/src/features/modelManagerV2/subpanels/AddModelPanel/ExternalProviders/ExternalProvidersForm.tsx`+ `invokeai/frontend/webv1/src/features/modelManagerV2/subpanels/AddModelPanel/ExternalProviders/ExternalProvidersForm.tsx`(`PROVIDER_SORT_ORDER`).## 4) Optional Manual Installationdiff --git a/docs/src/content/docs/contributing/new-model-integration.mdx b/docs/src/content/docs/contributing/new-model-integration.mdxindex f8c1fd091b..85f47ef24e 100644--- a/docs/src/content/docs/contributing/new-model-integration.mdx+++ b/docs/src/content/docs/contributing/new-model-integration.mdx@@ -23,7 +23,7 @@ The examples use a hypothetical architecture, `NewModel`, with the base value `n::::::caution[Frontend scope]-Frontend work targets **webv2** (`invokeai/frontend/webv2`) only. The legacy UI in `invokeai/frontend/web` gets no graph builders or UI for new architectures. It still owns the generated OpenAPI artifacts, which CI checks; see [Tests and CI gates](#13-tests-and-ci-gates).+Frontend work targets **webv2** (`invokeai/frontend/webv2`) only. The legacy UI in `invokeai/frontend/webv1` gets no graph builders or UI for new architectures. It still owns the generated OpenAPI artifacts, which CI checks; see [Tests and CI gates](#13-tests-and-ci-gates).::::::tip[Start with the scaffolder]@@ -866,7 +866,7 @@ Beyond those tables, test what can silently go wrong:Use real lightweight modules with small configs rather than mocks.-**CI gates for generated artifacts.** New or changed invocations change the OpenAPI schema. As long as `invokeai/frontend/web` exists, CI (`openapi-checks.yml`, `typegen-checks.yml`) requires its generated `openapi.json` and `src/services/api/schema.ts` to be current. Regenerate both from `invokeai/frontend/web` in the repository's Python environment. This is a generated-file gate, not legacy UI work:+**CI gates for generated artifacts.** New or changed invocations change the OpenAPI schema. As long as `invokeai/frontend/webv1` exists, CI (`openapi-checks.yml`, `typegen-checks.yml`) requires its generated `openapi.json` and `src/services/api/schema.ts` to be current. Regenerate both from `invokeai/frontend/webv1` in the repository's Python environment. This is a generated-file gate, not legacy UI work:```shpython ../../../scripts/generate_openapi_schema.py > openapi.json && pnpm exec prettier --write openapi.jsondiff --git a/docs/src/content/docs/development/Front End/canvas-projects.mdx b/docs/src/content/docs/development/Front End/canvas-projects.mdxindex e12db1ba36..dde843684d 100644--- a/docs/src/content/docs/development/Front End/canvas-projects.mdx+++ b/docs/src/content/docs/development/Front End/canvas-projects.mdx@@ -2,7 +2,7 @@title: Canvas Projects----Canvas projects serialize the current canvas into a portable `.invk` archive. The feature lives in `invokeai/frontend/web/src/features/controlLayers/` and is exposed in the canvas toolbar archive menu and the canvas context menu under **Project**.+Canvas projects serialize the current canvas into a portable `.invk` archive. The feature lives in `invokeai/frontend/webv1/src/features/controlLayers/` and is exposed in the canvas toolbar archive menu and the canvas context menu under **Project**.:::noteThis page describes **version 1** of the `.invk` container, which is canvas-only and written by this frontend. Workbench projects write version 2 of the same container — see [Project Files (.invk)](/development/front-end/project-files/). The two readers each pin their own version and refuse the other's archives.diff --git a/docs/src/content/docs/development/Front End/index.md b/docs/src/content/docs/development/Front End/index.mdindex 99c3ff7f5b..a3b0ec470e 100644--- a/docs/src/content/docs/development/Front End/index.md+++ b/docs/src/content/docs/development/Front End/index.md@@ -9,7 +9,7 @@ Invoke's UI is made possible by many contributors and open-source libraries. ThaFollow the [dev environment](/development/setup/dev-environment/) guide to get set up. The default UI lives in `invokeai/frontend/webv2`. Run `make frontend-install`, then `make frontend-dev`; `make frontend-build` builds the bundle served by `invokeai-web`. The existing `frontendv2-*` targets remain aliases.-`invokeai/frontend/web` is the legacy frontend. Build it with `make frontend-legacy-build` and select it with `invokeai-web --web-legacy`. `--webv2` remains a compatibility alias for the default UI. Close other editor tabs before switching frontends on the same origin. Existing browser storage and project recovery data retain their names and formats; switching frontends does not migrate or erase them.+`invokeai/frontend/webv1` is the legacy frontend. Build it with `make frontend-legacy-build` and select it with `invokeai-web --web-legacy`. `--webv2` remains a compatibility alias for the default UI. Close other editor tabs before switching frontends on the same origin. Existing browser storage and project recovery data retain their names and formats; switching frontends does not migrate or erase them.## Package scripts@@ -33,7 +33,7 @@ If you make backend changes, it's important to regenerate the frontend types:```shset -o pipefail-cd invokeai/frontend/web && python ../../../scripts/generate_openapi_schema.py | pnpm typegen+cd invokeai/frontend/webv1 && python ../../../scripts/generate_openapi_schema.py | pnpm typegen```On macOS and Linux, you can run `make frontend-typegen` as a shortcut for the above snippet.diff --git a/docs/src/content/docs/development/Front End/state-management.mdx b/docs/src/content/docs/development/Front End/state-management.mdxindex 96fede7ba7..6c40b190db 100644--- a/docs/src/content/docs/development/Front End/state-management.mdx+++ b/docs/src/content/docs/development/Front End/state-management.mdx@@ -28,8 +28,8 @@ const myStringOption = useStore($myStringOption);### Where to put nanostores-- For global application state, export your stores from `invokeai/frontend/web/src/app/store/nanostores/`.-- For feature state, create a file for the stores next to the redux slice definition (e.g. `invokeai/frontend/web/src/features/myFeature/myFeatureNanostores.ts`).+- For global application state, export your stores from `invokeai/frontend/webv1/src/app/store/nanostores/`.+- For feature state, create a file for the stores next to the redux slice definition (e.g. `invokeai/frontend/webv1/src/features/myFeature/myFeatureNanostores.ts`).- For hooks with global state, export the store from the same file the hook is in, or put it next to the hook.### When to use nanostoresdiff --git a/docs/src/content/docs/development/Front End/text-tool.mdx b/docs/src/content/docs/development/Front End/text-tool.mdxindex 610466438e..d8dbb184e5 100644--- a/docs/src/content/docs/development/Front End/text-tool.mdx+++ b/docs/src/content/docs/development/Front End/text-tool.mdx@@ -6,18 +6,18 @@ title: 'Canvas Text Tool'The canvas text workflow is split between a Konva module that owns tool state and a React overlay that handles text entry.-- `invokeai/frontend/web/src/features/controlLayers/konva/CanvasTool/CanvasTextToolModule.ts`+- `invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasTool/CanvasTextToolModule.ts`- Owns the tool, cursor preview, and text session state (including the cursor "T" marker).- Manages dynamic cursor contrast, starts sessions on pointer down, and commits sessions by rasterizing the active text block into a new raster layer.-- `invokeai/frontend/web/src/features/controlLayers/components/Text/CanvasTextOverlay.tsx`+- `invokeai/frontend/webv1/src/features/controlLayers/components/Text/CanvasTextOverlay.tsx`- Renders the on-canvas editor as a `contentEditable` overlay positioned in canvas space.- Syncs keyboard input, suppresses app hotkeys, and forwards commits/cancels to the Konva module.-- `invokeai/frontend/web/src/features/controlLayers/components/Text/TextToolOptions.tsx`+- `invokeai/frontend/webv1/src/features/controlLayers/components/Text/TextToolOptions.tsx`- Provides the font dropdown, size slider/input, formatting toggles, and alignment buttons that appear when the Text tool is active.## Rasterization pipeline-`renderTextToCanvas()` (`invokeai/frontend/web/src/features/controlLayers/text/textRenderer.ts`) converts the editor contents into a transparent canvas. The Text tool module configures the renderer with the active font stack, weight, styling flags, alignment, and the active canvas color. The resulting canvas is encoded to a PNG data URL and stored in a new raster layer (`image` object) with a transparent background.+`renderTextToCanvas()` (`invokeai/frontend/webv1/src/features/controlLayers/text/textRenderer.ts`) converts the editor contents into a transparent canvas. The Text tool module configures the renderer with the active font stack, weight, styling flags, alignment, and the active canvas color. The resulting canvas is encoded to a PNG data URL and stored in a new raster layer (`image` object) with a transparent background.Layer placement preserves the original click location:@@ -27,14 +27,14 @@ Layer placement preserves the original click location:## Font stacks-Font definitions live in `invokeai/frontend/web/src/features/controlLayers/text/textConstants.ts` as ten deterministic stacks (sans, serif, mono, rounded, script, humanist, slab serif, display, narrow, UI serif). Each stack lists system-safe fallbacks so the editor can choose the first available font per platform.+Font definitions live in `invokeai/frontend/webv1/src/features/controlLayers/text/textConstants.ts` as ten deterministic stacks (sans, serif, mono, rounded, script, humanist, slab serif, display, narrow, UI serif). Each stack lists system-safe fallbacks so the editor can choose the first available font per platform.The Text tool also supports server-managed custom fonts from the configured `fonts_dir` directory, which defaults to `fonts` in the InvokeAI root:- `invokeai/app/services/config/config_default.py` ensures the configured directory and its `README.txt` exist.- `invokeai/app/api/routers/utilities.py` lists supported font files (`.ttf`, `.otf`, `.woff`, `.woff2`) and serves them to the frontend.-- `invokeai/frontend/web/src/features/controlLayers/components/Text/TextToolOptions.tsx` groups custom fonts separately from built-in stacks and keeps them disabled until their `FontFace` entries are ready.-- `invokeai/frontend/web/src/features/controlLayers/konva/CanvasTool/CanvasTextToolModule.ts` waits for custom font readiness before rasterizing text, avoiding fallback renders when a font has been listed but not fully loaded yet.+- `invokeai/frontend/webv1/src/features/controlLayers/components/Text/TextToolOptions.tsx` groups custom fonts separately from built-in stacks and keeps them disabled until their `FontFace` entries are ready.+- `invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasTool/CanvasTextToolModule.ts` waits for custom font readiness before rasterizing text, avoiding fallback renders when a font has been listed but not fully loaded yet.To add or adjust fonts:diff --git a/docs/src/content/docs/development/Front End/workflows.mdx b/docs/src/content/docs/development/Front End/workflows.mdxindex d083bb8df1..5e93b0fdfa 100644--- a/docs/src/content/docs/development/Front End/workflows.mdx+++ b/docs/src/content/docs/development/Front End/workflows.mdx@@ -293,7 +293,7 @@ If there are no fatal errors, the workflow is then stored in redux state.When the workflow schema changes, we may need to perform some data migrations. This occurs as workflows are loaded. zod schemas for each workflow schema version is retained to facilitate migrations.-Previous schemas are in folders in `invokeai/frontend/web/src/features/nodes/types/`, eg `v1/`.+Previous schemas are in folders in `invokeai/frontend/webv1/src/features/nodes/types/`, eg `v1/`.Migration logic is in [migrations.ts].diff --git a/docs/src/content/docs/development/Guides/models.mdx b/docs/src/content/docs/development/Guides/models.mdxindex 61c65c0819..c6369067d6 100644--- a/docs/src/content/docs/development/Guides/models.mdx+++ b/docs/src/content/docs/development/Guides/models.mdx@@ -380,7 +380,7 @@ The UI doesn't know about Python functions; it only knows how to build graphs ofWrite a TypeScript function that constructs the node graph for your model.- ```typescript title="invokeai/frontend/web/src/features/nodes/util/graph/generation/buildNewModelGraph.ts"+ ```typescript title="invokeai/frontend/webv1/src/features/nodes/util/graph/generation/buildNewModelGraph.ts"export const buildNewModelGraph = async (arg: GraphBuilderArg): Promise<GraphBuilderResult> => {const { state, manager } = arg;const { model } = state.params;@@ -427,7 +427,7 @@ The UI doesn't know about Python functions; it only knows how to build graphs ofHook your graph builder into the main routing logic.- ```typescript title="invokeai/frontend/web/src/features/queue/hooks/useEnqueueCanvas.ts" ins={5-6}+ ```typescript title="invokeai/frontend/webv1/src/features/queue/hooks/useEnqueueCanvas.ts" ins={5-6}switch (base) {case 'sdxl':return buildSDXLGraph(arg);@@ -442,7 +442,7 @@ The UI doesn't know about Python functions; it only knows how to build graphs ofAdd your new nodes to the strict frontend type unions.- ```typescript title="invokeai/frontend/web/src/features/nodes/util/graph/types.ts" ins="| 'newmodel_vae_decode'"+ ```typescript title="invokeai/frontend/webv1/src/features/nodes/util/graph/types.ts" ins="| 'newmodel_vae_decode'"export type ImageOutputNodes =| 'l2i' | 'flux_vae_decode' | 'sd3_l2i' | 'newmodel_vae_decode';```@@ -470,7 +470,7 @@ Finally, add any custom UI controls (like a specific scheduler dropdown) and manUpdate the parameters slice for your model-specific settings.- ```typescript title="invokeai/frontend/web/src/features/controlLayers/store/paramsSlice.ts"+ ```typescript title="invokeai/frontend/webv1/src/features/controlLayers/store/paramsSlice.ts"interface ParamsState {// ...newmodelScheduler: 'euler' | 'heun';@@ -486,9 +486,9 @@ Finally, add any custom UI controls (like a specific scheduler dropdown) and man2. **Parameter Recall**- Ensure users can extract parameters from previously generated images by updating `invokeai/frontend/web/src/features/metadata/parsing.tsx`.+ Ensure users can extract parameters from previously generated images by updating `invokeai/frontend/webv1/src/features/metadata/parsing.tsx`.- ```typescript title="invokeai/frontend/web/src/features/metadata/parsing.tsx"+ ```typescript title="invokeai/frontend/webv1/src/features/metadata/parsing.tsx"const recallNewmodelScheduler = (metadata: CoreMetadata) => {if (metadata.scheduler) {dispatch(setNewmodelScheduler(metadata.scheduler));@@ -593,7 +593,7 @@ A complete minimal `txt2img` integration touches the following areas:- `[newmodel]`- sampling_utils.py- denoise.py- - frontend/web/src/features+ - frontend/webv1/src/features- nodes/util/graph- generation/buildNewModelGraph.ts- types.tsdiff --git a/docs/src/content/docs/development/Guides/tests.mdx b/docs/src/content/docs/development/Guides/tests.mdxindex cc24509647..b284f18ce4 100644--- a/docs/src/content/docs/development/Guides/tests.mdx+++ b/docs/src/content/docs/development/Guides/tests.mdx@@ -28,7 +28,7 @@ The default frontend is `webv2`, with unit and Chromium suites. Run commands froInstall Chromium with `pnpm -C invokeai/frontend/webv2 exec playwright install chromium` if needed. Read `webv2/AGENTS.md` for test ownership and browser verification rules.-The legacy frontend remains in `invokeai/frontend/web`. Run its separate suite with `pnpm -C invokeai/frontend/web test:no-watch` and its checks with `pnpm -C invokeai/frontend/web lint`.+The legacy frontend remains in `invokeai/frontend/webv1`. Run its separate suite with `pnpm -C invokeai/frontend/webv1 test:no-watch` and its checks with `pnpm -C invokeai/frontend/webv1 lint`.## Backend Testsdiff --git a/docs/src/content/docs/features/hotkeys.mdx b/docs/src/content/docs/features/hotkeys.mdxindex a4b99fca16..341e75adca 100644--- a/docs/src/content/docs/features/hotkeys.mdx+++ b/docs/src/content/docs/features/hotkeys.mdx@@ -102,7 +102,7 @@ To add a new hotkey to the system, follow these steps:<Steps>1. **Add Translation Strings**- In `invokeai/frontend/web/public/locales/en.json`:+ In `invokeai/frontend/webv1/public/locales/en.json`:```json{"hotkeys": {@@ -117,7 +117,7 @@ To add a new hotkey to the system, follow these steps:```2. **Register the Hotkey**- In `invokeai/frontend/web/src/features/system/components/HotkeysModal/useHotkeyData.ts`:+ In `invokeai/frontend/webv1/src/features/system/components/HotkeysModal/useHotkeyData.ts`:```typescript// Inside the appropriate category builder functionaddHotkey('app', 'myAction', ['mod+k']); // Default bindingdiff --git a/invokeai/app/AGENTS.md b/invokeai/app/AGENTS.mdindex 426c670a27..a5e6cdf021 100644--- a/invokeai/app/AGENTS.md+++ b/invokeai/app/AGENTS.md@@ -6,7 +6,7 @@- Before changing flows, inspect `api/dependencies.py`, affected routers, service base/default/storage implementations, and tests. Preserve dependency/start/stop lifecycles; avoid parallel global services.- Server-authorize every account-owned resource, including queries, writes, events, exports, and recovery; UI guards are insufficient.- Trace frontend/saved-workflow consumers before changing Pydantic models, invocation fields/versions, HTTP DTOs, or socket-event names, defaults, validation, or errors.-- API changes may require regenerating `frontend/web/openapi.json` and `frontend/web/src/services/api/schema.ts` under `invokeai/`, even for webv2. Follow legacy frontend generation guidance; never hand-edit output.+- API changes may require regenerating `frontend/webv1/openapi.json` and `frontend/webv1/src/services/api/schema.ts` under `invokeai/`, even for webv2. Follow legacy frontend generation guidance; never hand-edit output.## Persistence and lifecyclediff --git a/invokeai/app/api/frontend.py b/invokeai/app/api/frontend.pyindex ff2bf82b32..44cf60769a 100644--- a/invokeai/app/api/frontend.py+++ b/invokeai/app/api/frontend.py@@ -7,6 +7,6 @@ from invokeai.app.api.no_cache_staticfiles import NoCacheStaticFilesdef mount_frontend(app: Starlette, frontend_root: Path, *, legacy: bool = False) -> None:"""Mount shared documentation assets before the selected UI's catch-all SPA route."""- ui_root = frontend_root.parent / "web" if legacy else frontend_root- app.mount("/static", NoCacheStaticFiles(directory=frontend_root.parent / "web" / "static"), name="static")+ ui_root = frontend_root.parent / "webv1" if legacy else frontend_root+ app.mount("/static", NoCacheStaticFiles(directory=frontend_root.parent / "webv1" / "static"), name="static")app.mount("/", NoCacheStaticFiles(directory=ui_root / "dist", html=True), name="ui")diff --git a/invokeai/app/invocations/flux2/flux2_klein_model_loader.py b/invokeai/app/invocations/flux2/flux2_klein_model_loader.pyindex 94d338138d..4e7ab21d42 100644--- a/invokeai/app/invocations/flux2/flux2_klein_model_loader.py+++ b/invokeai/app/invocations/flux2/flux2_klein_model_loader.py@@ -35,7 +35,7 @@ from invokeai.backend.model_manager.taxonomy import (# FLUX.2 Klein variant -> the Qwen3 encoder variant it was trained against, and the single place# that relationship is written down on the backend. Mirrors `KLEIN_TO_QWEN3_VARIANT_MAP` in-# `invokeai/frontend/web/src/features/parameters/util/flux2Klein.ts` — keep the two in sync.+# `invokeai/frontend/webv1/src/features/parameters/util/flux2Klein.ts` — keep the two in sync.# Variants sharing a Qwen3 entry (`klein_9b` and `klein_9b_base`) are valid encoder sources for# each other. [dev] is deliberately absent: it uses a Mistral encoder, so it can never satisfy a# Klein transformer, and `.get()` returning None is what makes the guards below fail closed.diff --git a/invokeai/backend/model_manager/README.md b/invokeai/backend/model_manager/README.mdindex 74fa577b20..35f03bcb15 100644--- a/invokeai/backend/model_manager/README.md+++ b/invokeai/backend/model_manager/README.md@@ -209,4 +209,4 @@ They use "graph builder" functions, which take the user's selected settings andUpdating or adding a graph builder can be a bit complex, and you'd likely need to update other UI components and state management to support the new model type.-The SDXL graph builder is a good example: `invokeai/frontend/web/src/features/nodes/util/graph/generation/buildSDXLGraph.ts`+The SDXL graph builder is a good example: `invokeai/frontend/webv1/src/features/nodes/util/graph/generation/buildSDXLGraph.ts`diff --git a/invokeai/backend/model_manager/configs/lora.py b/invokeai/backend/model_manager/configs/lora.pyindex e83cfc6a20..3f7faf16e6 100644--- a/invokeai/backend/model_manager/configs/lora.py+++ b/invokeai/backend/model_manager/configs/lora.py@@ -68,7 +68,7 @@ from invokeai.backend.patches.lora_conversions.wan_lora_constants import (# Defaults used to compute the effective slider range when one or both bounds# are unset. These intentionally mirror the frontend's DEFAULT_LORA_WEIGHT_CONFIG-# in invokeai/frontend/web/src/features/controlLayers/store/lorasSlice.ts so that+# in invokeai/frontend/webv1/src/features/controlLayers/store/lorasSlice.ts so that# bound/weight validation produces the same result whether it runs in the form# or in this pydantic model._DEFAULT_LORA_WEIGHT_SLIDER_MIN = -1.0diff --git a/invokeai/frontend/webv1/__init__.py b/invokeai/frontend/webv1/__init__.pyindex e9758b27b6..578c6aedeb 100644--- a/invokeai/frontend/webv1/__init__.py+++ b/invokeai/frontend/webv1/__init__.py@@ -1,3 +1,3 @@"""-Initialization file for invokeai.frontend.web+Initialization file for invokeai.frontend.webv1"""diff --git a/invokeai/frontend/webv1/scripts/clean_translations.py b/invokeai/frontend/webv1/scripts/clean_translations.pyindex a422747ef5..9cd7928c6f 100644--- a/invokeai/frontend/webv1/scripts/clean_translations.py+++ b/invokeai/frontend/webv1/scripts/clean_translations.py@@ -1,6 +1,6 @@# Cleans translations by removing unused keys# Usage: python clean_translations.py-# Note: Must be run from invokeai/frontend/web/scripts directory+# Note: Must be run from invokeai/frontend/webv1/scripts directory## After running the script, open `en.json` and check for empty objects (`{}`) and remove them manually.# Also, the script does not handle keys with underscores. They need to be checked manually.@@ -75,7 +75,7 @@ def main():data = json.load(f)except FileNotFoundError as e:raise FileNotFoundError(- "Unable to find en.json file - must be run from invokeai/frontend/web/scripts directory"+ "Unable to find en.json file - must be run from invokeai/frontend/webv1/scripts directory") from ecleaner = TranslationCleaner()diff --git a/invokeai/frontend/webv1/src/features/controlLayers/README.md b/invokeai/frontend/webv1/src/features/controlLayers/README.mdindex f3ef959e6c..490a916a4f 100644--- a/invokeai/frontend/webv1/src/features/controlLayers/README.md+++ b/invokeai/frontend/webv1/src/features/controlLayers/README.md@@ -6,11 +6,11 @@ It supports layers, drawing, erasing, undo/redo, exporting, backend filters (i.e## Broad Strokes of Design-The canvas is internally is a hierarchy of classes (modules). All canvas modules inherit from invokeai/frontend/web/src/features/controlLayers/konva/CanvasModuleBase.ts+The canvas is internally is a hierarchy of classes (modules). All canvas modules inherit from invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasModuleBase.ts### Modules-The top-level module is the CanvasManager: invokeai/frontend/web/src/features/controlLayers/konva/CanvasManager.ts+The top-level module is the CanvasManager: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasManager.tsAll canvas modules have:@@ -22,11 +22,11 @@ All canvas modules have:Modules can do anything, they are simply plain-JS classes to encapsulate some functionality. Some are singletons. Some examples:-- A singleton module that handles tool-specific interactions: invokeai/frontend/web/src/features/controlLayers/konva/CanvasTool/CanvasToolModule.ts-- Singleton models for each tool e.g. the CanvasBrushToolModule: invokeai/frontend/web/src/features/controlLayers/konva/CanvasTool/CanvasBrushToolModule.ts-- A singleton module to render the background of the canvas: invokeai/frontend/web/src/features/controlLayers/konva/CanvasBackgroundModule.ts-- A strictly logical module that manages various caches of image data: invokeai/frontend/web/src/features/controlLayers/konva/CanvasCacheModule.ts-- A non-singleton module that handles rendering a brush stroke: invokeai/frontend/web/src/features/controlLayers/konva/CanvasObject/CanvasObjectBrushLine.ts+- A singleton module that handles tool-specific interactions: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasTool/CanvasToolModule.ts+- Singleton models for each tool e.g. the CanvasBrushToolModule: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasTool/CanvasBrushToolModule.ts+- A singleton module to render the background of the canvas: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasBackgroundModule.ts+- A strictly logical module that manages various caches of image data: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasCacheModule.ts+- A non-singleton module that handles rendering a brush stroke: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasObject/CanvasObjectBrushLine.ts### Layers (Entities) and Adapters modules@@ -43,12 +43,12 @@ Each layer type has a corresponding "adapter" module that handles rendering theUsing the raster layer type as an example, it has a number of sub-modules:-- A top-level module that coordinates everything: invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityAdapterRasterLayer.ts-- An object (e.g. brush strokes, shapes, images) renderer that draws the layer via Konva: invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityObjectRenderer.ts-- A "buffer" object renderer, which renders in-progress objects (e.g. a brush stroke that is being drawn but not yet committed, important for performance): invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityBufferObjectRenderer.ts-- A module that handles previewing and applying backend filters: invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityFilterer.ts-- A module that handles selecting objects from the pixel data of a layer (aka segmentation tasks): invokeai/frontend/web/src/features/controlLayers/konva/CanvasSegmentAnythingModule.ts-- A module that handles transforming the layer (scale, translate, rotate): invokeai/frontend/web/src/features/controlLayers/konva/CanvasEntity/CanvasEntityTransformer.ts+- A top-level module that coordinates everything: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasEntity/CanvasEntityAdapterRasterLayer.ts+- An object (e.g. brush strokes, shapes, images) renderer that draws the layer via Konva: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasEntity/CanvasEntityObjectRenderer.ts+- A "buffer" object renderer, which renders in-progress objects (e.g. a brush stroke that is being drawn but not yet committed, important for performance): invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasEntity/CanvasEntityBufferObjectRenderer.ts+- A module that handles previewing and applying backend filters: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasEntity/CanvasEntityFilterer.ts+- A module that handles selecting objects from the pixel data of a layer (aka segmentation tasks): invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasSegmentAnythingModule.ts+- A module that handles transforming the layer (scale, translate, rotate): invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasEntity/CanvasEntityTransformer.ts## State mgmt@@ -149,7 +149,7 @@ The usage of the buffer renderer module helps a lot here, as we only need to recYou'll see the relevant code for this in the transformer module. It encapsulates the bounds calculation logic and exposes an observable that holds the last-known visual bounds of the layer.-The worker entrypoint is here invokeai/frontend/web/src/features/controlLayers/konva/CanvasWorkerModule.ts+The worker entrypoint is here invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasWorkerModule.ts## Rasterizing layers@@ -167,7 +167,7 @@ The canvas is a means to an end: provide strong user control and agency for imagWhen generating an image, the raster layers must be composited toegher into a single image that is sent to the backend. All inpaint masks are similarly composited together into a single mask image. Regional guidance and control layers are not composited together, they are sent as individual images.-This is handled in invokeai/frontend/web/src/features/controlLayers/konva/CanvasCompositorModule.ts+This is handled in invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasCompositorModule.tsFor each compositing task, the compositor creates a unique hash of the layer's state (e.g. objects, properties, etc.) and uses that to cache the resulting composited image's name (which ref a unique ref to the image file stored on disk). This avoids re-compositing layers that haven't changed since the last generation.@@ -175,7 +175,7 @@ For each compositing task, the compositor creates a unique hash of the layer's sImage generation models can only generate images up to certain sizes without causing VRAM OOMs. So we need to give the user a way to specify the size of the generation area. This is done via the "generation bounding box" tool, which is a rectangle that the user can resize and move around the canvas.-Here's the module for it invokeai/frontend/web/src/features/controlLayers/konva/CanvasTool/CanvasBboxToolModule.ts+Here's the module for it invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasTool/CanvasBboxToolModule.tsModels all have width/height constraints - they must be multiples of a certain number (typically 8, 16 or 32). This is related to the internal "latents" representatino of images in diffusion models. So the generation bbox must be constrained to these multiples.@@ -185,11 +185,11 @@ The typical use pattern for generating images on canvas is to generate a numberOnce canvas generation starts, much of the canvas is locked down until the user finalizes the staging area, either by accepting a single image, adding one or more images as new layers, or discarding all staged images.-The currently-selected staged image is previewed on the canvas and rendered via invokeai/frontend/web/src/features/controlLayers/konva/CanvasStagingAreaModule.ts+The currently-selected staged image is previewed on the canvas and rendered via invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasStagingAreaModule.tsWhen the user accepts a staged image, it is added as a new raster layer (there are other options for adding as control, saving directly to gallery, etc).-This subsystem tracks generated images by watching the queue of generation tasks. The relevant code for queue tracking is in invokeai/frontend/web/src/features/controlLayers/components/StagingArea/state.ts+This subsystem tracks generated images by watching the queue of generation tasks. The relevant code for queue tracking is in invokeai/frontend/webv1/src/features/controlLayers/components/StagingArea/state.ts## Future enhancements@@ -213,7 +213,7 @@ There used to be a hacky example of this on the Konva docs but I can't find it a### Abstract state bindings-Currently the state bindings (redux, nanostores) are all over the place. There is a singleton module that handles much of the redux binding, but it's still a bit messy: invokeai/frontend/web/src/features/controlLayers/konva/CanvasStateApiModule.ts+Currently the state bindings (redux, nanostores) are all over the place. There is a singleton module that handles much of the redux binding, but it's still a bit messy: invokeai/frontend/webv1/src/features/controlLayers/konva/CanvasStateApiModule.tsMany modules still directly subscribe to redux with their own selectors.diff --git a/invokeai/frontend/webv1/src/features/controlLayers/hooks/useIsEntityTypeEnabled.ts b/invokeai/frontend/webv1/src/features/controlLayers/hooks/useIsEntityTypeEnabled.tsindex 4c4617f1b8..e77777ddb8 100644--- a/invokeai/frontend/webv1/src/features/controlLayers/hooks/useIsEntityTypeEnabled.ts+++ b/invokeai/frontend/webv1/src/features/controlLayers/hooks/useIsEntityTypeEnabled.ts@@ -17,7 +17,7 @@ export const useIsEntityTypeEnabled = (entityType: CanvasEntityType) => {const isExternal = useAppSelector(selectIsExternal);// TODO(psyche): consider using a constant to define which entity types are supported by which model,- // see invokeai/frontend/web/src/features/modelManagerV2/models.ts for ref+ // see invokeai/frontend/webv1/src/features/modelManagerV2/models.ts for refconst isEntityTypeEnabled = useMemo<boolean>(() => {switch (entityType) {case 'regional_guidance':diff --git a/invokeai/frontend/webv1/src/features/cropper/README.md b/invokeai/frontend/webv1/src/features/cropper/README.mdindex 0903dab7cf..310d50c5c4 100644--- a/invokeai/frontend/webv1/src/features/cropper/README.md+++ b/invokeai/frontend/webv1/src/features/cropper/README.md@@ -2,7 +2,7 @@This is a simple image cropping canvas app built with KonvaJS ("native" Konva, _not_ the react bindings).-The editor implementation is here: invokeai/frontend/web/src/features/cropper/lib/editor.ts+The editor implementation is here: invokeai/frontend/webv1/src/features/cropper/lib/editor.tsIt is rendered in a modal.diff --git a/invokeai/frontend/webv1/src/features/deleteImageModal/README.md b/invokeai/frontend/webv1/src/features/deleteImageModal/README.mdindex 0591676530..674abee31a 100644--- a/invokeai/frontend/webv1/src/features/deleteImageModal/README.md+++ b/invokeai/frontend/webv1/src/features/deleteImageModal/README.md@@ -4,4 +4,4 @@ When users delete images, we show a confirmation dialog to prevent accidental deFor example, if an image is currently set as a field in the workflow editor, we warn the user that deleting it will remove it from the node. We warn them even if they have opted out of the confirmation dialog.-These "image usage" checks are done using redux selectors/util functions. See invokeai/frontend/web/src/features/deleteImageModal/store/state.ts+These "image usage" checks are done using redux selectors/util functions. See invokeai/frontend/webv1/src/features/deleteImageModal/store/state.tsdiff --git a/invokeai/frontend/webv1/src/features/dnd/README.md b/invokeai/frontend/webv1/src/features/dnd/README.mdindex a3ab881752..1bdfd67a02 100644--- a/invokeai/frontend/webv1/src/features/dnd/README.md+++ b/invokeai/frontend/webv1/src/features/dnd/README.md@@ -6,7 +6,7 @@ It uses the native HTML5 drag and drop API and is very performant, though a bit## Implementation-The core of our implementation is in invokeai/frontend/web/src/features/dnd/dnd.ts+The core of our implementation is in invokeai/frontend/webv1/src/features/dnd/dnd.tsWe support dragging and dropping of single or multiple images within the app. We have "dnd source" and "dnd target" abstractions.@@ -36,6 +36,6 @@ Typically the isValid function just uses the source type guard function, and theWe use the same library for other dnd things:-- When dragging over some tabbed interface, hovering the tab for a moment will switch to it. See invokeai/frontend/web/src/common/hooks/useCallbackOnDragEnter.ts for a hook that implements this functionality.-- Reordering of canvas layer lists. See invokeai/frontend/web/src/features/controlLayers/components/CanvasEntityList/CanvasEntityGroupList.tsx and invokeai/frontend/web/src/features/controlLayers/components/CanvasEntityList/useCanvasEntityListDnd.ts-- Adding node fields to a workflow form builder and restructuring the form. This gets kinda complicated, as the form builder supports arbitrary nesting of containers with stacking of elements. See invokeai/frontend/web/src/features/nodes/components/sidePanel/builder/dnd-hooks.ts+- When dragging over some tabbed interface, hovering the tab for a moment will switch to it. See invokeai/frontend/webv1/src/common/hooks/useCallbackOnDragEnter.ts for a hook that implements this functionality.+- Reordering of canvas layer lists. See invokeai/frontend/webv1/src/features/controlLayers/components/CanvasEntityList/CanvasEntityGroupList.tsx and invokeai/frontend/webv1/src/features/controlLayers/components/CanvasEntityList/useCanvasEntityListDnd.ts+- Adding node fields to a workflow form builder and restructuring the form. This gets kinda complicated, as the form builder supports arbitrary nesting of containers with stacking of elements. See invokeai/frontend/webv1/src/features/nodes/components/sidePanel/builder/dnd-hooks.tsdiff --git a/invokeai/frontend/webv1/src/features/gallery/README.md b/invokeai/frontend/webv1/src/features/gallery/README.mdindex b0c7987024..e9a12b0104 100644--- a/invokeai/frontend/webv1/src/features/gallery/README.md+++ b/invokeai/frontend/webv1/src/features/gallery/README.md@@ -30,13 +30,13 @@ The image viewer is rendered in one of the main/center panel tabs.A handful of common actions are available as buttons in the image viewer header, matching the context menu actions.-See invokeai/frontend/web/src/features/gallery/components/ContextMenu/README.md+See invokeai/frontend/webv1/src/features/gallery/components/ContextMenu/README.md### Progress viewerDuring generation, we might get "progress images" showing a low-res version of the image at each step in the denoising process. If these are available, the user can open a progress viewer overlay to see the image at each step.-Socket subscriptions and related logic for handling progress images are in the image viewer context. See invokeai/frontend/web/src/features/gallery/components/ImageViewer/context.tsx+Socket subscriptions and related logic for handling progress images are in the image viewer context. See invokeai/frontend/webv1/src/features/gallery/components/ImageViewer/context.tsx### Metadata viewerdiff --git a/invokeai/frontend/webv1/src/features/nodes/store/util/makeConnectionErrorSelector.ts b/invokeai/frontend/webv1/src/features/nodes/store/util/makeConnectionErrorSelector.tsindex fa10fcc3e6..3a13708ec0 100644--- a/invokeai/frontend/webv1/src/features/nodes/store/util/makeConnectionErrorSelector.ts+++ b/invokeai/frontend/webv1/src/features/nodes/store/util/makeConnectionErrorSelector.ts@@ -8,7 +8,7 @@ import type { AnyEdge } from 'features/nodes/types/invocation';/*** Creates a selector that validates a pending connection.*- * NOTE: The logic here must be duplicated in `invokeai/frontend/web/src/features/nodes/hooks/useIsValidConnection.ts`+ * NOTE: The logic here must be duplicated in `invokeai/frontend/webv1/src/features/nodes/hooks/useIsValidConnection.ts`* TODO: Figure out how to do this without duplicating all the logic** @param templates The invocation templatesdiff --git a/invokeai/frontend/webv1/src/features/system/components/VideosModal/data.ts b/invokeai/frontend/webv1/src/features/system/components/VideosModal/data.tsindex a9c478fc41..ead68497a7 100644--- a/invokeai/frontend/webv1/src/features/system/components/VideosModal/data.ts+++ b/invokeai/frontend/webv1/src/features/system/components/VideosModal/data.ts@@ -1,7 +1,7 @@/*** To add a support video, you'll need to add the video to the list below.*- * The `tKey` is a sub-key in the translation file `invokeai/frontend/web/public/locales/en.json`.+ * The `tKey` is a sub-key in the translation file `invokeai/frontend/webv1/public/locales/en.json`.* Add the title and description under `supportVideos.videos`, following the existing format.*/diff --git a/invokeai/frontend/webv1/src/features/ui/README.md b/invokeai/frontend/webv1/src/features/ui/README.mdindex f4c262d425..b9282dc9b8 100644--- a/invokeai/frontend/webv1/src/features/ui/README.md+++ b/invokeai/frontend/webv1/src/features/ui/README.md@@ -4,9 +4,9 @@ We use https://github.com/mathuo/dockview for layout. This library supports resiThe intention when adopting this library was to allow users to create their own custom layouts and save them. However, this feature is not yet implemented and each tab only has a predefined layout.-This works well, but it _is_ fairly complex. You can see that we've needed to write a fairly involved API to manage the layouts: invokeai/frontend/web/src/features/ui/layouts/navigation-api.ts+This works well, but it _is_ fairly complex. You can see that we've needed to write a fairly involved API to manage the layouts: invokeai/frontend/webv1/src/features/ui/layouts/navigation-api.ts-And the layouts themselves are awkward to define, especially when compared to plain JSX: invokeai/frontend/web/src/features/ui/layouts/generate-tab-auto-layout.tsx+And the layouts themselves are awkward to define, especially when compared to plain JSX: invokeai/frontend/webv1/src/features/ui/layouts/generate-tab-auto-layout.tsxThis complexity may or may not be worth it.diff --git a/invokeai/frontend/webv1/src/services/api/README.md b/invokeai/frontend/webv1/src/services/api/README.mdindex 8f675afc6f..ab65b841d8 100644--- a/invokeai/frontend/webv1/src/services/api/README.md+++ b/invokeai/frontend/webv1/src/services/api/README.md@@ -2,16 +2,16 @@The API client is a fairly standard Redux Toolkit Query (RTK-Query) setup.-It defines a simple base query with special handling for OpenAPI schema queries and endpoints: invokeai/frontend/web/src/services/api/index.ts+It defines a simple base query with special handling for OpenAPI schema queries and endpoints: invokeai/frontend/webv1/src/services/api/index.ts## Types-The API provides an OpenAPI schema and we generate TS types from it. They are stored in: invokeai/frontend/web/src/services/api/schema.ts+The API provides an OpenAPI schema and we generate TS types from it. They are stored in: invokeai/frontend/webv1/src/services/api/schema.tsWe use https://github.com/openapi-ts/openapi-typescript/ to generate the types.- Python script to output the OpenAPI schema: scripts/generate_openapi_schema.py-- Node script to call openapi-typescript and generate the TS types: invokeai/frontend/web/scripts/typegen.js+- Node script to call openapi-typescript and generate the TS types: invokeai/frontend/webv1/scripts/typegen.jsPipe the output of the python script to the node script to update the types. There is a `make` target that does this in one fell swoop (after activating venv): `make frontend-typegen`diff --git a/invokeai/frontend/webv2/AGENTS.md b/invokeai/frontend/webv2/AGENTS.mdindex d674a3c2cc..b50759902e 100644--- a/invokeai/frontend/webv2/AGENTS.md+++ b/invokeai/frontend/webv2/AGENTS.md@@ -1,6 +1,6 @@# Webv2-Read [ARCHITECTURE.md](ARCHITECTURE.md) for ownership/interface changes and affected owner-local READMEs for lifecycle/persistence. Stack: React 19, Vite, Chakra UI 3, TanStack Query/Router, @dnd-kit; legacy web differs. Webv2 is served by default; `--webv2` is a compatibility alias and `--web-legacy` selects `../web/`.+Read [ARCHITECTURE.md](ARCHITECTURE.md) for ownership/interface changes and affected owner-local READMEs for lifecycle/persistence. Stack: React 19, Vite, Chakra UI 3, TanStack Query/Router, @dnd-kit; legacy web differs. Webv2 is served by default; `--webv2` is a compatibility alias and `--web-legacy` selects `../webv1/`.## Ownership and statediff --git a/invokeai/frontend/webv2/src/architecture/architectureWorkflow.test.ts b/invokeai/frontend/webv2/src/architecture/architectureWorkflow.test.tsindex 75fba8ae5f..c0f2a9245b 100644--- a/invokeai/frontend/webv2/src/architecture/architectureWorkflow.test.ts+++ b/invokeai/frontend/webv2/src/architecture/architectureWorkflow.test.ts@@ -65,7 +65,7 @@ describe('architecture workflow', () => {if (!install) {continue;}- const expected = id.startsWith('frontend-webv2-') ? 'invokeai/frontend/webv2' : 'invokeai/frontend/web';+ const expected = id.startsWith('frontend-webv2-') ? 'invokeai/frontend/webv2' : 'invokeai/frontend/webv1';expect(install.with?.['working-directory'] ?? action.inputs['working-directory'].default, path).toBe(expected);if (job.defaults?.run) {expect(job.defaults.run['working-directory'], path).toBe(expected);diff --git a/pyproject.toml b/pyproject.tomlindex 30942a0525..d86c406145 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -74,7 +74,7 @@ dependencies = [# is fixed as of 0.124.0 — no change to AnyInvocation was needed.## Two later changes did need adapting to, both handled: 0.130 emits `contentMediaType` instead of- # `format: binary` for file uploads (see the Blob mapping in frontend/web/scripts/typegen.js), and 0.141 keeps+ # `format: binary` for file uploads (see the Blob mapping in frontend/webv1/scripts/typegen.js), and 0.141 keeps# included routers as a single node in `app.routes` rather than copying their routes into it (see# `_iter_route_contexts` in tests/app/routers/test_model_manager_authorization.py). Keep the minor-version bound:# both of those were silent breakages that only surfaced because something happened to assert on them.@@ -301,8 +301,8 @@ version = { attr = "invokeai.version.__version__" }"invokeai.generator*","invokeai.backend*","invokeai.frontend*",- "invokeai.frontend.web.dist*",- "invokeai.frontend.web.static*",+ "invokeai.frontend.webv1.dist*",+ "invokeai.frontend.webv1.static*","invokeai.configs*","invokeai.app*","invokeai.invocation_api*",@@ -327,9 +327,9 @@ version = { attr = "invokeai.version.__version__" }"invokeai.assets.fonts" = ["**/*.ttf"]"invokeai.backend" = ["**.png", "**/*.icc"]"invokeai.configs" = ["*.example", "**/*.yaml", "*.txt"]-"invokeai.frontend.web.dist" = ["**"]+"invokeai.frontend.webv1.dist" = ["**"]"invokeai.frontend.webv2.dist" = ["**"]-"invokeai.frontend.web.static" = ["**"]+"invokeai.frontend.webv1.static" = ["**"]"invokeai.app.invocations" = ["**"]#=== Begin: PyTest and Coverage@@ -370,7 +370,7 @@ exclude = ["__pycache__","build","dist",- "invokeai/frontend/web/node_modules/",+ "invokeai/frontend/webv1/node_modules/","invokeai/frontend/webv2/node_modules/",".venv*","*.ipynb",diff --git a/scripts/build_wheel.sh b/scripts/build_wheel.shindex f57a2812a8..ac25173255 100755--- a/scripts/build_wheel.sh+++ b/scripts/build_wheel.sh@@ -46,7 +46,7 @@ echo# ---------------------- FRONTEND -----------------------for frontend in webv2 web; do+for frontend in webv2 webv1; dopushd "../invokeai/frontend/$frontend" >/dev/nullecho "Installing $frontend dependencies..."pnpm install --frozen-lockfile@@ -81,7 +81,7 @@ echo -e "${BGREEN}Built PyPi distribution: ./dist${RESET}"if [[ -z ${CI} ]]; thenechoecho "Cleaning up intermediate build files..."- rm -rf InvokeAI-Installer tmp ../invokeai/frontend/webv2/dist/ ../invokeai/frontend/web/dist/+ rm -rf InvokeAI-Installer tmp ../invokeai/frontend/webv2/dist/ ../invokeai/frontend/webv1/dist/fiif [[ ! -z ${CI} ]]; thendiff --git a/tests/app/api/test_frontend.py b/tests/app/api/test_frontend.pyindex 04b4538006..398008e22e 100644--- a/tests/app/api/test_frontend.py+++ b/tests/app/api/test_frontend.py@@ -13,12 +13,12 @@ from invokeai.frontend.cli.arg_parser import InvokeAIArgs@pytest.fixturedef frontend_root(tmp_path: Path) -> Path:- for name, marker in [("webv2", "default frontend"), ("web", "legacy frontend")]:+ for name, marker in [("webv2", "default frontend"), ("webv1", "legacy frontend")]:bundle = tmp_path / name / "dist"(bundle / "assets").mkdir(parents=True)(bundle / "index.html").write_text(marker)(bundle / "assets" / "main.js").write_text(f"console.log('{marker}')")- root = tmp_path / "web"+ root = tmp_path / "webv1"(root / "static" / "docs").mkdir(parents=True)(root / "static" / "docs" / "invoke-favicon-docs.svg").write_text("<svg>docs favicon</svg>")return tmp_path / "webv2"@@ -60,8 +60,8 @@ def test_conflicting_frontend_flags_are_rejected(monkeypatch: pytest.MonkeyPatchdef test_missing_legacy_bundle_does_not_silently_serve_default(frontend_root: Path) -> None:- (frontend_root.parent / "web" / "dist").rename(frontend_root.parent / "old-dist")- with pytest.raises(RuntimeError, match="web"):+ (frontend_root.parent / "webv1" / "dist").rename(frontend_root.parent / "old-dist")+ with pytest.raises(RuntimeError, match="webv1"):mount_frontend(Starlette(), frontend_root, legacy=True)diff --git a/tests/backend/pid/test_pid_chunked_equivalence.py b/tests/backend/pid/test_pid_chunked_equivalence.pyindex ef1a821fb4..1ab3ee7586 100644--- a/tests/backend/pid/test_pid_chunked_equivalence.py+++ b/tests/backend/pid/test_pid_chunked_equivalence.py@@ -219,7 +219,7 @@ def test_context_parallelism_is_unreachable_so_chunking_cannot_interact_with_it(invokeai_root = Path(invokeai.__file__).parentvendored = invokeai_root / "backend" / "pid" / "_src"- # Scan the Python trees only: `invokeai/frontend/web` carries node_modules, which is huge and+ # Scan the Python trees only: `invokeai/frontend/webv1` carries node_modules, which is huge and# contains symlinks that break a naive walk.callers = [path