From ba1cd298e793be759fdcb2fe9312c52ef8d8aeba Mon Sep 17 00:00:00 2001
From: matt-bornstein <26883865+matt-bornstein@users.noreply.github.com>
Date: Mon, 11 Sep 2023 09:44:45 -0700
Subject: [PATCH] first working version
---
.env.example | 15 -
.vscode/launch.json | 28 ++
components/pills.js | 1 +
lib/promptFormatter.js | 5 +
lib/sdxlFineTunes.js | 95 +++++
pages/api/predictions/sdxlfinetunes.js | 207 +++++++++
pages/api/sdxlfinetunes/index.js | 8 +
pages/sdxlfinetunes.js | 556 +++++++++++++++++++++++++
yarn.lock | 189 ++++-----
9 files changed, 990 insertions(+), 114 deletions(-)
delete mode 100644 .env.example
create mode 100644 .vscode/launch.json
create mode 100644 lib/promptFormatter.js
create mode 100644 lib/sdxlFineTunes.js
create mode 100644 pages/api/predictions/sdxlfinetunes.js
create mode 100644 pages/api/sdxlfinetunes/index.js
create mode 100644 pages/sdxlfinetunes.js
diff --git a/.env.example b/.env.example
deleted file mode 100644
index 78973de..0000000
--- a/.env.example
+++ /dev/null
@@ -1,15 +0,0 @@
-# create a https://replicate.com/ account and set the api token
-REPLICATE_API_TOKEN=
-
-# https://platform.openai.com/onboarding
-OPENAI_API_KEY=
-
-# setup a supabase account and create a new project https://supabase.com/docs/guides/getting-started/quickstarts/nextjs
-# this is only required if you want your outputs to persist, or if you're using controlnet (input image uploads need to be saved to a DB)
-SUPABASE_SERVICE_ROLE=
-SUPABASE_URL=
-SUPABASE_JWT=
-SUPABASE_KEY=
-
-# install https://ngrok.com/, run it, and set the host here
-NGROK_HOST=
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..7a04397
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,28 @@
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Next.js: debug server-side",
+ "type": "node-terminal",
+ "request": "launch",
+ "command": "npm run dev"
+ },
+ {
+ "name": "Next.js: debug client-side",
+ "type": "chrome",
+ "request": "launch",
+ "url": "http://localhost:3000"
+ },
+ {
+ "name": "Next.js: debug full stack",
+ "type": "node-terminal",
+ "request": "launch",
+ "command": "npm run dev",
+ "serverReadyAction": {
+ "pattern": "started server on .+, url: (https?://.+)",
+ "uriFormat": "%s",
+ "action": "debugWithChrome"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/components/pills.js b/components/pills.js
index b5fdbe1..95a0af5 100644
--- a/components/pills.js
+++ b/components/pills.js
@@ -3,6 +3,7 @@ import { useRouter } from "next/router";
const tabs = [
{ name: "Text to Image", href: "/", current: true },
+ { name: "SDXL Fine-Tunes", href: "/sdxlfinetunes", current: false },
{ name: "ControlNet", href: "/controlnet", current: false },
{ name: "X/Y plot", href: "/xyplot", current: false },
];
diff --git a/lib/promptFormatter.js b/lib/promptFormatter.js
new file mode 100644
index 0000000..154aa20
--- /dev/null
+++ b/lib/promptFormatter.js
@@ -0,0 +1,5 @@
+export const LLAMA2_SYSTEM_PROMPT =
+ `[INST] <>
+ You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
+ If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
+ <>`
\ No newline at end of file
diff --git a/lib/sdxlFineTunes.js b/lib/sdxlFineTunes.js
new file mode 100644
index 0000000..c38018e
--- /dev/null
+++ b/lib/sdxlFineTunes.js
@@ -0,0 +1,95 @@
+import Replicate from "replicate";
+
+export default async function getFineTunes() {
+ const replicate = new Replicate({
+ auth: process.env.REPLICATE_API_TOKEN,
+ });
+
+ const promptTemplates = new Map([
+ [
+ "sdxl-tron",
+ "{prompt} in the style of TRN"
+ ],
+ [
+ "sdxl-barbie",
+ "{prompt} in the style of TOK"
+ ],
+ [
+ "sdxl-woolitize",
+ "{prompt} in the style of TOK, made of wool, focus blur"
+ ],
+ [
+ "sdxl-sonic-2",
+ "A screenshot in the style of TOK, pixel art, 2d platform game, sharp, {prompt}"
+ ],
+ [
+ "sdxl-70s-scifi",
+ "{prompt}, in the style of TOK"
+ ],
+ [
+ "sdxl-gta-v",
+ "video game art, in the style of TOK, {prompt}"
+ ],
+ [
+ "iwan-baan-sdxl",
+ "{prompt} in the style of TOK"
+ ],
+ [
+ "loteria",
+ "a {prompt} card in the style of TOK"
+ ],
+ [
+ "sdxl-vision-pro",
+ "a photo of {prompt} wearing a TOK VR headset, faces visible"
+ ],
+ [
+ "nammeh",
+ "Photo in style of NAMMEH, {prompt}"
+ ],
+ [
+ "sdxl-davinci",
+ "a drawing of {prompt} in the style of TOK"
+ ],
+ [
+ "sdxl-cross-section",
+ "A cross section TOK of {prompt}"
+ ],
+ [
+ "sdxl-money",
+ "{prompt} on a bank note in the style of TOK"
+ ],
+ [
+ "sdxl-illusions",
+ "{prompt} in the style of TOK"
+ ]
+ ]);
+
+ const collectionResponse = await replicate.collections.get("sdxl-fine-tunes")
+ return collectionResponse.models.map((m, i) => {
+ const model = {
+ id: i,
+ owner: m.owner,
+ name: m.name,
+ default_params: m.default_example.input,
+ prompt_template: promptTemplates.get(m.name),
+ prompt_example: m.default_example.input.prompt,
+ version: m.latest_version.id,
+ checked: false,
+ source: "replicate",
+ url: m.url,
+ description: m.description,
+ links: [
+ {
+ name: "replicate",
+ url: m.url
+ }
+ ],
+ // new fields
+ cover_image_url: m.cover_image_url,
+ }
+
+ delete model.default_params.prompt
+
+ return model
+ })
+}
\ No newline at end of file
diff --git a/pages/api/predictions/sdxlfinetunes.js b/pages/api/predictions/sdxlfinetunes.js
new file mode 100644
index 0000000..db71132
--- /dev/null
+++ b/pages/api/predictions/sdxlfinetunes.js
@@ -0,0 +1,207 @@
+import { Configuration, OpenAIApi } from "openai";
+import upsertPrediction from "../../../lib/upsertPrediction";
+import getFineTunes from "../../../lib/sdxlFineTunes"
+import packageData from "../../../package.json";
+import fetch from "node-fetch";
+import Replicate from "replicate";
+import { LLAMA2_SYSTEM_PROMPT } from "../../../lib/promptFormatter";
+
+const REPLICATE_API_HOST = "https://api.replicate.com";
+const STABILITY_API_HOST = "https://api.stability.ai";
+
+const WEBHOOK_HOST = process.env.VERCEL_URL
+ ? `https://${process.env.VERCEL_URL}`
+ : process.env.NGROK_HOST;
+
+const configuration = new Configuration({
+ apiKey: process.env.OPENAI_API_KEY,
+});
+
+const replicate = new Replicate({
+ auth: process.env.REPLICATE_API_TOKEN,
+});
+
+const openai = new OpenAIApi(configuration);
+
+export default async function handler(req, res) {
+ if (!process.env.REPLICATE_API_TOKEN) {
+ throw new Error(
+ "The REPLICATE_API_TOKEN environment variable is not set. See README.md for instructions on how to set it."
+ );
+ }
+
+ if (!WEBHOOK_HOST) {
+ throw new Error(
+ "WEBHOOK HOST is not set. If you're on local, make sure you set it to an ngrok url. If this doesn't exist, replicate predictions won't save to DB."
+ );
+ }
+
+ const availableModels = await getFineTunes()
+
+ if (req.body.source == "replicate") {
+ console.log("host", WEBHOOK_HOST);
+
+ const searchParams = new URLSearchParams({
+ submission_id: req.body.submission_id,
+ model: req.body.model,
+ anon_id: req.body.anon_id,
+ source: req.body.source,
+ });
+
+ let renderedPrompt
+ if (req.body.prompt_template) {
+ renderedPrompt = req.body.prompt_template.replace("{prompt}", req.body.prompt_raw)
+ }
+ else if (req.body.prompt_example) {
+ const llamaModel = "meta/llama-2-70b-chat:35042c9a33ac8fd5e29e27fb3197f33aa483f72c2ce3b0b9d201155c7fd2a287"
+ const llamaInputs = {
+ input: {
+ prompt:
+ `This is a prompt for an image generation model:
+${req.body.prompt_example}
+
+Please generate a new prompt, where the subject is replaced with the new subject "${req.body.prompt_raw}".
+
+It's important to keep the fine-tuning token identifier.
+
+Just provide the answer, not any extra commentary! And put the answer between "~" symbols.`,
+ system_prompt: LLAMA2_SYSTEM_PROMPT,
+ temperature: 0.01,
+ max_new_tokens: 500,
+ top_p: 1
+ }
+ }
+ try {
+ const llamaResponse = await replicate.run(llamaModel, llamaInputs)
+ renderedPrompt = llamaResponse.join('').match(/~([^~]+)~/)[1]
+ renderedPrompt = renderedPrompt.replace("\\", "").trim()
+ }
+ catch (e) {
+ console.log("error rendering prompt using llama2", e)
+ renderedPrompt = req.body.prompt_raw
+ }
+ }
+ else {
+ renderedPrompt = req.body.prompt_raw;
+ }
+
+ const input = req.body.input;
+ const body = JSON.stringify({
+ input: {
+ prompt: renderedPrompt,
+ ...req.body.default_params,
+ ...input,
+ },
+ version: req.body.version,
+ webhook: `${WEBHOOK_HOST}/api/replicate-webhook?${searchParams}`,
+ webhook_events_filter: ["start", "completed"],
+ });
+
+ const headers = {
+ Authorization: `Token ${process.env.REPLICATE_API_TOKEN}`,
+ "Content-Type": "application/json",
+ "User-Agent": `${packageData.name}/${packageData.version}`,
+ };
+
+ const response = await fetch(`${REPLICATE_API_HOST}/v1/predictions`, {
+ method: "POST",
+ headers,
+ body,
+ });
+
+ if (response.status !== 201) {
+ let error = await response.json();
+ res.statusCode = 500;
+ res.end(JSON.stringify({ detail: error.detail }));
+ return;
+ }
+
+ const prediction = await response.json();
+ res.statusCode = 201;
+ res.end(JSON.stringify(prediction));
+ } else if (req.body.source == "openai") {
+ const response = await openai.createImage({
+ prompt: req.body.prompt,
+ ...req.body.default_params,
+ });
+
+ const prediction = {
+ id: req.body.id,
+ status: "succeeded",
+ version: "dall-e",
+ output: [response.data.data[0].url],
+ input: { prompt: req.body.prompt },
+ model: req.body.model,
+ inserted_at: new Date(),
+ created_at: new Date(),
+ submission_id: req.body.submission_id,
+ source: req.body.source,
+ anon_id: req.body.anon_id,
+ };
+
+ await upsertPrediction(prediction);
+
+ res.statusCode = 201;
+ res.end(JSON.stringify(prediction));
+ } else if (req.body.source == "stability") {
+ const apiKey = process.env.STABILITY_API_KEY;
+ if (!apiKey) throw new Error("Missing Stability API key.");
+
+ const engineId = "stable-diffusion-xl-1024-v0-9";
+ const seed = Math.floor(Math.random() * 1000000);
+ const prompt = req.body.prompt;
+
+ const response = await fetch(
+ `${STABILITY_API_HOST}/v1/generation/${engineId}/text-to-image`,
+ {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Accept: "application/json",
+ Authorization: `Bearer ${apiKey}`,
+ },
+ body: JSON.stringify({
+ text_prompts: [
+ {
+ text: prompt,
+ },
+ ],
+ ...req.body.default_params,
+ seed,
+ }),
+ }
+ );
+
+ const responseJSON = await response.json();
+
+ if (!response.ok) {
+ throw new Error(`Non-200 response: ${await response.text()}`);
+ }
+
+ console.log(
+ `data is ${JSON.stringify(Object.keys(responseJSON.artifacts[0]))}`
+ );
+
+ const prediction = {
+ id: req.body.id,
+ status: "succeeded",
+ version: "stability",
+ output: [responseJSON.artifacts[0].base64],
+ input: { prompt: req.body.prompt },
+ model: req.body.model,
+ inserted_at: new Date(),
+ created_at: new Date(),
+ submission_id: req.body.submission_id,
+ source: req.body.source,
+ anon_id: req.body.anon_id,
+ seed: seed,
+ };
+ await upsertPrediction(prediction);
+
+ // ask charlie or jesse about this
+ delete prediction.output;
+
+ res.statusCode = 201;
+ res.end(JSON.stringify(prediction));
+ }
+}
diff --git a/pages/api/sdxlfinetunes/index.js b/pages/api/sdxlfinetunes/index.js
new file mode 100644
index 0000000..ebfc124
--- /dev/null
+++ b/pages/api/sdxlfinetunes/index.js
@@ -0,0 +1,8 @@
+// import Replicate from "replicate";
+import getFineTunes from "../../../lib/sdxlFineTunes"
+
+export default async function handler(req, res) {
+ const models = await getFineTunes()
+
+ res.end(JSON.stringify(models))
+}
\ No newline at end of file
diff --git a/pages/sdxlfinetunes.js b/pages/sdxlfinetunes.js
new file mode 100644
index 0000000..b942d89
--- /dev/null
+++ b/pages/sdxlfinetunes.js
@@ -0,0 +1,556 @@
+import { useState, useEffect } from "react";
+import Prediction from "../components/prediction";
+import Popup from "../components/popup";
+import ZooHead from "../components/zoo-head";
+import ExternalLink from "../components/external-link";
+import promptmaker from "promptmaker";
+import Link from "next/link";
+import { v4 as uuidv4 } from "uuid";
+import { useRouter } from "next/router";
+import Pills from "../components/pills";
+
+const HOST = process.env.VERCEL_URL
+ ? `https://${process.env.VERCEL_URL}`
+ : "http://localhost:3000";
+
+import seeds from "../lib/seeds.js";
+
+const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
+
+export default function Home({ baseUrl, submissionPredictions, availableModels }) {
+ const router = useRouter();
+ const { id } = router.query;
+ const [prompt, setPrompt] = useState("");
+ const [predictions, setPredictions] = useState([]);
+ const [error, setError] = useState(null);
+ const [numOutputs, setNumOutputs] = useState(3);
+ const [firstTime, setFirstTime] = useState(false);
+ const [models, setModels] = useState([]);
+ const [anonId, setAnonId] = useState(null);
+ const [loading, setLoading] = useState(true);
+ const [numRuns, setNumRuns] = useState(1);
+ const [popupOpen, setPopupOpen] = useState(false);
+
+ async function getPredictionsFromSeed(seed) {
+ const response = await fetch(`/api/submissions/${seed}`, {
+ method: "GET",
+ });
+ submissionPredictions = await response.json();
+ setPredictions(submissionPredictions);
+
+ // get the model names from the predictions, and update which ones are checked
+ const modelNames = getModelsFromPredictions(submissionPredictions);
+ updateCheckedModels(modelNames);
+
+ // get the prompt from the predictions, and update the prompt
+ const submissionPrompt = getPromptFromPredictions(submissionPredictions);
+ setPrompt(submissionPrompt);
+ setLoading(false);
+ }
+
+ function getPromptFromPredictions(predictions) {
+ if (predictions.length == 0) {
+ return "";
+ }
+ return predictions[0].input.prompt;
+ }
+
+ function getModelsFromPredictions(predictions) {
+ return predictions.map((p) => p.model);
+ }
+
+ function predictionsStillRunning(predictions) {
+ return predictions.some((p) => p.status != "succeeded");
+ }
+
+ const updateCheckedModels = (modelNames) => {
+ // Create a new array where each model's `checked` value is updated
+ const updatedModels = availableModels.map((model) => {
+ // If the model's name is in the list of names, set `checked` to true, else set it to false
+ return {
+ ...model,
+ checked: modelNames.includes(model.name),
+ };
+ });
+
+ // Update the state with the new array
+ setModels(updatedModels);
+ };
+
+ function getSelectedModels() {
+ return models.filter((m) => m.checked);
+ }
+
+ function getPredictionsByVersion(version) {
+ return predictions.filter((p) => p.version === version);
+ }
+
+ const handleCheckboxChange = (e) => {
+ const modelId = parseInt(e.target.value, 10);
+
+ // Update the checked flag for the model with the matching modelId
+ const updatedModels = models.map((model) => {
+ if (model.id === modelId) {
+ return {
+ ...model,
+ checked: e.target.checked,
+ };
+ }
+ return model;
+ });
+
+ // Set the new models array
+ setModels(updatedModels);
+
+ // save to local storage
+ localStorage.setItem("models", JSON.stringify(updatedModels));
+ };
+
+ // cmd + enter to submit
+ const onKeyDown = (e) => {
+ if (e.metaKey && e.which === 13) {
+ handleSubmit(e, prompt);
+ }
+ };
+
+ function ogParams() {
+ return new URLSearchParams({
+ done: !predictionsStillRunning(predictions),
+ prompt: getPromptFromPredictions(submissionPredictions),
+ ids: submissionPredictions.map((prediction) => prediction.id).join(","),
+ });
+ }
+
+ async function postPrediction(prompt, model, submissionId) {
+ model.default_params.width = 1024
+ model.default_params.height = 1024
+ model.default_params.num_outputs = 1
+ return fetch("/api/predictions/sdxlfinetunes", {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({
+ prompt_raw: prompt,
+ prompt_template: model.prompt_template,
+ prompt_example: model.prompt_example,
+ version: model.version,
+ source: model.source,
+ model: model.name,
+ default_params: model.default_params,
+ anon_id: anonId,
+ submission_id: submissionId,
+ ...(model.source != "replicate" && { id: uuidv4() }),
+ ...(model.source != "replicate" && {
+ created_at: new Date().toISOString(),
+ }),
+ }),
+ });
+ }
+
+ async function createReplicatePrediction(prompt, model, submissionId) {
+ const response = await postPrediction(prompt, model, submissionId);
+ let prediction = await response.json();
+
+ if (response.status !== 201) {
+ throw new Error(prediction.detail);
+ }
+
+ while (
+ prediction.status !== "succeeded" &&
+ prediction.status !== "failed"
+ ) {
+ await sleep(500);
+ const response = await fetch("/api/predictions/" + prediction.id);
+ prediction = await response.json();
+ console.log(prediction);
+ if (response.status !== 200) {
+ throw new Error(prediction.detail);
+ }
+ }
+
+ prediction.model = model.name;
+ prediction.source = model.source;
+
+ return prediction;
+ }
+
+ async function createDallePrediction(prompt, model, submissionId) {
+ const response = await postPrediction(prompt, model, submissionId);
+
+ let prediction = await response.json();
+ prediction.source = model.source;
+ prediction.version = model.version;
+
+ return prediction;
+ }
+
+ const handleSubmit = async (e, prompt) => {
+ e.preventDefault();
+ setError(null);
+ setFirstTime(false);
+
+ // update num runs and save to local storage
+ const newNumRuns = Number(numRuns) + 1;
+ setNumRuns(newNumRuns);
+ localStorage.setItem("numRuns", newNumRuns);
+
+ const hasClosedPopup = localStorage.getItem("hasClosedPopup");
+
+ if (!hasClosedPopup && newNumRuns != 0 && newNumRuns % 10 == 0) {
+ setPopupOpen(true);
+ }
+
+ const submissionId = uuidv4();
+
+ for (const model of getSelectedModels()) {
+ // Use the model variable to generate predictions with the selected model
+ for (let i = 0; i < numOutputs; i++) {
+ let promise = null;
+
+ if (model.source == "replicate") {
+ promise = createReplicatePrediction(prompt, model, submissionId);
+ } else if (model.source == "openai") {
+ promise = createDallePrediction(prompt, model, submissionId);
+ } else if (model.source == "stability") {
+ promise = createDallePrediction(prompt, model, submissionId);
+ }
+
+ promise.model = model.name;
+ promise.source = model.source;
+ promise.version = model.version;
+
+ setPredictions((prev) => [...prev, promise]);
+
+ promise
+ .then((result) => {
+ setPredictions((prev) =>
+ prev.map((x) => (x === promise ? result : x))
+ );
+ })
+ .catch((error) => setError(error.message));
+ }
+ }
+
+ // push router to new page
+ router.query.id = submissionId;
+ router.push(router);
+ };
+
+ function checkOrder(list1, list2) {
+ // Check if both lists are of the same length
+ if (list1.length !== list2.length) {
+ return false;
+ }
+
+ // Check if names are in the same order
+ for (let i = 0; i < list1.length; i++) {
+ if (list1[i].name !== list2[i].name) {
+ return false;
+ }
+ }
+
+ // If we made it here, the names are in the same order
+ return true;
+ }
+
+ useEffect(() => {
+ console.log(
+ submissionPredictions.map((prediction) => prediction.id).join(",")
+ );
+ const anonId = localStorage.getItem("anonId");
+ const storedModels = localStorage.getItem("models");
+ setLoading(true);
+
+ // if the page has an id set
+ if (id) {
+ setPredictions(submissionPredictions);
+
+ // get the model names from the predictions, and update which ones are checked
+ const modelNames = getModelsFromPredictions(submissionPredictions);
+ updateCheckedModels(modelNames);
+
+ // get the prompt from the predictions, and update the prompt
+ const submissionPrompt = getPromptFromPredictions(submissionPredictions);
+ setPrompt(submissionPrompt);
+
+ setLoading(false);
+ } else {
+ // load random seed
+ if (router.isReady) {
+ const seed = seeds[Math.floor(Math.random() * seeds.length)];
+
+ getPredictionsFromSeed(seed);
+ router.query.id = seed;
+ router.push(router);
+ }
+ }
+
+ // get number of runs from local storage
+ const storedNumRuns = localStorage.getItem("numRuns");
+ if (storedNumRuns) {
+ setNumRuns(storedNumRuns);
+ } else {
+ localStorage.setItem("numRuns", numRuns);
+ }
+
+ // setup id
+ if (!anonId) {
+ const uuid = uuidv4();
+ localStorage.setItem("anonId", uuid);
+ setAnonId(uuid);
+ setFirstTime(true);
+ } else {
+ console.log("returning user: ", anonId);
+ setAnonId(anonId);
+ }
+ }, []);
+
+ console.log("predictions: ", predictions);
+
+ return (
+
+ {/* Header */}
+
0
+ ? getPromptFromPredictions(submissionPredictions)
+ : "Compare text-to-image models like Stable Diffusion and DALL-E"
+ }
+ ogImage={`${baseUrl}/api/og?${ogParams()}`}
+ />
+
+ {/* Tabs */}
+
+
+
+ {/* Welcome message */}
+
+
+
+
+ {firstTime && (
+
+ Welcome to the Zoo, a playground for text to image models.{" "}
+
+ )}
+
+ What do you want to see?
+
+
+
+
+
+
+ {/* Prompt input */}
+
+
+ {/* Loading message */}
+ {loading && "Loading..."}
+
+ {/* Model selector */}
+
+
SDXL Fine-Tunes
+
+ {models.map((model) => (
+
+
+
+
+
+
+ ))}
+
+
+
+ {/* Outputs */}
+
+ {/*
Model Outputs
*/}
+ {!loading && getSelectedModels().length == 0 &&
}
+
+ {getSelectedModels().map((model) => (
+
+
+ {/* Model description */}
+
+
+
+ {model.owner}
+
+
+
+
+ {model.name}
+
+
+
+ {model.description}
+
+
+
+ {model.links != null &&
+ model.links.map((link) => (
+
+ ))}
+
+
+
+ {/* Row for predictions */}
+
+ {getPredictionsByVersion(model.version)
+ .reverse()
+ .map((prediction) => (
+ <>
+
+ >
+ ))}
+
+
+
+ ))}
+
+
+
+ );
+}
+
+
+export function EmptyState() {
+ return (
+
+
+
+ No model selected!
+
+
Select a fine-tune above.
+
+ );
+}
+export function EmptyStateHistory() {
+ return (
+
+
+
+ No memories yet!
+
+
Create some images first.
+
+ );
+}
+
+// Use getServerSideProps to force Next.js to render the page on the server,
+// so the OpenGraph meta tags will have the proper URL at render time.
+export async function getServerSideProps({ req }) {
+ // Hack to get the protocol and host from headers:
+ // https://github.com/vercel/next.js/discussions/44527
+ const protocol = req.headers.referer?.split("://")[0] || "http";
+ const submissionId = req.url.split("?id=")[1];
+ const baseUrl = `${protocol}://${req.headers.host}`;
+
+ let submissionPredictions = [];
+ console.log(`submissionId: ${submissionId}`);
+
+ const availableModelsResponse = await fetch(`${baseUrl}/api/sdxlfinetunes`);
+ const availableModels = await availableModelsResponse.json();
+
+ if (submissionId) {
+ const response = await fetch(`${baseUrl}/api/submissions/${submissionId}`, {
+ method: "GET",
+ });
+ submissionPredictions = await response.json();
+ }
+
+ return { props: { baseUrl, submissionPredictions, availableModels } };
+}
diff --git a/yarn.lock b/yarn.lock
index b3c979b..727a735 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -232,16 +232,16 @@
resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
-"@jridgewell/sourcemap-codec@1.4.14":
- version "1.4.14"
- resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz"
- integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
-
"@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.15"
resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz"
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
+"@jridgewell/sourcemap-codec@1.4.14":
+ version "1.4.14"
+ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz"
+ integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
+
"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9":
version "0.3.18"
resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz"
@@ -274,46 +274,6 @@
resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.2.tgz"
integrity sha512-6BBlqGu3ewgJflv9iLCwO1v1hqlecaIH2AotpKfVUEzUxuuDNJQZ2a4KLb4MBl8T9/vca1YuWhSqtbF6ZuUJJw==
-"@next/swc-darwin-x64@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.2.tgz#09a800bed8dfe4beec4cbf14092f9c22db24470b"
- integrity sha512-iZuYr7ZvGLPjPmfhhMl0ISm+z8EiyLBC1bLyFwGBxkWmPXqdJ60mzuTaDSr5WezDwv0fz32HB7JHmRC6JVHSZg==
-
-"@next/swc-linux-arm64-gnu@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.2.tgz#b7ade28834564120b0b25ffa0b79d75982d290bc"
- integrity sha512-2xVabFtIge6BJTcJrW8YuUnYTuQjh4jEuRuS2mscyNVOj6zUZkom3CQg+egKOoS+zh2rrro66ffSKIS+ztFJTg==
-
-"@next/swc-linux-arm64-musl@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.2.tgz#f5420548234d35251630ddaa2e9a7dc32337a887"
- integrity sha512-wKRCQ27xCUJx5d6IivfjYGq8oVngqIhlhSAJntgXLt7Uo9sRT/3EppMHqUZRfyuNBTbykEre1s5166z+pvRB5A==
-
-"@next/swc-linux-x64-gnu@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.2.tgz#0241dc011d73f08df9d9998cffdfcf08d1971520"
- integrity sha512-NpCa+UVhhuNeaFVUP1Bftm0uqtvLWq2JTm7+Ta48+2Uqj2mNXrDIvyn1DY/ZEfmW/1yvGBRaUAv9zkMkMRixQA==
-
-"@next/swc-linux-x64-musl@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.2.tgz#fd35919e2b64b1c739583145799fefd594ef5d63"
- integrity sha512-ZWVC72x0lW4aj44e3khvBrj2oSYj1bD0jESmyah3zG/3DplEy/FOtYkMzbMjHTdDSheso7zH8GIlW6CDQnKhmQ==
-
-"@next/swc-win32-arm64-msvc@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.2.tgz#fa95d2dbb97707c130a868a1bd7e83e64bedf4c6"
- integrity sha512-pLT+OWYpzJig5K4VKhLttlIfBcVZfr2+Xbjra0Tjs83NQSkFS+y7xx+YhCwvpEmXYLIvaggj2ONPyjbiigOvHQ==
-
-"@next/swc-win32-ia32-msvc@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.2.tgz#31a98e61d3cda92ec2293c50df7cb5280fc63697"
- integrity sha512-dhpiksQCyGca4WY0fJyzK3FxMDFoqMb0Cn+uDB+9GYjpU2K5//UGPQlCwiK4JHxuhg8oLMag5Nf3/IPSJNG8jw==
-
-"@next/swc-win32-x64-msvc@13.4.2":
- version "13.4.2"
- resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.2.tgz#8435ab6087046355f5de07122d3097949e8fab10"
- integrity sha512-O7bort1Vld00cu8g0jHZq3cbSTUNMohOEvYqsqE10+yfohhdPHzvzO+ziJRz4Dyyr/fYKREwS7gR4JC0soSOMw==
-
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz"
@@ -322,7 +282,7 @@
"@nodelib/fs.stat" "2.0.5"
run-parallel "^1.1.9"
-"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2":
+"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5":
version "2.0.5"
resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz"
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
@@ -556,16 +516,16 @@ acorn-walk@^7.0.0:
resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz"
integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
+"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.8.0:
+ version "8.8.1"
+ resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz"
+ integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==
+
acorn@^7.0.0:
version "7.4.1"
resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz"
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
-acorn@^8.8.0:
- version "8.8.1"
- resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz"
- integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==
-
ajv@^6.10.0, ajv@^6.12.4:
version "6.12.6"
resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz"
@@ -762,7 +722,7 @@ braces@^3.0.2, braces@~3.0.2:
dependencies:
fill-range "^7.0.1"
-browserslist@^4.21.5:
+browserslist@^4.21.5, "browserslist@>= 4.21.0":
version "4.21.5"
resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz"
integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==
@@ -772,7 +732,7 @@ browserslist@^4.21.5:
node-releases "^2.0.8"
update-browserslist-db "^1.0.10"
-bufferutil@4.0.7, bufferutil@^4.0.1:
+bufferutil@^4.0.1, bufferutil@4.0.7:
version "4.0.7"
resolved "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz"
integrity sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==
@@ -851,7 +811,7 @@ classnames@^2.3.0:
resolved "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz"
integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==
-client-only@0.0.1, client-only@^0.0.1:
+client-only@^0.0.1, client-only@0.0.1:
version "0.0.1"
resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz"
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
@@ -870,16 +830,16 @@ color-convert@^2.0.1:
dependencies:
color-name "~1.1.4"
-color-name@1.1.3:
- version "1.1.3"
- resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
- integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
-
color-name@^1.1.4, color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz"
+ integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
+
combined-stream@^1.0.8:
version "1.0.8"
resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz"
@@ -942,7 +902,12 @@ cssesc@^3.0.0:
resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz"
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
-d@1, d@^1.0.1:
+csstype@^3.0.10:
+ version "3.1.2"
+ resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz"
+ integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
+
+d@^1.0.1, d@1:
version "1.0.1"
resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz"
integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==
@@ -960,7 +925,14 @@ data-uri-to-buffer@^4.0.0:
resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz"
integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==
-debug@^2.2.0, debug@^2.6.9:
+debug@^2.2.0:
+ version "2.6.9"
+ resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+debug@^2.6.9:
version "2.6.9"
resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
@@ -1203,7 +1175,7 @@ eslint-module-utils@^2.7.3:
dependencies:
debug "^3.2.7"
-eslint-plugin-import@^2.26.0:
+eslint-plugin-import@*, eslint-plugin-import@^2.26.0:
version "2.26.0"
resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz"
integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==
@@ -1292,7 +1264,7 @@ eslint-visitor-keys@^3.3.0:
resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
-eslint@8.29.0:
+eslint@*, "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^3 || ^4 || ^5 || ^6 || ^7 || ^8", "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", "eslint@^6.0.0 || ^7.0.0 || ^8.0.0", "eslint@^7.23.0 || ^8.0.0", eslint@>=5, eslint@8.29.0:
version "8.29.0"
resolved "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz"
integrity sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==
@@ -1541,7 +1513,7 @@ get-tsconfig@^4.2.0:
resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.2.0.tgz"
integrity sha512-X8u8fREiYOE6S8hLbq99PeykTDoLVnxvF4DjWKJmz9xy2nNRdUcV8ZN9tniJFeKyTU3qnC9lL8n4Chd6LmVKHg==
-glob-parent@^5.1.2, glob-parent@~5.1.2:
+glob-parent@^5.1.2:
version "5.1.2"
resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -1555,7 +1527,14 @@ glob-parent@^6.0.2:
dependencies:
is-glob "^4.0.3"
-glob@7.1.7, glob@^7.1.3:
+glob-parent@~5.1.2:
+ version "5.1.2"
+ resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz"
+ integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob@^7.1.3, glob@7.1.7:
version "7.1.7"
resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz"
integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==
@@ -2008,16 +1987,16 @@ minimist@^1.2.0, minimist@^1.2.6:
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz"
integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
+ms@^2.1.1, ms@2.1.2:
+ version "2.1.2"
+ resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
ms@2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==
-ms@2.1.2, ms@^2.1.1:
- version "2.1.2"
- resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
- integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-
nanoid@^3.3.4:
version "3.3.4"
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz"
@@ -2061,13 +2040,6 @@ node-domexception@^1.0.0:
resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz"
integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==
-node-fetch@2.6.7:
- version "2.6.7"
- resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz"
- integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
- dependencies:
- whatwg-url "^5.0.0"
-
node-fetch@^3.3.1:
version "3.3.1"
resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz"
@@ -2077,6 +2049,13 @@ node-fetch@^3.3.1:
fetch-blob "^3.1.4"
formdata-polyfill "^4.0.10"
+node-fetch@2.6.7:
+ version "2.6.7"
+ resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz"
+ integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
+ dependencies:
+ whatwg-url "^5.0.0"
+
node-gyp-build@^4.3.0:
version "4.6.0"
resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz"
@@ -2337,19 +2316,19 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.0.2, postcss-value-parser@^
resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
-postcss@8.4.14:
- version "8.4.14"
- resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz"
- integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
+postcss@^8.0.0, postcss@^8.0.9, postcss@^8.1.0, postcss@^8.2.14, postcss@^8.4.21, postcss@>=8.0.9:
+ version "8.4.21"
+ resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz"
+ integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==
dependencies:
nanoid "^3.3.4"
picocolors "^1.0.0"
source-map-js "^1.0.2"
-postcss@^8.0.9, postcss@^8.4.21:
- version "8.4.21"
- resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz"
- integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==
+postcss@8.4.14:
+ version "8.4.14"
+ resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz"
+ integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
dependencies:
nanoid "^3.3.4"
picocolors "^1.0.0"
@@ -2382,7 +2361,7 @@ prelude-ls@^1.2.1:
resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
-prisma@^4.14.0:
+prisma@*, prisma@^4.14.0:
version "4.14.0"
resolved "https://registry.npmjs.org/prisma/-/prisma-4.14.0.tgz"
integrity sha512-+5dMl1uxMQb4RepndY6AwR9xi1cDcaGFICu+ws6/Nmgt93mFPNj8tYxSfTdmfg+rkNrUId9rk/Ac2vTgLe/oXA==
@@ -2425,7 +2404,7 @@ quick-lru@^5.1.1:
resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz"
integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
-react-dom@18.2.0:
+"react-dom@^16 || ^17 || ^18", react-dom@^18.0.0, react-dom@^18.2.0, "react-dom@>= 16.8.0", react-dom@>=16, react-dom@>=16.14.0, react-dom@18.2.0:
version "18.2.0"
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
@@ -2448,7 +2427,7 @@ react-hot-toast@^2.4.1:
dependencies:
goober "^2.1.10"
-react-is@^16.13.1, react-is@^16.7.0:
+react-is@^16.13.1, react-is@^16.7.0, "react-is@>= 16.8.0":
version "16.13.1"
resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
@@ -2461,7 +2440,7 @@ react-tooltip@^5.13.0:
"@floating-ui/dom" "^1.0.0"
classnames "^2.3.0"
-react@18.2.0:
+"react@^16 || ^17 || ^18", react@^18.0.0, react@^18.2.0, "react@>= 16", "react@>= 16.8.0", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", react@>=16, react@>=16.14.0, react@18.2.0:
version "18.2.0"
resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
@@ -2698,7 +2677,7 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
-styled-components@^5.3.0:
+styled-components@^5.3.0, "styled-components@>= 2":
version "5.3.11"
resolved "https://registry.npmjs.org/styled-components/-/styled-components-5.3.11.tgz"
integrity sha512-uuzIIfnVkagcVHv9nE0VPlHPSCmXIUGKfJ42LNjxCCTDTL5sgnJ8Z7GZBq0EnLYGln77tPpEpExt2+qa+cZqSw==
@@ -2721,7 +2700,14 @@ styled-jsx@5.1.1:
dependencies:
client-only "0.0.1"
-supports-color@^5.3.0, supports-color@^5.5.0:
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^5.5.0:
version "5.5.0"
resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz"
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
@@ -2873,6 +2859,11 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"
+"typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@>=3.3.1:
+ version "4.9.4"
+ resolved "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz"
+ integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
+
unbox-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz"
@@ -2906,13 +2897,6 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"
-utf-8-validate@6.0.3:
- version "6.0.3"
- resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.3.tgz"
- integrity sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==
- dependencies:
- node-gyp-build "^4.3.0"
-
utf-8-validate@^5.0.2:
version "5.0.10"
resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz"
@@ -2920,6 +2904,13 @@ utf-8-validate@^5.0.2:
dependencies:
node-gyp-build "^4.3.0"
+utf-8-validate@>=5.0.2, utf-8-validate@6.0.3:
+ version "6.0.3"
+ resolved "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.3.tgz"
+ integrity sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==
+ dependencies:
+ node-gyp-build "^4.3.0"
+
util-deprecate@^1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
@@ -3018,7 +3009,7 @@ yocto-queue@^0.1.0:
resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
-yoga-wasm-web@0.3.3, yoga-wasm-web@^0.3.3:
+yoga-wasm-web@^0.3.3, yoga-wasm-web@0.3.3:
version "0.3.3"
resolved "https://registry.npmjs.org/yoga-wasm-web/-/yoga-wasm-web-0.3.3.tgz"
integrity sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==