The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Accounts keep 5 GB of files, from the day they sign up
Adarsh97649c0ab759
diff --git a/docs/public-signup.md b/docs/public-signup.mdindex 673ece25..c2e88176 100644--- a/docs/public-signup.md+++ b/docs/public-signup.md@@ -213,8 +213,7 @@ so the callback address matches the one registered.The owner sees everyone who signed up in **Settings → Accounts**, the last section of Settings (the**Accounts** chip at the top of Settings and the link under Public sign-up lead there): email,whether its own GPU is connected, its runs (all time, in the last 7 days, running now, failed in the-last 7 days), when it last ran, and the space its files take against its limit (1 GB in its first 7-days, then 3 GB). On wide screens the list also shows when the account was created and its last+last 7 days), when it last ran, and the space its files take against its limit (5 GB). On wide screens the list also shows when the account was created and its lastlog-in (the CSV always has them). Running now counts as the run limit does: a batch or a chaingoing is one run. A line above the list gives the runs of every account in the last 24 hours and 7days, the runs going now, and the space all accounts' files take against their share of the disk.@@ -1037,8 +1036,8 @@ sent that way answers 403 `connect-gpu`, and a model run still needs the account- The type is read from the file's first bytes. A file that isn't one of these answers 415.- `Content-Length` is required (411), and a file over its size answers 413 before it is read.-- An account keeps up to 1 GB of uploads and 3 GB of files in all (uploads and results); in its- first 7 days, 1 GB in all. Past that, uploads and runs answer 413: delete some runs to make room.+- An account keeps up to 1 GB of uploads and 5 GB of files in all (uploads and results), from the+ day it signs up, existing accounts too. Past that, uploads and runs answer 413: delete some runs to make room.- All accounts together keep at most a quarter of the data disk (`FUOBE_ACCOUNTS_DISK_GB` setsit), and the disk always keeps its free floor (`FUOBE_ACCOUNT_DISK_FREE_GB`). Past either,account uploads and runs answer 503 "short of space"; the owner's work is not affected.diff --git a/src/app/api/uploads/route.ts b/src/app/api/uploads/route.tsindex 92efdff5..01b68214 100644--- a/src/app/api/uploads/route.ts+++ b/src/app/api/uploads/route.ts@@ -25,7 +25,7 @@ import { adoptFile, contentTypeFor, saveFile, scratchDir } from "@/server/storag* KINETIC_UPLOAD_HEADER: a Kinetic Motion clip or poster, a colour grade, a Relight blend; an MP4 or WebM clip, or a* PNG picture), which no model makes. A picture up to 25 MB* and 40 megapixels, a- * sound up to 50 MB, a clip up to 95 MB; its uploads up to 1 GB and all its files up to 3 GB; 60 uploads an hour,+ * sound up to 50 MB, a clip up to 95 MB; its uploads up to 1 GB and all its files up to 5 GB; 60 uploads an hour,* 300 a day, 2 at once. The stored type is read from the file's first bytes, never taken from the client.*/diff --git a/src/lib/your-keys.ts b/src/lib/your-keys.tsindex ce223794..9d51fdea 100644--- a/src/lib/your-keys.ts+++ b/src/lib/your-keys.ts@@ -45,7 +45,7 @@ export interface YourKeys {engineMode: "open" | "both";/** The studio lets accounts use paid models with their own keys (it isn't open-source only). */paidAllowed: boolean;- /** The account limits its paid runs still count against, as it has them now: "4 runs at once, … 1 GB of files in your first week, then 3 GB". */+ /** The account limits its paid runs still count against, as it has them now: "4 runs at once, … 5 GB of files". */limits: string;}diff --git a/src/server/account-files.ts b/src/server/account-files.tsindex 84870a70..24a4755c 100644--- a/src/server/account-files.ts+++ b/src/server/account-files.ts@@ -26,9 +26,9 @@ export const ACCOUNT_LIMITS = {multipartBytes: 26 * MB,/** Live uploads per account, and all its files (uploads and results). */uploadsBytes: 1 * GB,- totalBytes: 3 * GB,- /** All its files in its first days: accounts made in bulk can't fill the disk fast. */- newAccountBytes: 1 * GB,+ totalBytes: 5 * GB,+ /** All its files in its first days (accounts made in bulk can't fill the disk fast): the same 5 GB for now. */+ newAccountBytes: 5 * GB,newAccountDays: 7,/** Uploads: per hour, per day, and at once. */uploadsPerHour: 60,@@ -79,7 +79,7 @@ export const ACCOUNT_MESSAGES = {fileTooBig: "That file is over 95 MB. Make it smaller, then try again.",wrongType: "Fuobe takes PNG, JPEG or WebP pictures, MP4, MOV, WebM, MKV or AVI clips, and MP3, WAV, OGG, FLAC or M4A sound.",uploadsFull: "You've used your 1 GB for uploads. Older uploads clear after 14 days, or delete some to make room now.",- filesFull: "Your files have reached 3 GB. Delete some runs to make room.",+ filesFull: "Your files have reached 5 GB. Delete some runs to make room.",uploadRate: "That's a lot of uploads at once. Try again in a few minutes.",uploadsBusy: "Lots of uploads right now. Try again in a moment.",uploadStalled: "The upload stopped arriving. Check your connection, then try again.",@@ -100,7 +100,7 @@ export const ACCOUNT_MESSAGES = {zipBusy: "Your last download is still going. Try again when it finishes.",} as const;-/** What an account may keep in all: 3 GB, or 1 GB in its first 7 days (`created`: when it signed up, when known). */+/** What an account may keep in all: 5 GB, or newAccountBytes in its first 7 days when that is less (`created`: when it signed up). */export function accountTotalBytes(id: string, created = accountById(id)?.createdAt ?? 0): number {return Date.now() - created < ACCOUNT_LIMITS.newAccountDays * DAY ? ACCOUNT_LIMITS.newAccountBytes : ACCOUNT_LIMITS.totalBytes;}@@ -108,7 +108,7 @@ export function accountTotalBytes(id: string, created = accountById(id)?.created/** What an account is told when its files are full. */export function filesFullMessage(id: string): string {return accountTotalBytes(id) < ACCOUNT_LIMITS.totalBytes- ? "Your files have reached 1 GB. A new account keeps up to 1 GB in its first 7 days, then 3 GB. Delete some runs to make room."+ ? `Your files have reached ${Math.round(ACCOUNT_LIMITS.newAccountBytes / GB)} GB. A new account keeps up to ${Math.round(ACCOUNT_LIMITS.newAccountBytes / GB)} GB in its first 7 days, then ${Math.round(ACCOUNT_LIMITS.totalBytes / GB)} GB. Delete some runs to make room.`: ACCOUNT_MESSAGES.filesFull;}diff --git a/tests/account-finish-limits.test.ts b/tests/account-finish-limits.test.tsindex 292aa7b1..feccb2f8 100644--- a/tests/account-finish-limits.test.ts+++ b/tests/account-finish-limits.test.ts@@ -82,7 +82,7 @@ describe("M-5: an account's finished pictures count like its other files", () =>try {const r = await post(soulRun(a), cookie);expect(r.status).toBe(413);- expect((await r.json()).error).toMatch(/Your files have reached 1 GB/);+ expect((await r.json()).error).toMatch(/Your files have reached 5 GB/);} finally {db().prepare("DELETE FROM assets WHERE id = ?").run(big.id);}diff --git a/tests/account-keys-routes.test.ts b/tests/account-keys-routes.test.tsindex 6a44ccf0..9364d212 100644--- a/tests/account-keys-routes.test.ts+++ b/tests/account-keys-routes.test.ts@@ -159,8 +159,8 @@ describe("adding a key", () => {keys: { fal: { last4: "3f9a", addedAt: expect.any(Number), readable: true }, replicate: { last4: "5c21", addedAt: expect.any(Number), readable: true } },engineMode: "both",paidAllowed: true,- // A new account keeps 1 GB in its first week: the line says so (never "3 GB" alone).- limits: "4 runs at once, 60 an hour, up to 4 pictures a run, 1 GB of files in your first week, then 3 GB",+ // Every account keeps 5 GB, a new one too.+ limits: "4 runs at once, 60 an hour, up to 4 pictures a run, 5 GB of files",});});diff --git a/tests/account-review-fixes.test.ts b/tests/account-review-fixes.test.tsindex d4ef41b6..5f68f127 100644--- a/tests/account-review-fixes.test.ts+++ b/tests/account-review-fixes.test.ts@@ -53,7 +53,7 @@ beforeAll(async () => {b = auth.createAccount("[email protected]", "long enough").id;auth.setAccountGpu(a, { url: fake.url });cookie = `${auth.SESSION_COOKIE}=${auth.createSession(a).value}`;- // Accounts past their first week, so their files may reach 3 GB (a new account keeps 1 GB).+ // Accounts past their first week, so their files may reach 5 GB.for (const id of [a, b]) setAccountCreatedAt(id, auth.accountById(id)!.createdAt - 8 * 24 * 60 * 60_000);});afterAll(async () => {@@ -209,7 +209,7 @@ describe("an account's ComfyUI can't make the server download without end", () =try {const before = fs.readdirSync(scratchDir()).filter((f) => f.endsWith(".zip")).length;const res = await pollAs("video-export-exr");- expect(res).toMatchObject({ state: "failed", error: expect.stringMatching(/reached 3 GB/) });+ expect(res).toMatchObject({ state: "failed", error: expect.stringMatching(/reached 5 GB/) });expect(fs.readdirSync(scratchDir()).filter((f) => f.endsWith(".zip")).length).toBe(before);} finally {db().prepare("DELETE FROM assets WHERE id = ?").run(filler.id);@@ -228,7 +228,7 @@ describe("an account's ComfyUI can't make the server download without end", () =const id = (await r.json()).items[0].id as string;const g = await settle(id);expect(g?.status).toBe("failed");- expect(g?.error).toMatch(/reached 3 GB/);+ expect(g?.error).toMatch(/reached 5 GB/);expect(fs.readdirSync(scratchDir()).filter((f) => f.startsWith(`${id}-out-`))).toEqual([]);} finally {db().prepare("DELETE FROM assets WHERE id = ?").run(filler.id);diff --git a/tests/account-runs-admin.test.ts b/tests/account-runs-admin.test.tsindex a62d68de..185f2fd5 100644--- a/tests/account-runs-admin.test.ts+++ b/tests/account-runs-admin.test.ts@@ -177,7 +177,7 @@ describe("Settings → Accounts: what accounts make", () => {const of = (id: string) => items.find((a) => a.id === id)!;const newest = (db().prepare("SELECT MAX(created_at) AS t FROM generations WHERE json_extract(request_json, '$.account') = ? AND feature = 'image'").get(A) as { t: number }).t;expect(accountUsage(A).total).toBe(kept.size + upload.size);- expect(of(A)).toMatchObject({ runs: 5, runsDay: 3, runsWeek: 4, running: 1, failedWeek: 1, bytes: accountUsage(A).total, capBytes: 2 ** 30 });+ expect(of(A)).toMatchObject({ runs: 5, runsDay: 3, runsWeek: 4, running: 1, failedWeek: 1, bytes: accountUsage(A).total, capBytes: 5 * 2 ** 30 });expect(of(A).lastRunAt).toBe(newest);expect(of(B)).toMatchObject({ runs: 1, runsDay: 0, runsWeek: 1, running: 0, failedWeek: 0, bytes: 0, gpu: true, disabled: true });expect(of(C)).toMatchObject({ runs: 0, runsDay: 0, runsWeek: 0, running: 0, failedWeek: 0, lastRunAt: null, bytes: 0 });diff --git a/tests/account-space-limits.test.ts b/tests/account-space-limits.test.tsindex a608facc..77227310 100644--- a/tests/account-space-limits.test.ts+++ b/tests/account-space-limits.test.ts@@ -61,15 +61,15 @@ const upload = (account: string) =>);describe("M-6: accounts can't fill the server's disk", () => {- it("a new account keeps 1 GB in its first 7 days, then 3 GB", async () => {- expect(files.accountTotalBytes(fresh)).toBe(1 * GB);- expect(files.accountTotalBytes(old)).toBe(files.ACCOUNT_LIMITS.totalBytes);+ it("every account keeps 5 GB of files, a new one from the day it signs up", async () => {+ expect(files.accountTotalBytes(fresh)).toBe(5 * GB);+ expect(files.accountTotalBytes(old)).toBe(5 * GB);weigh(fresh, 1 * GB - 10);- const r = await upload(fresh);+ expect((await upload(fresh)).status).toBe(201);+ weigh(old, 5 * GB - 10);+ const r = await upload(old);expect(r.status).toBe(413);- expect((await r.json()).error).toMatch(/1 GB.*first 7 days/);- weigh(old, 1 * GB - 10);- expect((await upload(old)).status).toBe(201);+ expect((await r.json()).error).toMatch(/reached 5 GB/);});it("all accounts together keep at most a share of the disk (FUOBE_ACCOUNTS_DISK_GB)", async () => {diff --git a/tests/golden/self-host/words.json b/tests/golden/self-host/words.jsonindex 1549dd09..ae135083 100644--- a/tests/golden/self-host/words.json+++ b/tests/golden/self-host/words.json@@ -670,7 +670,7 @@"fileTooBig": "That file is over 95 MB. Make it smaller, then try again.","wrongType": "Fuobe takes PNG, JPEG or WebP pictures, MP4, MOV, WebM, MKV or AVI clips, and MP3, WAV, OGG, FLAC or M4A sound.","uploadsFull": "You've used your 1 GB for uploads. Older uploads clear after 14 days, or delete some to make room now.",- "filesFull": "Your files have reached 3 GB. Delete some runs to make room.",+ "filesFull": "Your files have reached 5 GB. Delete some runs to make room.","uploadRate": "That's a lot of uploads at once. Try again in a few minutes.","uploadsBusy": "Lots of uploads right now. Try again in a moment.","uploadStalled": "The upload stopped arriving. Check your connection, then try again.",diff --git a/tests/pool-account-runs.test.ts b/tests/pool-account-runs.test.tsindex 9a11c4f2..7346bec2 100644--- a/tests/pool-account-runs.test.ts+++ b/tests/pool-account-runs.test.ts@@ -506,8 +506,8 @@ describe("what an account reads about its run", () => {const owner = listAccountRuns({ account: accountId }).items.find((x) => x.id === id);expect(owner?.detail).toContain("Can't reach ComfyUI");// Fuobe's own words about the account's side stay as they are.- db().prepare("UPDATE generations SET error = ? WHERE id = ?").run("Your files have reached 3 GB. Delete some runs to make room.", id);- expect(getGeneration(id)!.error).toBe("Your files have reached 3 GB. Delete some runs to make room.");+ db().prepare("UPDATE generations SET error = ? WHERE id = ?").run("Your files have reached 5 GB. Delete some runs to make room.", id);+ expect(getGeneration(id)!.error).toBe("Your files have reached 5 GB. Delete some runs to make room.");for (const words of [ACCOUNT_MESSAGES.imageTooBig, ACCOUNT_MESSAGES.wrongType, ACCOUNT_MESSAGES.uploadsFull]) {db().prepare("UPDATE generations SET error = ? WHERE id = ?").run(words, id);expect(getGeneration(id)!.error).toBe(words);