+
+The AI Toolkit UI is a web interface for the AI Toolkit. It allows you to easily start, stop, and monitor jobs. It also allows you to easily train models with a few clicks. It is still in early beta and will likely have bugs and frequent breaking changes. It is currently only tested on linux for now.
+
+
+WARNING: The UI is not secure and should not be exposed to the internet. It is only meant to be run locally or on a server that does not have ports exposed. Adding additional security is on the roadmap.
+
+## Installing the UI
+
+Requirements:
+- Node.js > 18
+
+You will need to do this with every update as well.
+
+```bash
+cd ui
+npm install
+npm run build
+npm run update_db
+```
+
+## Running the UI
+
+Make sure you built it as shown above. The UI does not need to be kept running for the jobs to run. It is only needed to start/stop/monitor jobs.
+
+```bash
+cd ui
+npm run start
+```
+
+You can now access the UI at `http://localhost:8675` or `http://
-
----
-
-## TODO
-- [X] Add proper regs on sliders
-- [X] Add SDXL support (base model only for now)
-- [ ] Add plain erasing
-- [ ] Make Textual inversion network trainer (network that spits out TI embeddings)
-
----
-
-## Change Log
-
-#### 2023-08-05
- - Huge memory rework and slider rework. Slider training is better thant ever with no more
-ram spikes. I also made it so all 4 parts of the slider algorythm run in one batch so they share gradient
-accumulation. This makes it much faster and more stable.
- - Updated the example config to be something more practical and more updated to current methods. It is now
-a detail slide and shows how to train one without a subject. 512x512 slider training for 1.5 should work on
-6GB gpu now. Will test soon to verify.
-
-
-#### 2021-10-20
- - Windows support bug fixes
- - Extensions! Added functionality to make and share custom extensions for training, merging, whatever.
-check out the example in the `extensions` folder. Read more about that above.
- - Model Merging, provided via the example extension.
-
-#### 2023-08-03
-Another big refactor to make SD more modular.
-
-Made batch image generation script
-
-#### 2023-08-01
-Major changes and update. New LoRA rescale tool, look above for details. Added better metadata so
-Automatic1111 knows what the base model is. Added some experiments and a ton of updates. This thing is still unstable
-at the moment, so hopefully there are not breaking changes.
-
-Unfortunately, I am too lazy to write a proper changelog with all the changes.
-
-I added SDXL training to sliders... but.. it does not work properly.
-The slider training relies on a model's ability to understand that an unconditional (negative prompt)
-means you do not want that concept in the output. SDXL does not understand this for whatever reason,
-which makes separating out
-concepts within the model hard. I am sure the community will find a way to fix this
-over time, but for now, it is not
-going to work properly. And if any of you are thinking "Could we maybe fix it by adding 1 or 2 more text
-encoders to the model as well as a few more entirely separate diffusion networks?" No. God no. It just needs a little
-training without every experimental new paper added to it. The KISS principal.
-
-
-#### 2023-07-30
-Added "anchors" to the slider trainer. This allows you to set a prompt that will be used as a
-regularizer. You can set the network multiplier to force spread consistency at high weights
-
diff --git a/ui/next.config.ts b/ui/next.config.ts
index 4ae5a673..8655fe00 100644
--- a/ui/next.config.ts
+++ b/ui/next.config.ts
@@ -1,7 +1,10 @@
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
- /* config options here */
+ typescript: {
+ // Remove this. Build fails because of route types
+ ignoreBuildErrors: true,
+ },
experimental: {
serverActions: {
bodySizeLimit: '100mb',
diff --git a/ui/package.json b/ui/package.json
index 88a938bc..2a461afc 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -5,9 +5,9 @@
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
- "start": "next start",
+ "start": "next start --port 8675",
"lint": "next lint",
- "update_db": "npx prisma generate && npx prisma db push",
+ "update_db": "npx prisma generate ; npx prisma db push",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css,scss}\""
},
"dependencies": {
diff --git a/ui/src/app/api/caption/[...imagePath]/route.ts b/ui/src/app/api/caption/[...imagePath]/route.ts
index 7aa0e07f..6919aa93 100644
--- a/ui/src/app/api/caption/[...imagePath]/route.ts
+++ b/ui/src/app/api/caption/[...imagePath]/route.ts
@@ -1,4 +1,4 @@
-// src/app/api/img/[imagePath]/route.ts
+/* eslint-disable */
import { NextRequest, NextResponse } from 'next/server';
import fs from 'fs';
import path from 'path';
diff --git a/ui/src/app/api/files/[...filePath]/route.ts b/ui/src/app/api/files/[...filePath]/route.ts
index 9c9b9398..44076e40 100644
--- a/ui/src/app/api/files/[...filePath]/route.ts
+++ b/ui/src/app/api/files/[...filePath]/route.ts
@@ -1,3 +1,4 @@
+/* eslint-disable */
import { NextRequest, NextResponse } from 'next/server';
import fs from 'fs';
import path from 'path';
diff --git a/ui/src/app/api/img/[...imagePath]/route.ts b/ui/src/app/api/img/[...imagePath]/route.ts
index 45586c44..8c28275e 100644
--- a/ui/src/app/api/img/[...imagePath]/route.ts
+++ b/ui/src/app/api/img/[...imagePath]/route.ts
@@ -1,4 +1,4 @@
-// src/app/api/img/[imagePath]/route.ts
+/* eslint-disable */
import { NextRequest, NextResponse } from 'next/server';
import fs from 'fs';
import path from 'path';
diff --git a/ui/src/app/layout.tsx b/ui/src/app/layout.tsx
index 6e379e58..292c78c4 100644
--- a/ui/src/app/layout.tsx
+++ b/ui/src/app/layout.tsx
@@ -5,6 +5,7 @@ import Sidebar from '@/components/Sidebar';
import { ThemeProvider } from '@/components/ThemeProvider';
import ConfirmModal from '@/components/ConfirmModal';
import SampleImageModal from '@/components/SampleImageModal';
+import { Suspense } from 'react';
const inter = Inter({ subsets: ['latin'] });
@@ -23,7 +24,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })