Skip to content

armgit / fuobe

Public Imported from GitHub
0

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.

Friendly words for waits, limits and failures on our GPUs

Adarsh189d238242a3
diff --git a/docs/SELF-HOSTING.md b/docs/SELF-HOSTING.md
index 7bbe6ff8..ac1ed698 100644
--- a/docs/SELF-HOSTING.md
+++ b/docs/SELF-HOSTING.md
@@ -137,7 +137,7 @@ A file that looks like the note but was changed (it has a password or a sign-in
| `FUOBE_HOSTED_RUNS=1` | With public sign-up: accounts with no GPU of their own may run on this install's GPUs: its workers, or its own ComfyUI when that is on this machine ([Hosted runs](public-signup.md#hosted-runs)). Off by default. A billing service or `FUOBE_HOSTED_FREE=1` must answer for these runs. While it is on, an account's runs at once (4) and per hour (60) count its runs on its own GPU or key and its light work (a join, a trim) only: its other runs on this install's GPUs meet the billing service's limits instead (with `FUOBE_HOSTED_FREE=1`, 4 at once, 4 waiting and 60 an hour, refused past them as before). The table of runs waiting to enter the line (`pool_holds`, used only when a billing service's policy says runs wait instead of being refused) is made on every install and stays empty, and unread, while hosted runs are off |
| `FUOBE_HOSTED_FREE=1` | With no billing service: hosted runs are free for every account, within the install's own limits. Without it (and without a billing service) hosted runs stay closed |
| `FUOBE_PLACE_NAME` | The name visitors read for this install's GPUs while hosted runs are on ("Runs on Ana's render box", "Made on: Ana's render box"), at most 40 characters. Also Settings → Workers → Name for your GPUs, which wins over it; a billing service's own name for them wins over both. Unset: "Our GPUs". Nothing reads it while hosted runs are off. The table that keeps where each account picked its runs to go (`account_run_on`) is made on every install and stays empty, and unread, while hosted runs are off |
-| `FUOBE_POOL_WAIT_MIN` | How long a hosted run may wait in line before a GPU first takes it, in minutes (default `30`). A billing service's policy (`limits.giveUpS`, 0: no limit) or reserve answer wins over it. With hosted runs on and no billing service, a run that waits this long ends with one plain sentence, "Sorry, this one couldn't be made." |
+| `FUOBE_POOL_WAIT_MIN` | How long a hosted run may wait in line before a GPU first takes it, in minutes. Unset: no limit, so a run stays in line and starts by itself. A billing service's policy (`limits.giveUpS`, 0: no limit) or reserve answer wins over it. A run that waits past a limit ends with one plain sentence, "This one didn't start in time — try again, or try a similar model." |
| `FUOBE_POOL_MEDIA_INPUTS` | The kinds of input file a run on the workers may send them, comma-separated: `image` (default) or `image,video,audio`. Clips and sound go only to workers that make each clip and sound again before their ComfyUI reads it (worker protocol 2 with ffmpeg set, [Clips and sound](gpu-workers.md#clips-and-sound)). A hosted run takes a kind only when this and the billing service's policy (`uploads`) both allow it, so set it together with `FUOBE_HOSTED_RUNS` and `FUOBE_BILLING_URL` when the policy opens clips and sound |
| `FUOBE_CATALOG_VERSION` | The catalog version accounts' job tickets are made for ([Job tickets and the PC's ceiling](gpu-workers.md#job-tickets-and-the-pcs-ceiling)), as 64 hex characters. Unset: the studio computes it from its own composer and catalog files, which is what a server running from its own checkout wants. Set it only when the server runs without those files |
| `FUOBE_WORKER_TOKEN_DAYS` | How many days a pool worker's token lasts; the worker gets its next one in a beat answer ([gpu-workers.md](gpu-workers.md#the-protocol)). Unset or `0`: tokens never expire |
diff --git a/docs/billing-hook.md b/docs/billing-hook.md
index 2bf04d17..1e269166 100644
--- a/docs/billing-hook.md
+++ b/docs/billing-hook.md
@@ -16,7 +16,7 @@ the top bar and the account menu, a refusal's text, a link, an offer) comes from
| `FUOBE_BILLING_TOKEN` | Sent as `Authorization: Bearer <token>` with every call | none |
| `FUOBE_HOSTED_RUNS` | `1` lets accounts run on this install's GPUs (the only runs the service prices) | off |
| `FUOBE_HOSTED_FREE` | `1` opens those runs with no service set: free for every account, within the install's own limits | off |
-| `FUOBE_POOL_WAIT_MIN` | How long a run may wait in line on this install's GPUs when the service doesn't say | 30 |
+| `FUOBE_POOL_WAIT_MIN` | How long a run may wait in line on this install's GPUs when the service doesn't say | none (as long as it takes) |
## When Fuobe calls the service
diff --git a/docs/gpu-workers.md b/docs/gpu-workers.md
index 8f9205db..762c4414 100644
--- a/docs/gpu-workers.md
+++ b/docs/gpu-workers.md
@@ -385,7 +385,7 @@ default). It also keeps:
same worker could take.
- `rank_at`: `created_at`, minus the head start the billing service gave the run inside its class (at most a day). A
job that goes back in line keeps its `rank_at`, so it keeps its place.
-- a wait limit: for an account's run, `FUOBE_POOL_WAIT_MIN` (30 minutes) or what the billing service set; for the
+- a wait limit: for an account's run, `FUOBE_POOL_WAIT_MIN` (none when it isn't set) or what the billing service set; for the
owner's own jobs, the owner's wait limit (none by default; see the queue's settings below). It applies only until a
worker first takes the job: past it, a job that no worker took fails with "The GPUs were busy".
- how many results its workflow makes. An owner's job keeps no more than that (and at least 16), as an account's job
diff --git a/docs/public-signup.md b/docs/public-signup.md
index fcd6bcee..8dc5e881 100644
--- a/docs/public-signup.md
+++ b/docs/public-signup.md
@@ -920,7 +920,7 @@ With it on:
known; 0 turns this offer off) an account with its own GPU, or a key that runs the item's cloud version, is offered it for that one run
("Run it now on your GPU", "Run it now with your fal.ai key · ≈ $0.04"), and its pick of where runs go stays.
- How long a run may wait before a GPU first takes it: the billing service's `limits.giveUpS` when its policy says
- (0: as long as it takes), else what its reserve answer says, else `FUOBE_POOL_WAIT_MIN` minutes (30 by default).
+ (0: as long as it takes), else what its reserve answer says, else `FUOBE_POOL_WAIT_MIN` minutes (none by default: as long as it takes).
Past that it fails with one plain sentence, not charged. A later step of a run (a chain's next step) keeps the run's
place in line and has no wait limit.
- When the billing service's policy says runs wait instead of being refused (`limits.held`: how many may wait behind
diff --git a/src/app/api/audio-tools/export/route.ts b/src/app/api/audio-tools/export/route.ts
index 637e2834..66457655 100644
--- a/src/app/api/audio-tools/export/route.ts
+++ b/src/app/api/audio-tools/export/route.ts
@@ -8,6 +8,7 @@ import { dropMix, keepMix, MixExportError, PART_MAX, receiveMixPart, type Finish
import { holdForCheck } from "@/server/output-checks";
import { hit, unhit } from "@/server/rate";
import { runAsTenant } from "@/server/tenant";
+import { limitWords } from "@/lib/limit-words";
/**
* Split soundtrack's Export mix, in parts: POST the WAV's bytes as the body, `?offset=` where they start, `&id=` from
@@ -56,7 +57,7 @@ async function keepAsRun(account: Account, done: FinishedMix): Promise<Response>
const rate = hit(bucket, ACCOUNT_LIMITS.runsPerHour, 60 * 60_000);
if (!rate.ok) {
dropMix(done.id);
- return Response.json({ error: ACCOUNT_MESSAGES.runRate }, { status: 429, headers: { "Retry-After": String(rate.retryAfterS), "Cache-Control": "no-store" } });
+ return Response.json({ error: limitWords("runs", rate.retryAfterS) }, { status: 429, headers: { "Retry-After": String(rate.retryAfterS), "Cache-Control": "no-store" } });
}
const title = done.name.replace(/\.wav$/i, "");
const place = account.gpu ? ("own-gpu" as const) : account.keys?.fal || account.keys?.replicate ? ("own-key" as const) : ("pool" as const);
diff --git a/src/app/api/billing/interest/route.ts b/src/app/api/billing/interest/route.ts
index c68fb7b2..bfb47a67 100644
--- a/src/app/api/billing/interest/route.ts
+++ b/src/app/api/billing/interest/route.ts
@@ -15,7 +15,7 @@ export async function POST(request: Request) {
const key = typeof body?.key === "string" && /^[\w.:-]{1,80}$/.test(body.key) ? body.key : null;
if (!key) return Response.json({ error: "Which offer?" }, { status: 400, headers: NO_STORE });
const rate = hit(`interest:${account.id}`, 30, 60 * 60_000);
- if (!rate.ok) return Response.json({ error: "Too many clicks. Try again later." }, { status: 429, headers: { ...NO_STORE, "Retry-After": String(rate.retryAfterS) } });
+ if (!rate.ok) return Response.json({ error: "Thanks — we have your interest. You can tell us more in a little while." }, { status: 429, headers: { ...NO_STORE, "Retry-After": String(rate.retryAfterS) } });
const a = await interest(account.id, key);
if (!a) return Response.json({ error: "Not available right now" }, { status: 404, headers: NO_STORE });
return Response.json({ ok: true, text: a.text }, { headers: NO_STORE });
diff --git a/src/app/api/enhance/route.ts b/src/app/api/enhance/route.ts
index c4811375..06c52e55 100644
--- a/src/app/api/enhance/route.ts
+++ b/src/app/api/enhance/route.ts
@@ -7,6 +7,7 @@ import { LoginGuard, requestViewer } from "@/server/auth";
import { hostedRunsOn } from "@/server/hosted-switch";
import { runAsTenant, type Tenant } from "@/server/tenant";
import type { HelperAnswer } from "@/server/text-helper";
+import { limitFields, limitWords } from "@/lib/limit-words";
type HelperTrouble = Exclude<HelperAnswer, { text: string }>;
@@ -18,13 +19,14 @@ function noLyrics(owner: boolean, why: HelperTrouble | null): Response {
const headers = { "Cache-Control": "no-store" };
if (why?.error === "sign-in") return signIn();
if (why?.error === "limit") {
- return Response.json({ error: "You've written a lot of lyrics just now. Try again in a minute, or type your own.", code: "helper-limit" }, { status: 429, headers: { ...headers, "Retry-After": String(why.retryAfterS ?? 60) } });
+ const wait = why.retryAfterS ?? 60;
+ return Response.json({ error: limitWords("replies", wait), code: "helper-limit", ...limitFields("replies", wait) }, { status: 429, headers: { ...headers, "Retry-After": String(wait) } });
}
if (why?.error === "blocked") return Response.json({ error: why.message || "These lyrics can't be written here.", code: "helper-blocked" }, { status: 403, headers });
if (owner && !why) {
return Response.json({ error: "Writing lyrics needs an AI helper. Set up Claude or a local model in Settings → AI helper, or type your own.", code: "no-llm" }, { status: 503, headers });
}
- return Response.json({ error: "Writing lyrics is busy right now. Try again in a moment, or type your own.", code: owner ? "no-llm" : "helper-busy" }, { status: 503, headers });
+ return Response.json({ error: "Lots of people are writing lyrics right now — try again in a moment, or type your own.", code: owner ? "no-llm" : "helper-busy" }, { status: 503, headers });
}
export async function POST(request: Request) {
diff --git a/src/app/api/generations/[id]/finish/route.ts b/src/app/api/generations/[id]/finish/route.ts
index 370d1002..dc5369fe 100644
--- a/src/app/api/generations/[id]/finish/route.ts
+++ b/src/app/api/generations/[id]/finish/route.ts
@@ -3,6 +3,7 @@ import { requestAccount } from "@/server/auth";
import { gateAsProxy, readFormWithin } from "@/server/direct-gate";
import { FinishError, finishOutput } from "@/server/generations";
import { enter, hit, unhit } from "@/server/rate";
+import { limitWords } from "@/lib/limit-words";
const MAX_BYTES = 64 * 1024 * 1024;
/** An account's finished picture (its own result: the proxy checks): smaller. */
@@ -44,7 +45,7 @@ export async function POST(request: Request, ctx: RouteContext<"/api/generations
if (!diskHasRoom()) return refuse(503, ACCOUNT_MESSAGES.diskLow);
if (accountUsage(account.id).total + data.length > accountTotalBytes(account.id)) return refuse(413, filesFullMessage(account.id));
const rate = hit(`finish:${account.id}`, ACCOUNT_LIMITS.finishesPerHour, 60 * 60_000);
- if (!rate.ok) return refuse(429, ACCOUNT_MESSAGES.finishRate, { "Retry-After": String(rate.retryAfterS) });
+ if (!rate.ok) return refuse(429, limitWords("pictures", rate.retryAfterS), { "Retry-After": String(rate.retryAfterS) });
}
try {
return Response.json(finishOutput(id, index, data));
diff --git a/src/app/api/generations/local/route.ts b/src/app/api/generations/local/route.ts
index ae94a2d4..36cf14b8 100644
--- a/src/app/api/generations/local/route.ts
+++ b/src/app/api/generations/local/route.ts
@@ -14,6 +14,7 @@ import { hit, unhit } from "@/server/rate";
import { db } from "@/server/db";
import { absolutePath, contentTypeFor, filesRel } from "@/server/storage";
import { runAsTenant } from "@/server/tenant";
+import { limitWords } from "@/lib/limit-words";
/** Kinetic's picture results: a frame, a contact sheet, a version (PNG images; every other Kinetic result is a clip). */
const KINETIC_IMAGE_FEATURES: readonly string[] = ["kinetic-frame", "kinetic-sheet", "kinetic-version"];
@@ -193,7 +194,7 @@ export async function POST(request: Request) {
// A saved result is one of the account's runs: the same hourly budget.
const bucket = `run:${account.id}`;
const rate = hit(bucket, ACCOUNT_LIMITS.runsPerHour, 60 * 60_000);
- if (!rate.ok) return Response.json({ error: ACCOUNT_MESSAGES.runRate }, { status: 429, headers: { "Retry-After": String(rate.retryAfterS), "Cache-Control": "no-store" } });
+ if (!rate.ok) return Response.json({ error: limitWords("runs", rate.retryAfterS) }, { status: 429, headers: { "Retry-After": String(rate.retryAfterS), "Cache-Control": "no-store" } });
// The words drawn on a clip and its title (never the page's own summary of them) go through the studio's checks, and
// are what the run keeps; a grade or a blend keeps its description, checked with its title.
const motion = body.op === "motion";
diff --git a/src/app/api/generations/route.ts b/src/app/api/generations/route.ts
index 1969f313..36c22314 100644
--- a/src/app/api/generations/route.ts
+++ b/src/app/api/generations/route.ts
@@ -31,6 +31,7 @@ import { decidePlace, lateRefusal, moderateRun, policyWait, poolQuote, readWishe
import { withRunStamp, type RunStamp } from "@/server/run-stamp";
import { hostedRunsOn } from "@/server/hosted-switch";
import { endTry, notePressRun, pressPrior, pressRun, pressTries, pressTry, readPressId } from "@/server/run-requests";
+import { limitFields, limitWords } from "@/lib/limit-words";
/**
* List generations, newest first. Filters: kind / kinds, features (`x*` = prefix), models, statuses,
@@ -138,7 +139,8 @@ function limitAnswer(r: AdmitRefused["refusal"]): Answer {
const late = lateRefusal(r.error);
return { status: late.status, body: late.body as Answer["body"], headers: late.headers };
}
- return { status: r.status, body: { error: r.error, code: r.code }, headers: r.status === 429 ? { "Retry-After": String(r.retryAfterS ?? 30) } : {} };
+ const limit = "limit" in r && r.limit ? { limit: r.limit, refreshAt: r.refreshAt } : {};
+ return { status: r.status, body: { error: r.error, code: r.code, ...limit }, headers: r.status === 429 ? { "Retry-After": String(r.retryAfterS ?? 30) } : {} };
}
/** Start a generation; `?preview=1` only says what it would run as (model, operation, jobs, outputs, cost). */
@@ -197,7 +199,7 @@ export async function POST(request: Request) {
const ownLimits = (id: string): Response | null => {
if (ownActiveRuns(id, { except: replaces?.ids, waitingApart: true }) >= ACCOUNT_LIMITS.activeRuns) return refuse(429, ACCOUNT_MESSAGES.activeRuns, { code: ACTIVE_RUNS_CODE }, { "Retry-After": "30" });
const rate = hit(`run:${id}`, ACCOUNT_LIMITS.runsPerHour, 60 * 60_000);
- if (!rate.ok) return refuse(429, ACCOUNT_MESSAGES.runRate, {}, { "Retry-After": String(rate.retryAfterS) });
+ if (!rate.ok) return refuse(429, limitWords("runs", rate.retryAfterS), limitFields("runs", rate.retryAfterS), { "Retry-After": String(rate.retryAfterS) });
rated = true;
return null;
};
@@ -309,7 +311,7 @@ export async function POST(request: Request) {
if ("refuse" in plan) {
unhitRun();
const over = plan.refuse;
- return refuse(over.status, over.error, { code: over.code }, { "Retry-After": String(over.retryAfterS) });
+ return refuse(over.status, over.error, { code: over.code, ...(over.limit && { limit: over.limit, refreshAt: over.refreshAt }) }, { "Retry-After": String(over.retryAfterS) });
}
// The request as it runs there (no more outputs than the policy's cap per run): planned and priced as it is.
if (onPool.capped) {
diff --git a/src/app/api/live/masters/route.ts b/src/app/api/live/masters/route.ts
index 361d051c..f9caac08 100644
--- a/src/app/api/live/masters/route.ts
+++ b/src/app/api/live/masters/route.ts
@@ -7,6 +7,7 @@ import { gateAsProxy, readBodyWithin } from "@/server/direct-gate";
import { liveWho } from "@/server/live/access";
import { enter, hit, unhit } from "@/server/rate";
import { saveFile } from "@/server/storage";
+import { limitWords } from "@/lib/limit-words";
/** A master is a PNG of at most 4096 px a side: this holds the largest with room to spare. */
const MAX_BYTES = 80 * 2 ** 20;
@@ -42,7 +43,7 @@ export async function POST(request: Request) {
if (!diskHasRoom()) return refuse(507, ACCOUNT_MESSAGES.diskLow, "space");
if (accountUsage(who.account.id).total + body.length > accountTotalBytes(who.account.id)) return refuse(507, filesFullMessage(who.account.id), "space");
const rate = hit(`live-masters:${who.account.id}`, ACCOUNT_MASTERS_PER_HOUR, 60 * 60_000);
- if (!rate.ok) return refuse(429, "That's a lot of kept steps for one hour. Download them, or try again later.", "rate", { "Retry-After": String(rate.retryAfterS) });
+ if (!rate.ok) return refuse(429, limitWords("steps", rate.retryAfterS), "rate", { "Retry-After": String(rate.retryAfterS) });
try {
const a = saveFile({ data: body, contentType: "image/png", name: "live-edit.png", source: "derived", accountId: who.account.id });
return Response.json({ id: a.id, url: a.url }, { status: 201, headers: { "Cache-Control": "no-store" } });
diff --git a/src/app/api/reports/route.ts b/src/app/api/reports/route.ts
index 63026881..c1247b21 100644
--- a/src/app/api/reports/route.ts
+++ b/src/app/api/reports/route.ts
@@ -2,6 +2,7 @@ import { connection } from "next/server";
import { isOwnerRequest, LoginGuard, requestViewer, sessionCookieOf } from "@/server/auth";
import { listReports, report, REPORT_CATEGORIES, type ReportCategory } from "@/server/moderation";
import { hit } from "@/server/rate";
+import { limitWords } from "@/lib/limit-words";
const NO_STORE = { "Cache-Control": "no-store" };
@@ -14,7 +15,7 @@ export async function POST(request: Request) {
const viewer = requestViewer(request);
const who = viewer.kind === "account" ? `account:${viewer.account.id}` : viewer.kind === "owner" ? "owner" : `guest:${LoginGuard.clientKey(request.headers)}`;
const rate = hit(`report:${who}`, 20, 60 * 60_000);
- if (!rate.ok) return Response.json({ error: "Too many reports. Try again later." }, { status: 429, headers: { ...NO_STORE, "Retry-After": String(rate.retryAfterS) } });
+ if (!rate.ok) return Response.json({ error: limitWords("reports", rate.retryAfterS) }, { status: 429, headers: { ...NO_STORE, "Retry-After": String(rate.retryAfterS) } });
const body = (await request.json().catch(() => null)) as { target?: Record<string, unknown>; category?: unknown; text?: unknown; email?: unknown } | null;
const t = body?.target ?? {};
const id = (v: unknown) => (typeof v === "string" && /^[\w-]{1,64}$/.test(v) ? v : undefined);
diff --git a/src/app/api/starters/[id]/route.ts b/src/app/api/starters/[id]/route.ts
index e54404a6..93e61a40 100644
--- a/src/app/api/starters/[id]/route.ts
+++ b/src/app/api/starters/[id]/route.ts
@@ -32,6 +32,6 @@ export async function POST(request: Request, { params }: RouteContext<"/api/star
} catch (e) {
// A studio's own refusal (an engine this install doesn't use, a missing photo, an account's limit of projects) keeps its status.
const status = e instanceof StarterError ? e.status : ((e as { status?: number }).status ?? 400);
- return Response.json({ error: (e as Error).message || "That starter couldn't be made" }, { status });
+ return Response.json({ error: (e as Error).message || "That starter didn't come out right — try again, or pick another" }, { status });
}
}
diff --git a/src/components/cinema/blockout-panel.tsx b/src/components/cinema/blockout-panel.tsx
index dfaf38e7..3d6450b2 100644
--- a/src/components/cinema/blockout-panel.tsx
+++ b/src/components/cinema/blockout-panel.tsx
@@ -240,7 +240,7 @@ export function BlockoutPanel(props: BlockoutPanelProps) {
prompt: null,
}));
} catch (e) {
- toastError(e, "Upload failed. Please try again.");
+ toastError(e, "That upload didn't finish — please try again.");
} finally {
setUploading(null);
}
@@ -273,7 +273,7 @@ export function BlockoutPanel(props: BlockoutPanelProps) {
.then((a) => setDraft((d) => ({ ...d, refs: d.refs.map((r) => (r.id === id ? { ...r, url: a.url, uploading: false } : r)) })))
.catch((e) => {
setDraft((d) => ({ ...d, refs: d.refs.filter((r) => r.id !== id) }));
- toastError(e, "Upload failed. Please try again.");
+ toastError(e, "That upload didn't finish — please try again.");
});
};
diff --git a/src/components/cinema/prompt-bar.tsx b/src/components/cinema/prompt-bar.tsx
index 7a9742a7..0fb193b3 100644
--- a/src/components/cinema/prompt-bar.tsx
+++ b/src/components/cinema/prompt-bar.tsx
@@ -222,7 +222,7 @@ export function useAddRefs(setDraft: (fn: (d: CinemaDraft) => Partial<CinemaDraf
.then((a) => setDraft((d) => ({ refs: d.refs.map((r) => (r.id === id ? { ...r, ref: a.url, preview: a.url, uploading: false } : r)) })))
.catch((e) => {
setDraft((d) => ({ refs: d.refs.filter((r) => r.id !== id) }));
- toastError(e, "Upload failed. Please try again.");
+ toastError(e, "That upload didn't finish — please try again.");
});
}
};
diff --git a/src/components/genjutsu/hooks.ts b/src/components/genjutsu/hooks.ts
index db07e544..19f2ba32 100644
--- a/src/components/genjutsu/hooks.ts
+++ b/src/components/genjutsu/hooks.ts
@@ -133,5 +133,5 @@ export async function waitForGeneration(id: string, o: { signal?: AbortSignal; t
if (g.status === "failed" || g.status === "canceled") throw new Error(g.error || "It didn't finish");
await new Promise((r) => setTimeout(r, 1500));
}
- throw new Error("It is taking too long — try again later");
+ throw new Error("This is taking longer than expected — try again in a moment");
}
diff --git a/src/components/library/asset-card.tsx b/src/components/library/asset-card.tsx
index 7b8bae32..1c6b8451 100644
--- a/src/components/library/asset-card.tsx
+++ b/src/components/library/asset-card.tsx
@@ -50,7 +50,7 @@ const idsOf = (e: LibraryEntry) => (e.type === "single" ? [e.g.id] : e.items.map
/** A run's state in a Library list row: on this install's GPUs, the words its tile says. */
export function listStatus(g: Pick<Generation, "status" | "place">): string {
if (g.status === "canceled") return "Canceled";
- if (g.place === "pool") return g.status === "failed" ? "Couldn't be made" : g.status === "queued" ? POOL_WORDS.inLine : POOL_WORDS.working;
+ if (g.place === "pool") return g.status === "failed" ? "Didn't come out right" : g.status === "queued" ? POOL_WORDS.inLine : POOL_WORDS.working;
return g.status === "failed" ? "Failed" : g.status === "queued" ? "Queued" : "Rendering";
}
diff --git a/src/components/model3d/other-sides.tsx b/src/components/model3d/other-sides.tsx
index 0e7cd5e6..ec844623 100644
--- a/src/components/model3d/other-sides.tsx
+++ b/src/components/model3d/other-sides.tsx
@@ -97,7 +97,7 @@ export function OtherSides({
</div>
<p className="text-[12px] text-muted-foreground" aria-live="polite">
{failed ? (
- <span className="text-destructive">{failed.error ?? "The sides couldn't be made. Please try again."}</span>
+ <span className="text-destructive">{failed.error ?? "The other sides didn't come out right — try again."}</span>
) : (
<>
{price ? `${price} · ` : ""}
diff --git a/src/components/starters/starter-section.tsx b/src/components/starters/starter-section.tsx
index 061b4b0a..9efa9d50 100644
--- a/src/components/starters/starter-section.tsx
+++ b/src/components/starters/starter-section.tsx
@@ -58,7 +58,7 @@ export function useStarterUse(onFill?: (id: string) => void) {
try {
const res = await fetch(`/api/starters/${encodeURIComponent(s.id)}`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ engine }) });
const body = (await res.json().catch(() => ({}))) as { href?: string; note?: string; error?: string };
- if (!res.ok || !body.href) throw responseError(res, body.error ?? "That starter couldn't be made. Please try again.");
+ if (!res.ok || !body.href) throw responseError(res, body.error ?? "That starter didn't come out right — try again, or pick another.");
// What it made (a brand, a product, a channel, a film, an element) is in the lists the next page picks it from,
// before it opens.
await Promise.all(
diff --git a/src/components/studio/feed.tsx b/src/components/studio/feed.tsx
index fc51db5e..d79c3d30 100644
--- a/src/components/studio/feed.tsx
+++ b/src/components/studio/feed.tsx
@@ -1,6 +1,7 @@
"use client";
import { Cloud, Copy, Cpu, Download, FolderDown, Heart, Loader2, MoreHorizontal, RotateCcw, Sparkles, Trash2, Wrench, X } from "lucide-react";
+import { ENGINE_WORDS } from "@/lib/engine-error";
import { useQueryClient } from "@tanstack/react-query";
import { pendingWords } from "@/lib/pending-words";
import { refreshPriceChecks } from "@/lib/hosted";
@@ -183,7 +184,10 @@ export function PendingTile({ g, ratio }: { g: Generation; ratio: number }) {
}
/** The sentences about the person's own files: the same run would only fail again, so changing the draft comes first. */
-const FILE_TROUBLE: readonly string[] = Object.values(FILE_TROUBLE_WORDS);
+const FILE_TROUBLE: readonly string[] = [...Object.values(FILE_TROUBLE_WORDS), ENGINE_WORDS["no-sound"], ENGINE_WORDS["unreadable-input"]];
+
+/** A failed run on this studio's GPUs: its model picker, with the run's settings back in the composer. */
+const SIMILAR_MODEL = { kind: "pick-model", label: "Try a similar model" } as const;
/** The causes a failed tile offers no Retry for (src/lib/diagnose.ts): only a fix on the GPU helps. */
const NO_RETRY_CAUSES: readonly string[] = ["gpu-comfy-known", "gpu-model-file"];
@@ -247,6 +251,19 @@ export function FailedTile({ g, ratio, onRetry, onReuse }: { g: Generation; rati
more={{ onRunOnSite: () => siteRun && create.mutate(siteRunRequest(g, siteRun), { onError: (e) => toastError(e) }) }}
/>
)}
+ {/* A run on this studio's GPUs that didn't come out right: another model, a tap away, beside Retry. */}
+ {poolFailed && !reuseFirst && !trouble && (
+ <RunTroubleActions
+ g={g}
+ reuse={feed?.reuse}
+ model={catalog?.getModel(g.modelId)}
+ className="mt-2 shrink-0"
+ actions={[SIMILAR_MODEL]}
+ max={1}
+ compact
+ context="run"
+ />
+ )}
<div className="mt-2 flex shrink-0 flex-wrap gap-1.5">
{reuseFirst && (
<button
diff --git a/src/components/studio/media-slot.tsx b/src/components/studio/media-slot.tsx
index 2bfcbe10..1d81dc56 100644
--- a/src/components/studio/media-slot.tsx
+++ b/src/components/studio/media-slot.tsx
@@ -102,7 +102,7 @@ export async function fileToSlot(file: File, onChange: (v: SlotValue | null) =>
if (opts.signal?.aborted || (e as Error).name === "AbortError") return;
onChange(null);
// Refused with its own card ("Create a free account", "Connect your GPU"): nothing on top of it.
- toastError(e, "Upload failed. Please try again.");
+ toastError(e, "That upload didn't finish — please try again.");
} finally {
revoke();
}
@@ -141,7 +141,7 @@ export async function uploadHeld(v: SlotValue): Promise<SlotValue | null> {
void dropHeld(v.held!);
return { ...(v.sketch && { sketch: v.sketch }), ...(v.id && { id: v.id }), ref: asset.url, preview: asset.url, kind: asset.kind ?? v.kind, name: v.name };
} catch (e) {
- toastError(e, "Upload failed. Please try again.");
+ toastError(e, "That upload didn't finish — please try again.");
return null;
}
}
diff --git a/src/components/watermark/watermark-tool.tsx b/src/components/watermark/watermark-tool.tsx
index 1435167d..6654fa85 100644
--- a/src/components/watermark/watermark-tool.tsx
+++ b/src/components/watermark/watermark-tool.tsx
@@ -281,7 +281,7 @@ export function WatermarkTool({ app, cover }: { app: { name: string; description
try {
upload(await shrinkPhoto(source.preview, source.name));
} catch {
- toast("This photo couldn't be made smaller here. Try another photo.");
+ toast("We couldn't make this photo smaller — try another photo.");
} finally {
setShrinking(false);
}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index faf558b0..a50d5711 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -27,7 +27,8 @@ import {
} from "./generation-stream";
import { fetchWithin, READ_LIMIT_MS } from "./fetch-within";
import { cursorAfter, filterToSearch, type AssetUse, type FeedFilter, type Folder } from "./library";
-import { markRefusalShown, refusalShown, responseError } from "./refusals";
+import { isLimitKind, limitNext, limitWordsAt } from "./limit-words";
+import { markRefusalShown, refusalShown, responseError, type NextStep } from "./refusals";
import { OWN_SETUP_HEADER, PLACE_ASK_HEADER, RUN_PLACE_HEADER, RUN_SHOWN_HEADER, RUNS_CHANGED_EVENT, shownHeader, SIGN_IN_CODE } from "./guest-access";
import type { PoolRules } from "./pool-rules";
import { HoldFilesCtx } from "./held-files";
@@ -61,7 +62,19 @@ async function json<T>(res: Response): Promise<T> {
// Its code too, when the refusal has one (a run that waits for a place: ACTIVE_RUNS_CODE).
const given = (body as { code?: unknown }).code;
const code = typeof given === "string" ? given : undefined;
- if (!res.ok) throw responseError(res, Object.assign(new Error(body.error ?? "Something went wrong. Please try again."), { status: res.status }, code && { code }));
+ if (!res.ok) {
+ // A limit says when it refreshes on the viewer's own clock, with the next step a press away (src/lib/limit-words.ts).
+ const { limit, refreshAt, guest } = body as { limit?: unknown; refreshAt?: unknown; guest?: unknown };
+ if (isLimitKind(limit) && typeof refreshAt === "number") {
+ const n = limitNext(limit, guest === true);
+ const next: NextStep | undefined = n && {
+ label: n.label,
+ run: n.to === "sign-up" ? () => askToSignUp("run") : () => window.dispatchEvent(new CustomEvent<ConnectGpuDetail>(CONNECT_GPU_EVENT, { detail: { action: "run" } })),
+ };
+ throw responseError(res, Object.assign(new Error(limitWordsAt(limit, refreshAt)), { status: res.status }, code && { code }, next && { next }));
+ }
+ throw responseError(res, Object.assign(new Error(body.error ?? "Something went wrong. Please try again."), { status: res.status }, code && { code }));
+ }
return body;
}
diff --git a/src/lib/comfy-compose.ts b/src/lib/comfy-compose.ts
index a4ba1f41..cbc380ec 100644
--- a/src/lib/comfy-compose.ts
+++ b/src/lib/comfy-compose.ts
@@ -115,7 +115,7 @@ const onPlace = (site: boolean | undefined, own: string, onSite: string): string
const openEngine = (site: boolean | undefined): string => onPlace(site, "on the open engine", "with open models");
/** The one sentence for a run that can't be made (POOL_WORDS.failed in src/lib/relay.ts, kept equal by its test). */
-export const SITE_FAILED_WORDS = "Sorry, this one couldn't be made.";
+export const SITE_FAILED_WORDS = "That one didn't come out right — try again, or try a similar model.";
/** A request the composer refuses, in words (status: the HTTP status the server answers with). */
export class ComposeError extends Error {
diff --git a/src/lib/engine-error.ts b/src/lib/engine-error.ts
index 99c7c282..0daf15e7 100644
--- a/src/lib/engine-error.ts
+++ b/src/lib/engine-error.ts
@@ -200,24 +200,27 @@ export function storedErrorText(raw: string, max = STORED_ERROR_MAX): string {
// What a person sees when a run on our GPUs fails
/** The kinds of failure a run on our GPUs is told apart by. */
-export type EngineFailureKind = "no-sound" | "unreadable-input" | "out-of-memory" | "timeout" | "missing-on-gpu" | "gpu-stopped" | "unknown";
+export type EngineFailureKind = "no-sound" | "unreadable-input" | "out-of-memory" | "timeout" | "missing-on-gpu" | "gpu-stopped" | "long-wait" | "unknown";
/**
- * What each kind says to the person who ran it (an account, a guest, or the owner on our GPUs): what happened and what
- * to do next, never a dead end. No place name (the install names its GPUs itself), no machinery (not even "GPU"), no
- * "Press Retry" (tests/hosted-words.test.ts, tests/pool-account-runs.test.ts); the tile's own Retry is beside it.
+ * What each kind says to the person who ran it (an account, a guest, or the owner on our GPUs): friendly, plain, and
+ * what to do next, never a dead end. No place name (the install names its GPUs itself), no machinery (not even "GPU"),
+ * no "busy", no "Press Retry" or "try again later" (tests/hosted-words.test.ts, tests/pool-account-runs.test.ts). The
+ * tile's own Retry and "Try a similar model" are beside it. `unknown` is POOL_WORDS.failed (src/lib/relay.ts).
*/
export const ENGINE_WORDS: Record<EngineFailureKind, string> = {
- "no-sound": "This clip has no sound for this run to use. Try a clip with sound.",
- "unreadable-input": "A file in this run couldn't be read. Try another file, or run it again.",
- "out-of-memory": "This run needed more memory than was free. Try a smaller size or a shorter clip.",
- timeout: "This run took too long to finish. Try a shorter clip or a smaller size.",
- "missing-on-gpu": "This run couldn't start just now. Run it again in a few minutes.",
- "gpu-stopped": "This run stopped before it finished. Run it again.",
- unknown: "This run couldn't finish. Run it again, or try other settings.",
+ "no-sound": "This clip has no sound for this run to use — try a clip with sound.",
+ "unreadable-input": "We couldn't read this file — try another one (MP4 or MOV works best for clips).",
+ "out-of-memory": "That one was too big to make in one go — try a smaller size or a shorter clip.",
+ timeout: "That one took longer than expected — try a shorter clip or a smaller size.",
+ "missing-on-gpu": "That one didn't come out right — try again in a few minutes, or try a similar model.",
+ "gpu-stopped": "That one didn't finish — try again, or try a similar model.",
+ "long-wait": "This one didn't start in time — try again, or try a similar model.",
+ unknown: "That one didn't come out right — try again, or try a similar model.",
};
const KINDS: [EngineFailureKind, RegExp][] = [
+ ["long-wait", /were busy|didn't start in time|waited (?:over|too long)|took too long to start/i],
["out-of-memory", /out of memory|OutOfMemoryError|allocation on device|CUDA error: out of memory|not enough memory|MemoryError/i],
["no-sound", /no audio stream|has no (?:audio|sound)|failed to extract audio|does not contain any (?:audio )?stream|stream map '[^']*:a[^']*' matches no streams|matches no streams|no sound to work with|without (?:audio|sound)/i],
[
diff --git a/src/lib/limit-words.ts b/src/lib/limit-words.ts
new file mode 100644
index 00000000..3d8d9d9f
--- /dev/null
+++ b/src/lib/limit-words.ts
@@ -0,0 +1,66 @@
+import { aboutWords, clockWords } from "./pool-line";
+
+/**
+ * What a person reads when a limit stops a press: friendly, never "try again later", and when it refreshes, from the
+ * limit itself. The server says the wait ("in about 40 min", the same on every clock) and sends when it ends
+ * (`refreshAt`); the page says it on the viewer's own clock ("at 14:20", limitWordsAt). With the free runs here shared
+ * out, the next step is one press away: run it self-hosted (an account), or a free account for more free runs (a guest).
+ */
+export type LimitKind = "free-today" | "free-hour" | "network" | "runs" | "pictures" | "files" | "reports" | "steps" | "replies";
+
+export const LIMIT_KINDS: readonly LimitKind[] = ["free-today", "free-hour", "network", "runs", "pictures", "files", "reports", "steps", "replies"];
+
+export const isLimitKind = (v: unknown): v is LimitKind => typeof v === "string" && (LIMIT_KINDS as readonly string[]).includes(v);
+
+/** The sentence for a limit, with when it refreshes ("in about 40 min", "at 14:20"). */
+function sentence(kind: LimitKind, when: string): string {
+ switch (kind) {
+ case "free-today":
+ return `Lots of people are creating on Fuobe today, so free runs are shared out — yours refresh ${when}.`;
+ case "free-hour":
+ return `Lots of people are creating on Fuobe right now, so free runs are shared out — yours refresh ${when}.`;
+ case "network":
+ return `Lots of people on your network are creating right now, so free runs are shared out — yours refresh ${when}.`;
+ case "runs":
+ return `You've made a lot this hour — you can run again ${when}.`;
+ case "pictures":
+ return `You've finished a lot of pictures this hour — you can finish more ${when}.`;
+ case "files":
+ return `You've added a lot of files this hour — you can add more ${when}.`;
+ case "reports":
+ return `Thanks — we have your reports. You can send more ${when}.`;
+ case "steps":
+ return `You've kept a lot of steps this hour — download them now, and you can keep more ${when}.`;
+ case "replies":
+ return `Lots of people are writing on Fuobe right now, so free replies are shared out — yours refresh ${when}.`;
+ }
+}
+
+/** "in about 12 min", or "in a moment" when it is under a minute away (or unknown). */
+export function readyInWords(retryAfterS: number | undefined): string {
+ return retryAfterS && retryAfterS >= 60 ? `in ${aboutWords(retryAfterS)}` : "in a moment";
+}
+
+/** The server's words: the wait until it refreshes. */
+export function limitWords(kind: LimitKind, retryAfterS?: number): string {
+ return sentence(kind, readyInWords(retryAfterS));
+}
+
+/** The page's words: the time it refreshes on the viewer's clock ("at 14:20"), or "in a moment" when that is now. */
+export function limitWordsAt(kind: LimitKind, refreshAt: number, now = Date.now()): string {
+ return sentence(kind, refreshAt - now > 60_000 ? `at ${clockWords(refreshAt, now)}` : "in a moment");
+}
+
+/** The limits on free runs here: past them, the next step is offered (limitNext). */
+export const FREE_LIMITS: readonly LimitKind[] = ["free-today", "free-hour", "network"];
+
+/** What to do now, past a limit on free runs: run it self-hosted (an account), or a free account (a guest). */
+export function limitNext(kind: LimitKind, guest: boolean): { label: string; to: "self-hosted" | "sign-up" } | undefined {
+ if (!FREE_LIMITS.includes(kind)) return undefined;
+ return guest ? { label: "Create a free account for more free runs", to: "sign-up" } : { label: "Want to keep going now? Run it self-hosted →", to: "self-hosted" };
+}
+
+/** The fields a limit's refusal carries for the page (its kind, when it refreshes, epoch ms). */
+export function limitFields(kind: LimitKind, retryAfterS: number, now = Date.now()): { limit: LimitKind; refreshAt: number } {
+ return { limit: kind, refreshAt: now + Math.max(0, retryAfterS) * 1000 };
+}
diff --git a/src/lib/pending-words.ts b/src/lib/pending-words.ts
index 5ea1f0ec..22989f9d 100644
--- a/src/lib/pending-words.ts
+++ b/src/lib/pending-words.ts
@@ -5,20 +5,31 @@ import { POOL_WORDS } from "./relay";
/** Words that already say a run's place ("Waiting for a GPU · 1 ahead", "Next for a GPU", "In ComfyUI's queue"). */
const SAYS_PLACE = /\bahead\b|\bnext\b|\bin line\b|queue/i;
+/** How long a run on this studio's GPUs waits before its tile says it is saved and starts by itself. */
+export const LONG_WAIT_MS = 10 * 60_000;
+
+/** A run on this studio's GPUs that has waited long: it is kept, and starts by itself (never ended for a wait). */
+export const LONG_WAIT_WORDS = "High demand right now — your run is saved and starts automatically; it'll appear here when it's ready.";
+
/**
* What a run on its way says on its tile or cover: its words (never empty: a blank or missing message reads "Queued" or
* "Generating…"), and, for a run waiting for the workers whose words don't say it already, its place in their line
- * ("Next in line", "In line · 3rd · ready in about 2 min"). `local`: the words of its job on the ComfyUI on this
- * computer, when it runs there. On this studio's GPUs (hosted runs) only "In line" with its place, then "Working".
+ * ("You're next", "2 ahead of you · about 2 min"). `local`: the words of its job on the ComfyUI on this computer, when
+ * it runs there. On this studio's GPUs (hosted runs) only its place in line, then "Working"; after a long wait in line,
+ * that it is saved and starts by itself, with its place under it.
*/
-export function pendingWords(g: Pick<Generation, "status" | "message" | "place" | "queue">, local?: string | null): { label: string; place: string | null } {
+export function pendingWords(g: Pick<Generation, "status" | "message" | "place" | "queue"> & { createdAt?: number }, local?: string | null, now = Date.now()): { label: string; place: string | null } {
const message = g.message?.trim() || null;
if (g.place === "pool") {
- if (g.status === "queued") return { label: g.queue ? lineWords(g.queue) : POOL_WORDS.inLine, place: null };
+ if (g.status === "queued") {
+ const line = g.queue ? lineWords(g.queue, now) : POOL_WORDS.inLine;
+ const long = !g.queue?.held && g.createdAt !== undefined && now - g.createdAt >= LONG_WAIT_MS;
+ return long ? { label: LONG_WAIT_WORDS, place: line } : { label: line, place: null };
+ }
return { label: message ?? POOL_WORDS.working, place: null };
}
if (local) return { label: local, place: null };
const label = message ?? (g.status === "queued" ? "Queued" : "Generating…");
- const place = g.status === "queued" && g.queue && !SAYS_PLACE.test(label) ? lineWords(g.queue) : null;
+ const place = g.status === "queued" && g.queue && !SAYS_PLACE.test(label) ? lineWords(g.queue, now) : null;
return { label, place };
}
diff --git a/src/lib/pool-line.ts b/src/lib/pool-line.ts
index cad8bc66..880b1c39 100644
--- a/src/lib/pool-line.ts
+++ b/src/lib/pool-line.ts
@@ -1,12 +1,15 @@
/**
* The words for a run's place in line on this install's GPUs (hosted runs). Before Run, the line under the toolbar says
- * when the result would be ready ("Ready in about 2 min", "Starts when a GPU is free", "Ready in seconds"); a run's tile
- * says where it is and when ("Next in line · ready in about 40 s", "In line · 3rd · starts when a GPU is free"). A run
- * shows only "In line", "Working", then its result: it is taken whatever the line, and never ends for a wait.
+ * when the result would be ready ("Ready in about 2 min", "Warming up · starts automatically", "Ready in seconds"); a
+ * run's tile says where it is and when ("You're next · ready in about 40 s", "2 ahead of you · about 3 min"). A run shows
+ * only its place, "Working", then its result: it is taken whatever the line, and never ends for a wait.
*
- * A run can also be made and wait to enter the line (`held`): behind the account's other runs ("In line · after your
- * other runs"), until a time ("Lots of runs today · starts in about 7 h" before Run, "In line · starts in about 7 h" on
- * its tile), or while runs there are paused ("In line · starts when a GPU is free"). Its tile still says only "In line".
+ * A run can also be made and wait to enter the line (`held`): behind the account's other runs ("After your other runs"),
+ * until a time ("Lots of people are creating on Fuobe today, so free runs are shared out — yours refresh at 14:20." before
+ * Run, "Free runs refresh at 14:20 · this one starts then" on its tile), or while runs there are paused ("Warming up · starts automatically").
+ *
+ * The words are friendly and say what happens next: never the machinery (a GPU, a worker, a queue), never "busy", never
+ * "try again later" (tests/hosted-words.test.ts). They are made in the browser, so a time is the viewer's own clock.
*/
/** Why a run made now waits to enter the line (server: pool-holds.ts). */
@@ -38,24 +41,34 @@ export function aboutWords(seconds: number): string {
return `about ${Math.round(seconds / 3600)} h`;
}
-/** "starts in about 7 h": when a run waiting for a time starts. */
-const startsWords = (startAt: number | undefined, now: number): string => `starts in ${aboutWords(Math.max(0, ((startAt ?? now) - now) / 1000))}`;
+/** A time on the viewer's clock ("14:20"), or "tomorrow at 09:05" when it is on another day. */
+export function clockWords(at: number, now = Date.now()): string {
+ const time = new Intl.DateTimeFormat(undefined, { hour: "2-digit", minute: "2-digit" }).format(at);
+ return new Date(at).toDateString() === new Date(now).toDateString() ? time : `tomorrow at ${time}`;
+}
+
+/** When a run waiting for a time starts: "at 14:20" (or "in a moment" when that time has come). */
+const atWords = (startAt: number | undefined, now: number): string => (startAt && startAt - now > 60_000 ? `at ${clockWords(startAt, now)}` : "in a moment");
+
+/** A wait for a GPU that isn't on yet: when it is due back, else it starts by itself. */
+function warmingWords(q: LineFacts, now: number): string {
+ const ms = q.returnAt ? q.returnAt - now : 0;
+ if (ms <= 0) return "starts automatically";
+ return ms <= 2 * 60_000 ? "starting in a moment" : `starts in ${aboutWords(ms / 1000)}`;
+}
/**
* When the run would be done, or start, in words inside a sentence: "ready in about 40 s", "ready in seconds", "starts
- * when a GPU is free", "starts in about 3 h", "starts after your other runs". Null when nothing is known (no estimate
- * yet): nothing is guessed.
+ * automatically", "starts in about 3 h", "starts at 14:20", "starts after your other runs". Null when nothing is known
+ * (no estimate yet): nothing is guessed.
*/
export function waitWords(q: LineFacts, now = Date.now()): string | null {
if (q.light) return "ready in seconds";
if (q.held === "mine") return "starts after your other runs";
if (q.held === "list") return "starts as soon as you're in";
- if (q.held === "today" || q.held === "hour" || q.held === "credits") return startsWords(q.startAt, now);
- if (q.held === "service" && q.paused) return "starts when a GPU is free";
- if (q.unknown) {
- const ms = q.returnAt ? q.returnAt - now : 0;
- return ms > 0 ? `starts in ${aboutWords(ms / 1000)}` : "starts when a GPU is free";
- }
+ if (q.held === "today" || q.held === "hour" || q.held === "credits") return `starts ${atWords(q.startAt, now)}`;
+ if (q.held === "service" && q.paused) return "starts automatically";
+ if (q.unknown) return warmingWords(q, now);
const s = q.etaSeconds;
return s === null || !Number.isFinite(s) || s < 0 ? null : `ready in ${aboutWords(s)}`;
}
@@ -65,35 +78,46 @@ export const capitalFirst = (s: string): string => (s ? s[0].toUpperCase() + s.s
/**
* The line under the toolbar before Run, as a sentence of its own: "Ready in about 2 min", "Starts after your other
- * runs", "Lots of runs today · starts in about 7 h", "Starts in about 7 h, when your free generations renew", the
- * service's own words while runs there are paused. Null when nothing is known.
+ * runs", "Lots of people are creating on Fuobe today, so free runs are shared out — yours refresh at 14:20.", "Starts
+ * at 14:20, when your free generations renew", the service's own words while runs there are paused. Null when nothing is known.
*/
export function noteWords(q: LineFacts, now = Date.now()): string | null {
if (q.held === "service" && q.paused && q.note) return q.note;
+ if (q.held === "list") return "You're on the waiting list. Your runs start as soon as you're in.";
+ // (The same sentences as a limit's refusal, src/lib/limit-words.ts.)
+ if (q.held === "today") return `Lots of people are creating on Fuobe today, so free runs are shared out — yours refresh ${atWords(q.startAt, now)}.`;
+ if (q.held === "hour") return `Lots of people are creating on Fuobe right now, so free runs are shared out — yours refresh ${atWords(q.startAt, now)}.`;
const wait = waitWords(q, now);
if (!wait) return null;
- if (q.held === "today") return `Lots of runs today · ${wait}`;
if (q.held === "credits") return `${capitalFirst(wait)}, when your free generations renew`;
- if (q.held === "list") return "You're on the waiting list. Your runs start as soon as you're in.";
+ if (q.unknown || (q.held === "service" && q.paused)) return `Warming up · ${wait}`;
return capitalFirst(wait);
}
+/** How many ahead of a place in line make "lots of people" worth saying (only when people really are waiting). */
+const MANY_AHEAD = 5;
+
/**
- * "In line · 3rd · ready in about 2 min": a run's place on this install's GPUs (1: next), and its wait (waitWords). A run
- * waiting to enter the line: "In line · after your other runs" (with when it would be ready, when known), "In line ·
- * starts in about 7 h", "In line · starts when a GPU is free"; one waiting for the service, its place as if in line.
+ * A run's place on this install's GPUs (1: next) and its wait: "You're next · ready in about 40 s", "2 ahead of you ·
+ * about 3 min", "6 ahead of you · about 9 min · lots of people are creating right now". A run waiting for a GPU to come
+ * on: "Warming up · starting in a moment". A run waiting to enter the line: "After your other runs · ready in about 2
+ * min", "Free runs refresh at 14:20 · this one starts then", "You're on the waiting list"; one waiting for the service, as warming up.
*/
export function lineWords(q: LineFacts, now = Date.now()): string {
if (q.held === "mine") {
const s = q.etaSeconds;
- return s !== null && Number.isFinite(s) && s >= 0 ? `In line · after your other runs · ready in ${aboutWords(s)}` : "In line · after your other runs";
+ return s !== null && Number.isFinite(s) && s >= 0 ? `After your other runs · ready in ${aboutWords(s)}` : "After your other runs";
}
- if (q.held === "list") return "In line · you're on the waiting list";
- if (q.held && q.held !== "service") return `In line · ${waitWords(q, now)}`;
- if (q.held === "service" && q.paused) return "In line · starts when a GPU is free";
- const n = Math.max(1, Math.floor(q.place));
- const ord = n % 100 >= 11 && n % 100 <= 13 ? "th" : (({ 1: "st", 2: "nd", 3: "rd" } as Record<number, string>)[n % 10] ?? "th");
- const head = n === 1 ? "Next in line" : `In line · ${n}${ord}`;
- const wait = waitWords(q, now);
- return wait ? `${head} · ${wait}` : head;
+ if (q.held === "list") return "You're on the waiting list · starts as soon as you're in";
+ if (q.held === "today" || q.held === "hour") return `Free runs refresh ${atWords(q.startAt, now)} · this one starts then`;
+ if (q.held === "credits") return `Starts ${atWords(q.startAt, now)}, when your free generations renew`;
+ if ((q.held === "service" && q.paused) || q.unknown) return `Warming up · ${warmingWords(q, now)}`;
+ const ahead = Math.max(0, Math.floor(q.place) - 1);
+ const s = q.etaSeconds;
+ const eta = q.light ? "seconds" : s !== null && Number.isFinite(s) && s >= 0 ? aboutWords(s) : null;
+ if (ahead === 0) return eta ? `You're next · ready in ${eta}` : "You're next";
+ const head = `${ahead} ahead of you`;
+ const line = eta ? `${head} · ${q.light ? "ready in seconds" : eta}` : head;
+ // (The place and the wait first: a tile shows two lines.)
+ return ahead >= MANY_AHEAD ? `${line} · lots of people are creating right now` : line;
}
diff --git a/src/lib/refusals.ts b/src/lib/refusals.ts
index a34bf0c4..b0417f6e 100644
--- a/src/lib/refusals.ts
+++ b/src/lib/refusals.ts
@@ -22,7 +22,15 @@ export function responseError(res: Response, e: string | Error): Error {
/** The refusal behind this error shows its own card already: no toast on top of it. */
export const refusalShown = (e: unknown): boolean => !!(e as { refusalShown?: boolean } | null)?.refusalShown;
-/** The error toast for a failed upload or run (its message, else `fallback`), unless its refusal shows its own card. */
+/** What to do next after a refusal, a press away (a limit's "Run it self-hosted", src/lib/limit-words.ts). */
+export type NextStep = { label: string; run: () => void };
+
+/**
+ * The error toast for a failed upload or run (its message, else `fallback`), unless its refusal shows its own card. A
+ * refusal with a next step offers it on the toast.
+ */
export function toastError(e: unknown, fallback?: string): void {
- if (!refusalShown(e)) toast.error((e as Error).message || fallback);
+ if (refusalShown(e)) return;
+ const next = (e as { next?: NextStep } | null)?.next;
+ toast.error((e as Error).message || fallback, next ? { action: { label: next.label, onClick: next.run } } : undefined);
}
diff --git a/src/lib/relay.ts b/src/lib/relay.ts
index 301266cf..7ecfb5dd 100644
--- a/src/lib/relay.ts
+++ b/src/lib/relay.ts
@@ -493,8 +493,8 @@ export const POOL_WORDS = {
inLine: "In line",
working: "Working",
/** Working, with its model still loading (the GPU had another one loaded): no progress yet. */
- gettingReady: "Working · getting ready",
- failed: "Sorry, this one couldn't be made.",
+ gettingReady: "Warming up · starting in a moment",
+ failed: "That one didn't come out right — try again, or try a similar model.",
} as const;
/**
@@ -502,8 +502,8 @@ export const POOL_WORDS = {
* on this install's GPUs too, since they say what to change.
*/
export const FILE_TROUBLE_WORDS = {
- crashed: "This run couldn't finish with these files or settings.",
- unreadable: "A clip or sound in this run couldn't be read.",
+ crashed: "That one didn't come out right with these files or settings — try another file or other settings.",
+ unreadable: "We couldn't read a clip or sound in this run — try another file (MP4, MOV or MP3 work best).",
} as const;
/** A script's open-source run (an API token) while the owner's ComfyUI is on the owner's computer. */
diff --git a/src/lib/upload.ts b/src/lib/upload.ts
index 003df82f..c773ec6a 100644
--- a/src/lib/upload.ts
+++ b/src/lib/upload.ts
@@ -93,7 +93,7 @@ function sendWithProgress(file: File, onProgress: (p: number) => void, signal?:
}
reject(err);
};
- xhr.onerror = () => reject(new Error("Upload failed — check your connection"));
+ xhr.onerror = () => reject(new Error("That upload didn't finish — check your connection and try again."));
xhr.onabort = () => reject(new DOMException("Aborted", "AbortError"));
signal?.addEventListener("abort", () => xhr.abort());
xhr.send(file);
diff --git a/src/server/account-files.ts b/src/server/account-files.ts
index 82a301d1..84870a70 100644
--- a/src/server/account-files.ts
+++ b/src/server/account-files.ts
@@ -83,11 +83,11 @@ export const ACCOUNT_MESSAGES = {
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.",
- diskLow: "Uploads are paused for a moment. Please try again shortly.",
+ diskLow: "Uploads will be ready again in a moment — please try once more shortly.",
activeRuns: "You have 4 runs going. Start the next one when one finishes.",
waitingRuns: "You have 4 runs waiting for your GPU. Cancel one, or run one with your key, to start another.",
- runRate: "That's a lot of runs this hour. Try again later.",
- finishRate: "That's a lot of finished pictures this hour. Try again later.",
+ runRate: "You've made a lot this hour — your next runs are ready in a little while.",
+ finishRate: "You've finished a lot of pictures this hour — more are ready in a little while.",
finishBusy: "Your last pictures are still being saved. Try again in a moment.",
outputsCapped: "Each run makes up to 4 results.",
bodyTooBig: "That's too large to send. Try a smaller file.",
diff --git a/src/server/account-tool-run.ts b/src/server/account-tool-run.ts
index 5248fe88..e1cad9b9 100644
--- a/src/server/account-tool-run.ts
+++ b/src/server/account-tool-run.ts
@@ -29,6 +29,7 @@ import { once } from "./shorts-schemas";
import { ShortsError } from "./shorts";
import { hostedRunsOn } from "./hosted-switch";
import { answerPress, claimPress, pressTry, releasePress, toolPressKey, toolPressSeen, type Press, type PressAnswer, type PressClaim } from "./run-requests";
+import { limitWords } from "@/lib/limit-words";
/**
* A tool's run for a signed-in account (public sign-up): Genjutsu first, then the other tools that plan a run as a
@@ -438,7 +439,7 @@ export async function runAccountTool<T>(request: Request, account: Account, aske
const ownLimits = (): Response | null => {
if (activeAccountRuns(id) >= ACCOUNT_LIMITS.activeRuns) return refuse(429, ACCOUNT_MESSAGES.activeRuns, { code: ACTIVE_RUNS_CODE }, { "Retry-After": "30" });
const rate = hit(`run:${id}`, ACCOUNT_LIMITS.runsPerHour, 60 * 60_000);
- if (!rate.ok) return refuse(429, ACCOUNT_MESSAGES.runRate, {}, { "Retry-After": String(rate.retryAfterS) });
+ if (!rate.ok) return refuse(429, limitWords("runs", rate.retryAfterS), {}, { "Retry-After": String(rate.retryAfterS) });
rated = true;
return null;
};
diff --git a/src/server/computer/finish.ts b/src/server/computer/finish.ts
index 89296eb4..cccaaf4a 100644
--- a/src/server/computer/finish.ts
+++ b/src/server/computer/finish.ts
@@ -64,13 +64,15 @@ export function finishTask(generationId: string, kind: FinishKind, step = 0): Ta
/**
* The wait the run was stamped with (the billing service's limit; 0: as long as it takes, so none), else this
- * install's (FUOBE_POOL_WAIT_MIN). Undefined: no limit.
+ * install's (FUOBE_POOL_WAIT_MIN, when set). Undefined: no limit.
*/
function runWaitMs(generationId: string): number | undefined {
const r = db().prepare("SELECT json_extract(request_json, '$.waitMs') AS w FROM generations WHERE id = ?").get(generationId) as { w: unknown } | undefined;
const w = r?.w === null || r?.w === undefined ? NaN : Number(r.w);
if (w === 0) return undefined;
- return Number.isFinite(w) && w > 0 ? w : poolWaitMs();
+ if (Number.isFinite(w) && w > 0) return w;
+ // This install's own limit, when it sets one (none by default: as long as it takes).
+ return poolWaitMs() || undefined;
}
/**
diff --git a/src/server/computer/pool.ts b/src/server/computer/pool.ts
index 570beda4..ee22bc4c 100644
--- a/src/server/computer/pool.ts
+++ b/src/server/computer/pool.ts
@@ -1,4 +1,5 @@
import "server-only";
+import { ENGINE_WORDS } from "@/lib/engine-error";
import crypto from "node:crypto";
import { FINISH_KINDS, type FinishTicket } from "@/lib/finish-ticket";
import { ceilingProblem, cleanCeiling, insideCeiling, lanesInside, type Ceiling } from "@/lib/job-ticket";
@@ -773,7 +774,7 @@ function sweepLine(d: ReturnType<typeof db>, now: number): void {
}
}
const late = d.prepare("SELECT id FROM relay_tasks WHERE pools IS NOT NULL AND state = 'waiting' AND claimed_at IS NULL AND not_after IS NOT NULL AND not_after < ?").all(now) as { id: string }[];
- for (const t of late) endTask(t.id, "failed", { error: "The GPUs were busy. Not charged." });
+ for (const t of late) endTask(t.id, "failed", { error: ENGINE_WORDS["long-wait"] });
}
/** The longest sleep a worker's beat may report (a week). */
@@ -1255,10 +1256,13 @@ export function gettingReady(generationId: string): boolean {
return !!t && taskCold(t);
}
-/** FUOBE_POOL_WAIT_MIN: how long a task for workers waits before it fails (30 minutes). */
+/**
+ * FUOBE_POOL_WAIT_MIN: how long a task for workers waits before it fails. 0 when it isn't set: a run waits in line as
+ * long as it takes, and starts by itself.
+ */
export const poolWaitMs = () => {
const m = Number(process.env.FUOBE_POOL_WAIT_MIN);
- return (Number.isFinite(m) && m > 0 ? m : 30) * 60_000;
+ return Number.isFinite(m) && m > 0 ? m * 60_000 : 0;
};
/** The waiting words of a task for workers ("Waiting for a GPU · 2 ahead", "No GPU is on now"). */
diff --git a/src/server/faceless-account.ts b/src/server/faceless-account.ts
index 477deaf9..461c4c4e 100644
--- a/src/server/faceless-account.ts
+++ b/src/server/faceless-account.ts
@@ -4,6 +4,7 @@ import { AccountProjectError, projectRefsProblem } from "./account-projects";
import { FacelessError } from "./faceless";
import { hit } from "./rate";
import { ShortsError } from "./shorts";
+import { limitWords } from "@/lib/limit-words";
/**
* The account side of the routes of Faceless Studio, the Explainer and Content Factory (public sign-up). A signed-in
@@ -43,5 +44,5 @@ export const READS_PER_HOUR = 30;
/** An account's document read past its hour: 429, or null. */
export function readsLimited(accountId: string): Response | null {
const rate = hit(`faceless-read:${accountId}`, READS_PER_HOUR, 60 * 60_000);
- return rate.ok ? null : Response.json({ error: "You've added a lot of files this hour. Try again later." }, { status: 429, headers: { "Retry-After": String(rate.retryAfterS) } });
+ return rate.ok ? null : Response.json({ error: limitWords("files", rate.retryAfterS) }, { status: 429, headers: { "Retry-After": String(rate.retryAfterS) } });
}
diff --git a/src/server/generations.ts b/src/server/generations.ts
index 39758272..7edce7c9 100644
--- a/src/server/generations.ts
+++ b/src/server/generations.ts
@@ -111,7 +111,7 @@ import {
} from "@/lib/diagnose";
import { draining } from "./shutdown";
import { keptText, networkCode, recordOwnRun, recordRunEvent, type HostKind } from "./run-events";
-import { cleanEngineText, isEngineWords, storedErrorText, withoutFolders } from "@/lib/engine-error";
+import { cleanEngineText, ENGINE_WORDS, isEngineWords, storedErrorText, withoutFolders } from "@/lib/engine-error";
import { CONNECT_GPU_MESSAGE, GUEST_RUN_MESSAGE, OWN_GPU_TOOL_MESSAGE } from "@/lib/guest-access";
import { MODEL3D_SETUP, ownSetupLabel } from "@/lib/own-setup";
import { outsideTenant, runAsTenant, tenant, tenantAccount } from "./tenant";
@@ -2376,7 +2376,8 @@ export const OWN_GPU_ONLY = "Pick an open-source model to run it on your GPU.";
export const OPEN_ONLY_RUN = "Pick an open-source model to run this on your GPU.";
export const SWITCHED_OFF_RUN = "This account is closed, so its runs stopped.";
/** A run on this install's GPUs that waited past its limit (hosted runs). */
-export const POOL_WAITED = "The GPUs were busy, so it didn't run. Not charged.";
+/** A run on this install's GPUs that waited past the limit set for it (a billing service's; none by default). */
+export const POOL_WAITED = ENGINE_WORDS["long-wait"];
/**
* Everything an account's work runs inside: as the account (tenant.ts: only its own files and runs), on its own ComfyUI
@@ -4361,7 +4362,9 @@ async function pollOne(r: Row): Promise<void> {
.catch(() => {});
const words =
run.started_at || deadline
- ? `Timed out after ${Math.round(limitMs / 60_000)} minutes`
+ ? onPool
+ ? ENGINE_WORDS.timeout
+ : `Timed out after ${Math.round(limitMs / 60_000)} minutes`
: res?.state === "queued" && res.timeoutError
? res.timeoutError
: onPool
diff --git a/src/server/hosted.ts b/src/server/hosted.ts
index cb806194..228814bc 100644
--- a/src/server/hosted.ts
+++ b/src/server/hosted.ts
@@ -320,13 +320,13 @@ const POOL_ROWS = "json_extract(g.request_json, '$.place') = 'pool' AND g.status
/**
* How long a run on this install's GPUs may wait in line: the limit stamped on it (the policy's or the billing service's;
- * 0: as long as it takes), else FUOBE_POOL_WAIT_MIN (30).
+ * 0: as long as it takes), else FUOBE_POOL_WAIT_MIN, else as long as it takes (it stays in line and starts by itself).
*/
export function poolWaitMs(stamped?: number): number {
if (stamped === 0) return Infinity;
if (stamped && stamped > 0) return stamped;
const m = Number(process.env.FUOBE_POOL_WAIT_MIN);
- return (Number.isFinite(m) && m > 0 ? m : 30) * 60_000;
+ return Number.isFinite(m) && m > 0 ? m * 60_000 : Infinity;
}
/** A typical run's time on this install's GPUs (the median of the last 20 that finished), or null before any. */
diff --git a/src/server/pool-limits.ts b/src/server/pool-limits.ts
index f9a6400c..3b62a807 100644
--- a/src/server/pool-limits.ts
+++ b/src/server/pool-limits.ts
@@ -7,6 +7,7 @@ import { heldCap, holdsOn, type Policy } from "./billing";
import { db } from "./db";
import { hostedRunsOn } from "./hosted-switch";
import { heldRuns, NOT_HELD } from "./pool-holds";
+import { limitFields, limitWords, type LimitKind } from "@/lib/limit-words";
/**
* The limits on an account's runs, counted in SQLite so that requests that arrive together, in one process or in two
@@ -39,8 +40,8 @@ const KEEP_MS = 2 * HOUR;
export const POOL_LIMIT_WORDS = {
active: (n: number) => `You have ${n} ${n === 1 ? "run" : "runs"} going. Start this one when one finishes.`,
waiting: (n: number) => `You have ${n} ${n === 1 ? "run" : "runs"} in line. Start this one when one of them starts.`,
- hourly: "That's a lot of runs this hour. Try again later.",
- address: "That's a lot of runs from your network this hour. Try again later.",
+ hourly: (retryAfterS?: number) => limitWords("free-hour", retryAfterS),
+ address: (retryAfterS?: number) => limitWords("network", retryAfterS),
/** The one press that is turned down while runs wait: past the cap on runs waiting (`n`: the account's runs on the way). */
heldCap: (n: number) => `You have ${n} ${n === 1 ? "run" : "runs"} on the way. Add more when one is done.`,
};
@@ -50,6 +51,9 @@ export interface LimitRefusal {
error: string;
code: string;
retryAfterS: number;
+ /** A limit on free runs: its kind and when it refreshes (epoch ms), so the page says it on the viewer's clock. */
+ limit?: LimitKind;
+ refreshAt?: number;
}
/**
@@ -259,7 +263,7 @@ export function poolLimitPlan(accountId: string, policy: Pick<Policy, "limits">,
if (holds) startAt = hourStart("account", accountId, hourMax, now);
else {
const h = since("account", accountId, now - HOUR);
- if (h.n >= hourMax) return { refuse: { status: 429, error: POOL_LIMIT_WORDS.hourly, code: "limit", retryAfterS: retryAfter(h.oldest, now) } };
+ if (h.n >= hourMax) return { refuse: { status: 429, error: POOL_LIMIT_WORDS.hourly(retryAfter(h.oldest, now)), code: "limit", retryAfterS: retryAfter(h.oldest, now), ...limitFields("free-hour", retryAfter(h.oldest, now), now) } };
}
}
const address = addrMax ? (typeof addr === "function" ? addr() : addr) : null;
@@ -269,7 +273,7 @@ export function poolLimitPlan(accountId: string, policy: Pick<Policy, "limits">,
if (at !== null) startAt = Math.max(startAt ?? 0, at);
} else {
const h = since("addr", address, now - HOUR);
- if (h.n >= addrMax) return { refuse: { status: 429, error: POOL_LIMIT_WORDS.address, code: "limit", retryAfterS: retryAfter(h.oldest, now) } };
+ if (h.n >= addrMax) return { refuse: { status: 429, error: POOL_LIMIT_WORDS.address(retryAfter(h.oldest, now)), code: "limit", retryAfterS: retryAfter(h.oldest, now), ...limitFields("network", retryAfter(h.oldest, now), now) } };
}
}
if (!holds) return { go: true };
diff --git a/src/server/providers/llm.ts b/src/server/providers/llm.ts
index 3f70246d..990a8c65 100644
--- a/src/server/providers/llm.ts
+++ b/src/server/providers/llm.ts
@@ -208,7 +208,7 @@ async function viaComfy(system: string, user: string, signal: AbortSignal): Prom
function helperTrouble(a: Exclude<HelperAnswer, { text: string }>): string {
if (a.error === "blocked") return a.message || "This text can't be written here.";
if (a.error === "sign-in") return GUEST_RUN_MESSAGE;
- if (a.error === "busy") return "The writer is busy right now. Press Retry in a moment.";
+ if (a.error === "busy") return "Lots of people are writing right now — press Retry in a moment.";
return "The writer couldn't finish this text. Press Retry.";
}
diff --git a/src/server/smaller-copy.ts b/src/server/smaller-copy.ts
index 4399005d..48ba2ba9 100644
--- a/src/server/smaller-copy.ts
+++ b/src/server/smaller-copy.ts
@@ -103,7 +103,7 @@ function shrinkClip(input: string, out: string): Promise<void> {
export async function withSmallerCopy(accountId: string, req: GenerationRequest): Promise<{ request: GenerationRequest; bytes: number }> {
const now = making();
if (now.accounts.has(accountId)) throw new SmallerCopyBusy("Your last smaller copy is still being made. Try again once it's done.");
- if (now.total >= SMALLER_COPY_LIMITS.atOnce) throw new SmallerCopyBusy("Smaller copies are busy right now. Try again in a minute.");
+ if (now.total >= SMALLER_COPY_LIMITS.atOnce) throw new SmallerCopyBusy("Lots of smaller copies are being made right now — try again in a minute.");
now.accounts.add(accountId);
now.total++;
try {
diff --git a/tests/account-keys-limits.test.ts b/tests/account-keys-limits.test.ts
index e63260c7..aeca763a 100644
--- a/tests/account-keys-limits.test.ts
+++ b/tests/account-keys-limits.test.ts
@@ -76,7 +76,7 @@ describe("an account's limits hold for runs on its own key", () => {
for (let i = 0; i < files.ACCOUNT_LIMITS.runsPerHour; i++) hit(`run:${A}`, files.ACCOUNT_LIMITS.runsPerHour, 60 * 60_000);
const r = await post({});
expect(r.status).toBe(429);
- expect((await r.json()).error).toBe(files.ACCOUNT_MESSAGES.runRate);
+ expect((await r.json()).error).toMatch(/^You've made a lot this hour — you can run again in about \d+ min\.$/);
expect(fal.log).toEqual([]);
});
diff --git a/tests/cpu-slot.test.ts b/tests/cpu-slot.test.ts
index a2193bc4..f5abe89d 100644
--- a/tests/cpu-slot.test.ts
+++ b/tests/cpu-slot.test.ts
@@ -624,9 +624,10 @@ describe("finishing jobs and their run", () => {
it("wait for a CPU slot as long as their run may wait in line; a 3D model whose finish never came keeps its raw GLB", async () => {
const { saveFile } = await import("@/server/storage");
- // Its run's own wait, else this install's.
+ // Its run's own wait, else this install's (none by default: it waits as long as it takes).
const fin = modelFinish();
- expect(row(fin).not_after).toBeGreaterThan(Date.now() + pool.poolWaitMs() - 60_000);
+ expect(pool.poolWaitMs()).toBe(0);
+ expect(row(fin).not_after).toBeNull();
const gid = generation(accountId, "image-to-3d");
db().prepare("UPDATE generations SET request_json = ? WHERE id = ?").run(JSON.stringify({ account: accountId, place: "pool", waitMs: 120_000 }), gid);
const raw = saveFile({ data: Buffer.from("glTF raw model"), contentType: "model/gltf-binary", name: "model.glb", source: "generation", generationId: gid, accountId });
diff --git a/tests/engine-error.test.ts b/tests/engine-error.test.ts
index f5fdcdb6..ccc4a7ee 100644
--- a/tests/engine-error.test.ts
+++ b/tests/engine-error.test.ts
@@ -122,13 +122,15 @@ describe("what the person reads for each kind of failure", () => {
expect(engineFailureKind("Value not in list: ckpt_name: 'x.safetensors' not in []")).toBe("missing-on-gpu");
expect(engineFailureKind("ComfyUI restarted and lost this run. Press Retry.")).toBe("gpu-stopped");
expect(engineFailureKind("KSampler: mat1 and mat2 shapes cannot be multiplied")).toBe("unknown");
+ expect(engineFailureKind("This one didn't start in time — try again, or try a similar model.")).toBe("long-wait");
+ expect(engineFailureKind("Stopped after 3 tries: ComfyUI kept stopping on the GPUs.")).toBe("gpu-stopped");
});
it("the example: a plain sentence for the person, the cleaned words for the owner", () => {
const f = plainEngineFailure(VHS_ONE_LINE);
expect(f.kind).toBe("no-sound");
expect(f.words).toBe(ENGINE_WORDS["no-sound"]);
- expect(f.words).toBe("This clip has no sound for this run to use. Try a clip with sound.");
+ expect(f.words).toBe("This clip has no sound for this run to use — try a clip with sound.");
expect(f.detail).toMatch(/^VHS_LoadVideo: VHS failed to extract audio from fuobe_HFpqXpUDFs__\.mp4/);
for (const leak of LEAKS) expect(f.detail!, `${leak}`).not.toMatch(leak);
});
@@ -136,9 +138,9 @@ describe("what the person reads for each kind of failure", () => {
it("every sentence is plain: no path, node, engine or dead end", () => {
for (const w of Object.values(ENGINE_WORDS)) {
expect(isEngineWords(w)).toBe(true);
- expect(w).not.toMatch(/ComfyUI|GPU|worker|node|ffmpeg|VHS|support|Press Retry|[\\/]/i);
+ expect(w).not.toMatch(/ComfyUI|GPU|worker|node|ffmpeg|VHS|support|busy|queue|lane|Press Retry|try again later|[\\/!]/i);
// What to do next is always said.
- expect(w).toMatch(/Try|Run it again/);
+ expect(w).toMatch(/\btry\b/i);
}
expect(isEngineWords("VHS_LoadVideo: x")).toBe(false);
});
diff --git a/tests/golden/self-host/words.json b/tests/golden/self-host/words.json
index d989b2e0..1549dd09 100644
--- a/tests/golden/self-host/words.json
+++ b/tests/golden/self-host/words.json
@@ -674,11 +674,11 @@
"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.",
- "diskLow": "Uploads are paused for a moment. Please try again shortly.",
+ "diskLow": "Uploads will be ready again in a moment — please try once more shortly.",
"activeRuns": "You have 4 runs going. Start the next one when one finishes.",
"waitingRuns": "You have 4 runs waiting for your GPU. Cancel one, or run one with your key, to start another.",
- "runRate": "That's a lot of runs this hour. Try again later.",
- "finishRate": "That's a lot of finished pictures this hour. Try again later.",
+ "runRate": "You've made a lot this hour — your next runs are ready in a little while.",
+ "finishRate": "You've finished a lot of pictures this hour — more are ready in a little while.",
"finishBusy": "Your last pictures are still being saved. Try again in a moment.",
"outputsCapped": "Each run makes up to 4 results.",
"bodyTooBig": "That's too large to send. Try a smaller file.",
diff --git a/tests/hosted-run-button.test.ts b/tests/hosted-run-button.test.ts
index 5f451c60..d0e0d668 100644
--- a/tests/hosted-run-button.test.ts
+++ b/tests/hosted-run-button.test.ts
@@ -24,27 +24,29 @@ const { TooltipProvider } = await import("@/components/ui/tooltip");
const render = (node: ReactNode) => renderToStaticMarkup(createElement(QueryClientProvider, { client: new QueryClient() }, createElement(TooltipProvider, null, node)));
describe("the words for a place in line", () => {
- it("says next, or the place, with when it would be ready", () => {
- expect(lineWords({ place: 1, etaSeconds: null })).toBe("Next in line");
- expect(lineWords({ place: 1, etaSeconds: 38 })).toBe("Next in line · ready in about 40 s");
- expect(lineWords({ place: 3, etaSeconds: 130 })).toBe("In line · 3rd · ready in about 2 min");
- expect(lineWords({ place: 12, etaSeconds: null })).toBe("In line · 12th");
- expect(lineWords({ place: 22, etaSeconds: 3 })).toBe("In line · 22nd · ready in about 5 s");
- expect(lineWords({ place: 2, etaSeconds: 3 * 3600 })).toBe("In line · 2nd · ready in about 3 h");
+ it("says you're next, or how many are ahead, with when it would be ready", () => {
+ expect(lineWords({ place: 1, etaSeconds: null })).toBe("You're next");
+ expect(lineWords({ place: 1, etaSeconds: 38 })).toBe("You're next · ready in about 40 s");
+ expect(lineWords({ place: 3, etaSeconds: 130 })).toBe("2 ahead of you · about 2 min");
+ expect(lineWords({ place: 2, etaSeconds: 3 * 3600 })).toBe("1 ahead of you · about 3 h");
+ // Lots of people only when lots really are waiting ahead.
+ expect(lineWords({ place: 12, etaSeconds: null })).toBe("11 ahead of you · lots of people are creating right now");
+ expect(lineWords({ place: 22, etaSeconds: 3 })).toBe("21 ahead of you · about 5 s · lots of people are creating right now");
// Never a place before the first, nor a wait that can't be.
- expect(lineWords({ place: 0, etaSeconds: -5 })).toBe("Next in line");
+ expect(lineWords({ place: 0, etaSeconds: -5 })).toBe("You're next");
});
- it("no GPU can take it now: it starts when one is free, or when the first is due back", () => {
+ it("no GPU can take it now: warming up, starting by itself or when the first is due back", () => {
const now = 1_000_000_000_000;
- expect(lineWords({ place: 3, etaSeconds: null, unknown: true }, now)).toBe("In line · 3rd · starts when a GPU is free");
- expect(lineWords({ place: 1, etaSeconds: null, unknown: true, returnAt: now + 3 * 3600_000 }, now)).toBe("Next in line · starts in about 3 h");
+ expect(lineWords({ place: 3, etaSeconds: null, unknown: true }, now)).toBe("Warming up · starts automatically");
+ expect(lineWords({ place: 1, etaSeconds: null, unknown: true, returnAt: now + 3 * 3600_000 }, now)).toBe("Warming up · starts in about 3 h");
+ expect(lineWords({ place: 1, etaSeconds: null, unknown: true, returnAt: now + 60_000 }, now)).toBe("Warming up · starting in a moment");
// A return time already past says nothing it can't keep.
- expect(lineWords({ place: 1, etaSeconds: null, unknown: true, returnAt: now - 1000 }, now)).toBe("Next in line · starts when a GPU is free");
+ expect(lineWords({ place: 1, etaSeconds: null, unknown: true, returnAt: now - 1000 }, now)).toBe("Warming up · starts automatically");
});
it("before Run: when the result would be ready, and nothing when nothing is known", () => {
expect(waitWords({ place: 3, etaSeconds: 130 })).toBe("ready in about 2 min");
expect(waitWords({ place: 1, etaSeconds: 40 })).toBe("ready in about 40 s");
- expect(waitWords({ place: 4, etaSeconds: null, unknown: true })).toBe("starts when a GPU is free");
+ expect(waitWords({ place: 4, etaSeconds: null, unknown: true })).toBe("starts automatically");
expect(waitWords({ place: 1, etaSeconds: null, light: true })).toBe("ready in seconds");
expect(waitWords({ place: 1, etaSeconds: null })).toBeNull();
});
@@ -63,7 +65,7 @@ describe("Run before it is pressed (the price check's answer)", () => {
expect(poolRunState({ place: "pool", quote: { allowed: true, amount: 0, priceVersion: "", text: "Free" }, line: { place: 2, etaSeconds: null, unknown: true, long: true } })).toEqual({
refused: false,
text: "Free",
- wait: "starts when a GPU is free",
+ wait: "starts automatically",
long: true,
});
});
@@ -97,8 +99,8 @@ describe("Run before it is pressed (the price check's answer)", () => {
expect(render(createElement(PoolNote, { state: { refused: false, text: "Free" } }))).toBe("");
// A long wait: the account's own GPU (or key, with its price) for this run, once; never on a short one.
const offer = { label: "Run it now on your GPU", run: () => {} };
- const long = render(createElement(PoolNote, { state: { refused: false, text: "Free", wait: "starts when a GPU is free", long: true }, offer }));
- expect(long).toContain("Starts when a GPU is free");
+ const long = render(createElement(PoolNote, { state: { refused: false, text: "Free", wait: "starts automatically", long: true }, offer }));
+ expect(long).toContain("Starts automatically");
expect(long).toContain("Run it now on your GPU");
expect(render(createElement(PoolNote, { state: { refused: false, text: "Free", wait: "ready in about 40 s" }, offer }))).not.toContain("Run it now");
const refused = render(
diff --git a/tests/hosted-run-tiles.test.ts b/tests/hosted-run-tiles.test.ts
index 81524aae..47cb4e0b 100644
--- a/tests/hosted-run-tiles.test.ts
+++ b/tests/hosted-run-tiles.test.ts
@@ -54,18 +54,18 @@ describe("a run's tile on this studio's GPUs", () => {
it("in line: its place and wait, no progress (after a recovery too, whatever an earlier attempt reached)", () => {
const html = render(createElement(PendingTile, { g: gen({ place: "pool", status: "queued", message: POOL_WORDS.inLine, progress: 0.6, queue: { place: 3, etaSeconds: 130 } }), ratio: 1 }));
expect(html).toContain('data-run-state="in-line"');
- expect(html).toContain("In line · 3rd · ready in about 2 min");
+ expect(html).toContain("2 ahead of you · about 2 min");
expect(html).not.toContain("60%");
expect(html).not.toContain("scaleX");
});
it("in line while no GPU can take it now: its place, and it starts when one is free", () => {
const html = render(createElement(PendingTile, { g: gen({ place: "pool", status: "queued", message: POOL_WORDS.inLine, queue: { place: 3, etaSeconds: null, unknown: true } }), ratio: 1 }));
- expect(html).toContain("In line · 3rd · starts when a GPU is free");
+ expect(html).toContain("Warming up · starts automatically");
});
- it("working while its model loads: Working · getting ready, with no %", () => {
+ it("working while its model loads: Warming up · starting in a moment, with no %", () => {
const html = render(createElement(PendingTile, { g: gen({ place: "pool", status: "running", message: POOL_WORDS.gettingReady, progress: null }), ratio: 1 }));
expect(html).toContain('data-run-state="working"');
- expect(html).toContain("Working · getting ready");
+ expect(html).toContain("Warming up · starting in a moment");
expect(html).not.toContain("%");
});
it("in line with no place known yet: In line", () => {
diff --git a/tests/hosted-words.test.ts b/tests/hosted-words.test.ts
index 7374e6e9..bc0a9540 100644
--- a/tests/hosted-words.test.ts
+++ b/tests/hosted-words.test.ts
@@ -142,7 +142,7 @@ function serverWords(place: ReturnType<typeof placeOf>): string[] {
function chipWords(place: ReturnType<typeof placeOf>): string[] {
const out: string[] = [];
for (const audience of ["account", "guest"] as const)
- for (const pool of [undefined, { text: "" }, { text: "1 generation", wait: "ready in about 40 s" }, { text: "Free", wait: "starts when a GPU is free" }, { text: "You have 2 runs going.", refused: true }])
+ for (const pool of [undefined, { text: "" }, { text: "1 generation", wait: "ready in about 40 s" }, { text: "Free", wait: "starts automatically" }, { text: "You have 2 runs going.", refused: true }])
for (const p of [runPlace({ audience, engine: "open", hosted: true, models: ["Z-Image Turbo"], pool, place, format: String })]) out.push(p.label, p.price, p.title, p.tip, p.send);
// A label (what runs on one's own GPU), and a tool for the studio's owner only.
for (const audience of ["account", "guest"] as const) {
@@ -177,7 +177,7 @@ describe("the words for runs on this install's GPUs", () => {
});
it("one sentence for a run that can't be made, the same in the planner and the tile", () => {
- expect(POOL_WORDS.failed).toBe("Sorry, this one couldn't be made.");
+ expect(POOL_WORDS.failed).toBe("That one didn't come out right — try again, or try a similar model.");
expect(SITE_FAILED_WORDS).toBe(POOL_WORDS.failed);
expect(SITE_HIDDEN_WORDS).toBe("This result didn't pass the safety check, so it was removed. Not charged.");
});
@@ -215,11 +215,11 @@ describe("the pages a visitor reads while hosted runs are on", () => {
render(createElement(StatusCover, { g: gen({ status: "running", message: POOL_WORDS.working, progress: 0.4 }) })),
render(createElement(StatusCover, { g: gen({ status: "failed", error: POOL_WORDS.failed }) })),
].map(textOf);
- expect(pages[3]).toContain("In line · 3rd · ready in about 2 min");
+ expect(pages[3]).toContain("2 ahead of you · about 2 min");
expect(pages[4]).toContain("Working");
- expect(pages[5]).toContain("Sorry, this one couldn't be made.");
+ expect(pages[5]).toContain("That one didn't come out right — try again, or try a similar model.");
expect(pages[5]).not.toContain("Couldn't generate this one");
- expect(listStatus({ status: "failed", place: "pool" })).toBe("Couldn't be made");
+ expect(listStatus({ status: "failed", place: "pool" })).toBe("Didn't come out right");
expect(listStatus({ status: "queued", place: "pool" })).toBe("In line");
expect(listStatus({ status: "running", place: "pool" })).toBe("Working");
for (const t of pages) expect(t).not.toMatch(FORBIDDEN);
diff --git a/tests/limit-words.test.ts b/tests/limit-words.test.ts
new file mode 100644
index 00000000..4ec1e009
--- /dev/null
+++ b/tests/limit-words.test.ts
@@ -0,0 +1,84 @@
+import { describe, expect, it } from "vitest";
+import { clockWords, lineWords, noteWords } from "@/lib/pool-line";
+import { LIMIT_KINDS, limitFields, limitNext, limitWords, limitWordsAt, readyInWords } from "@/lib/limit-words";
+import { ENGINE_WORDS } from "@/lib/engine-error";
+import { FILE_TROUBLE_WORDS, POOL_WORDS } from "@/lib/relay";
+
+/*
+ * Every wait, failure and limit a visitor reads about runs here is friendly and says what happens next: never the
+ * machinery, never "busy" or "try again later", never an exclamation (src/lib/limit-words.ts, src/lib/pool-line.ts,
+ * src/lib/engine-error.ts).
+ */
+
+const NEGATIVE = /\bbusy\b|resting|\bworkers?\b|\blanes?\b|\bqueue|try again later|error code|ComfyUI|!|[\\/]/i;
+
+describe("limits", () => {
+ const now = new Date(2026, 10, 8, 12, 0).getTime();
+
+ it("say when free runs refresh, on the server as a wait and on the page as the viewer's clock", () => {
+ expect(limitWords("free-today", 40 * 60)).toBe("Lots of people are creating on Fuobe today, so free runs are shared out — yours refresh in about 40 min.");
+ const at = now + (2 * 60 + 20) * 60_000;
+ expect(limitWordsAt("free-today", at, now)).toBe(`Lots of people are creating on Fuobe today, so free runs are shared out — yours refresh at ${clockWords(at, now)}.`);
+ expect(limitWordsAt("replies", at, now)).toMatch(/free replies are shared out — yours refresh at /);
+ // A time that has come: in a moment, never a time in the past.
+ expect(limitWordsAt("free-hour", now - 1000, now)).toMatch(/refresh in a moment\.$/);
+ expect(readyInWords(20)).toBe("in a moment");
+ expect(limitFields("free-hour", 90, now)).toEqual({ limit: "free-hour", refreshAt: now + 90_000 });
+ });
+
+ it("a time on another day says so", () => {
+ expect(clockWords(now + 20 * 3600_000, now)).toMatch(/^tomorrow at /);
+ });
+
+ it("past a limit on free runs, the next step: run it self-hosted, or a free account for a guest", () => {
+ expect(limitNext("free-today", false)).toEqual({ label: "Want to keep going now? Run it self-hosted →", to: "self-hosted" });
+ expect(limitNext("free-hour", true)).toEqual({ label: "Create a free account for more free runs", to: "sign-up" });
+ expect(limitNext("reports", false)).toBeUndefined();
+ });
+
+ it("every sentence is friendly and plain", () => {
+ for (const kind of LIMIT_KINDS) {
+ for (const w of [limitWords(kind, 3600), limitWordsAt(kind, now + 3600_000, now)]) expect(w, w).not.toMatch(NEGATIVE);
+ }
+ });
+});
+
+describe("waits and failures", () => {
+ const now = new Date(2026, 10, 8, 12, 0).getTime();
+
+ it("the held lines use the same words as the limits", () => {
+ const at = now + 3 * 3600_000;
+ expect(noteWords({ place: 1, etaSeconds: null, held: "today", startAt: at }, now)).toBe(limitWordsAt("free-today", at, now));
+ expect(noteWords({ place: 1, etaSeconds: null, held: "hour", startAt: at }, now)).toBe(limitWordsAt("free-hour", at, now));
+ expect(lineWords({ place: 1, etaSeconds: null, held: "today", startAt: at }, now)).toBe(`Free runs refresh at ${clockWords(at, now)} · this one starts then`);
+ });
+
+ it("nothing a visitor reads names the machinery or ends in a dead end", () => {
+ const lines = [
+ ...[1, 2, 3, 6, 40].flatMap((place) => [lineWords({ place, etaSeconds: 200 }, now), lineWords({ place, etaSeconds: null, unknown: true }, now)]),
+ noteWords({ place: 1, etaSeconds: null, unknown: true }, now)!,
+ ...Object.values(POOL_WORDS),
+ ...Object.values(FILE_TROUBLE_WORDS),
+ ...Object.values(ENGINE_WORDS),
+ ];
+ for (const w of lines) expect(w, w).not.toMatch(NEGATIVE);
+ // A failure always says what to do next.
+ for (const w of [POOL_WORDS.failed, ...Object.values(FILE_TROUBLE_WORDS), ...Object.values(ENGINE_WORDS)]) expect(w, w).toMatch(/\btry\b/i);
+ });
+
+ it("lots of people only when lots really are waiting", () => {
+ expect(lineWords({ place: 2, etaSeconds: 60 }, now)).toBe("1 ahead of you · about 1 min");
+ expect(lineWords({ place: 7, etaSeconds: 600 }, now)).toBe("6 ahead of you · about 10 min · lots of people are creating right now");
+ });
+});
+
+describe("a long wait in line", () => {
+ it("keeps the run: saved, it starts by itself, with its place under it", async () => {
+ const { pendingWords, LONG_WAIT_MS, LONG_WAIT_WORDS } = await import("@/lib/pending-words");
+ const now = Date.now();
+ const g = { status: "queued" as const, message: null, place: "pool" as const, queue: { place: 3, etaSeconds: 120 } };
+ expect(pendingWords({ ...g, createdAt: now - 60_000 }, null, now)).toEqual({ label: "2 ahead of you · about 2 min", place: null });
+ expect(pendingWords({ ...g, createdAt: now - LONG_WAIT_MS }, null, now)).toEqual({ label: LONG_WAIT_WORDS, place: "2 ahead of you · about 2 min" });
+ expect(LONG_WAIT_WORDS).not.toMatch(/\bbusy\b|queue|worker|GPU|try again later|!/i);
+ });
+});
diff --git a/tests/own-gpu-graceful.test.ts b/tests/own-gpu-graceful.test.ts
index 118a9b9e..7f81e4ab 100644
--- a/tests/own-gpu-graceful.test.ts
+++ b/tests/own-gpu-graceful.test.ts
@@ -814,7 +814,7 @@ describe("runs that wait, and a file too big for the address", () => {
globalThis.__fuobeSmallerCopies = { total: 1, accounts: new Set([a]) };
expect(await ask()).toEqual({ status: 429, error: "Your last smaller copy is still being made. Try again once it's done." });
globalThis.__fuobeSmallerCopies = { total: 2, accounts: new Set(["someone-else", "another"]) };
- expect(await ask()).toEqual({ status: 429, error: "Smaller copies are busy right now. Try again in a minute." });
+ expect(await ask()).toEqual({ status: 429, error: "Lots of smaller copies are being made right now — try again in a minute." });
globalThis.__fuobeSmallerCopies = undefined;
// Files that are full say so before any copy is made.
const { ACCOUNT_LIMITS } = await import("@/server/account-files");
diff --git a/tests/pending-run-tiles.test.ts b/tests/pending-run-tiles.test.ts
index fd172bce..d4e740f1 100644
--- a/tests/pending-run-tiles.test.ts
+++ b/tests/pending-run-tiles.test.ts
@@ -68,9 +68,9 @@ describe("a run on its way in the studio feed", () => {
it("the owner's job waiting with words that don't say its place: its place in the workers' line under them", () => {
const html = feedTile(gen({ status: "queued", message: "Waiting for a GPU to come on", queue: { place: 3, etaSeconds: 130 } }));
expect(text(html)).toContain("Waiting for a GPU to come on");
- expect(text(html)).toContain("In line · 3rd · ready in about 2 min");
+ expect(text(html)).toContain("2 ahead of you · about 2 min");
const next = feedTile(gen({ status: "queued", message: "Submitting", queue: { place: 1, etaSeconds: null, unknown: true } }));
- expect(text(next)).toContain("Next in line · starts when a GPU is free");
+ expect(text(next)).toContain("Warming up · starts automatically");
});
it("the owner's job running on a worker: a ring, its step words and its progress", () => {
@@ -97,7 +97,7 @@ describe("a run on its way in the studio feed", () => {
it("runs on this studio's GPUs keep their words, now with the ring too", () => {
const html = render(createElement(PendingTile, { g: gen({ place: "pool", status: "queued", message: POOL_WORDS.inLine, queue: { place: 3, etaSeconds: 130 } }), ratio: 1 }));
expect(html).toContain("data-run-spinner");
- expect(text(html)).toContain("In line · 3rd · ready in about 2 min");
+ expect(text(html)).toContain("2 ahead of you · about 2 min");
expect(pendingWords({ place: "pool", status: "running", message: "", queue: undefined })).toEqual({ label: POOL_WORDS.working, place: null });
});
@@ -111,7 +111,7 @@ describe("a run on its way on a Library card", () => {
const waiting = render(createElement(StatusCover, { g: gen({ status: "queued", message: "Waiting for a GPU to come on", queue: { place: 1, etaSeconds: null, unknown: true } }) }));
expect(waiting).toContain("data-run-spinner");
expect(text(waiting)).toContain("Waiting for a GPU to come on");
- expect(text(waiting)).toContain("Next in line · starts when a GPU is free");
+ expect(text(waiting)).toContain("Warming up · starts automatically");
const running = render(createElement(StatusCover, { g: gen({ status: "running", message: "Making your picture · step 3 of 8", progress: 0.375 }) }));
expect(text(running)).toContain("Making your picture · step 3 of 8");
expect(text(render(createElement(StatusCover, { g: gen({ status: "queued", message: "" }) })))).toContain("Queued");
diff --git a/tests/pool-holds.test.ts b/tests/pool-holds.test.ts
index 6edc92e7..2a4e67df 100644
--- a/tests/pool-holds.test.ts
+++ b/tests/pool-holds.test.ts
@@ -170,10 +170,10 @@ describe("the third press (behind the account's own runs)", () => {
expect(three.body.held).toEqual({ reason: "mine" });
expect(three.body.items![0].queue).toMatchObject({ held: "mine" });
expect(taskOf(idOf(three))).toBeUndefined();
- expect(tile(idOf(three))).toMatch(/^In line · after your other runs/);
+ expect(tile(idOf(three))).toMatch(/^After your other runs/);
// A reload changes nothing: the same tile, and still no task.
await tick();
- expect(tile(idOf(three))).toMatch(/^In line · after your other runs/);
+ expect(tile(idOf(three))).toMatch(/^After your other runs/);
expect(taskOf(idOf(three))).toBeUndefined();
// Another account's press meanwhile goes into line now.
const other = await press(b.cookie);
@@ -258,7 +258,7 @@ describe("the third press (behind the account's own runs)", () => {
expect(third.body.held).toEqual({ reason: "hour" });
const h = heldOf(idOf(third))!;
expect(h.start_at! - Date.now()).toBeGreaterThan(59 * 60_000);
- expect(tile(idOf(third))).toMatch(/^In line · starts in about \d+ (min|h)$/);
+ expect(tile(idOf(third))).toMatch(/^Free runs refresh (at .+|in a moment) · this one starts then$/);
// Not before its time; then it enters.
expect(await release.releaseHeldRuns()).toBe(0);
expect(await release.releaseHeldRuns(h.start_at! + 1)).toBe(1);
@@ -302,7 +302,7 @@ describe("the daily cap (H2)", () => {
const p = await check(a.cookie);
expect(p.body.quote).toMatchObject({ allowed: true });
expect(p.body.line).toMatchObject({ held: "today", startAt: at, long: true });
- expect(noteWords(p.body.line as never)).toMatch(/^Lots of runs today · starts in about \d+ (h|min)$/);
+ expect(noteWords(p.body.line as never)).toMatch(/^Lots of people are creating on Fuobe today, so free runs are shared out — yours refresh at .+\.$/);
const first = await press(b.cookie);
await new Promise((r) => setTimeout(r, 5));
const second = await press(a.cookie);
@@ -310,7 +310,7 @@ describe("the daily cap (H2)", () => {
expect(r.status, JSON.stringify(r.body)).toBe(201);
expect(r.body.held).toEqual({ reason: "today" });
}
- expect(tile(idOf(second))).toMatch(/^In line · starts in about \d+ (h|min)$/);
+ expect(tile(idOf(second))).toMatch(/^Free runs refresh (at .+|in a moment) · this one starts then$/);
// Its hold is made at the press (the service keeps it until then).
expect(heldOf(idOf(second))!.reserved).toBe(1);
expect(await release.releaseHeldRuns()).toBe(0);
@@ -337,7 +337,7 @@ describe("the daily cap (H2)", () => {
expect(r.status, JSON.stringify(r.body)).toBe(201);
expect(r.body.held).toEqual({ reason: "credits" });
const id = idOf(r);
- expect(tile(id)).toMatch(/^In line · starts in about \d+ (h|min)$/);
+ expect(tile(id)).toMatch(/^Starts (at .+|in a moment), when your free generations renew$/);
const h = heldOf(id)!;
expect(h).toMatchObject({ reserved: 0, rank_rule: "release", start_at: at });
expect(await release.releaseHeldRuns()).toBe(0);
@@ -373,7 +373,7 @@ describe("service blips (H3)", () => {
expect(r.body.held).toEqual({ reason: "service" });
const id = idOf(r);
// "In line" with its place as if in line, never a bare "In line".
- expect(tile(id)).toMatch(/^(Next in line|In line · \d+(st|nd|rd|th))/);
+ expect(tile(id)).toMatch(/^(You're next|\d+ ahead of you)/);
// Before Run, while the service is quiet: the last price it gave, and Run stays on.
const quiet = await check(a.cookie);
expect(quiet.body.quote).toMatchObject({ allowed: true, text: "7 units" });
@@ -479,13 +479,13 @@ describe("service blips (H3)", () => {
}
});
- it("H3p: while the service says runs here are paused, a press is taken and waits ('starts when a GPU is free')", async () => {
+ it("H3p: while the service says runs here are paused, a press is taken and waits ('starts automatically')", async () => {
fake.refuse = { code: "paused", text: "Runs on our GPUs are paused for now. Your own GPU or key still works." };
const a = account();
const r = await press(a.cookie);
expect(r.status, JSON.stringify(r.body)).toBe(201);
expect(r.body.held).toEqual({ reason: "service" });
- expect(tile(idOf(r))).toBe("In line · starts when a GPU is free");
+ expect(tile(idOf(r))).toBe("Warming up · starts automatically");
fake.refuse = null;
expect(await until(() => taskOf(idOf(r)))).toBeTruthy();
});
@@ -502,7 +502,7 @@ describe("service blips (H3)", () => {
fake.down = false;
fake.refuse = { code: "closed", text: "Your account can't run on our GPUs right now. Your own GPU or key still works." };
await until(() => getGeneration(idOf(r))!.status === "failed");
- expect(getGeneration(idOf(r))!.error).toBe("Sorry, this one couldn't be made.");
+ expect(getGeneration(idOf(r))!.error).toBe("That one didn't come out right — try again, or try a similar model.");
expect(heldOf(idOf(r))).toBeUndefined();
} finally {
Object.assign(billing.RESERVE_INLINE, was);
diff --git a/tests/pool-limits.test.ts b/tests/pool-limits.test.ts
index f659091f..6a1028a9 100644
--- a/tests/pool-limits.test.ts
+++ b/tests/pool-limits.test.ts
@@ -324,7 +324,8 @@ describe("runs at once on this install's GPUs", () => {
const third = await post(IMAGE, a.cookie);
expect(third.status).toBe(429);
expect(third.body.code).toBe("limit");
- expect(third.body.error).toBe(limits.POOL_LIMIT_WORDS.hourly);
+ expect(third.body.error).toMatch(/^Lots of people are creating on Fuobe right now, so free runs are shared out — yours refresh in about \d+ min\.$/);
+ expect(third.body).toMatchObject({ limit: "free-hour", refreshAt: expect.any(Number) });
} finally {
Object.assign(billing.OPEN_POLICY.limits, was);
}
@@ -429,7 +430,7 @@ describe("runs waiting, runs an hour, runs from one address", () => {
expect((await post({ ...IMAGE, ...SHOWN }, b.cookie, from)).status).toBe(201);
const third = await post({ ...IMAGE, ...SHOWN }, b.cookie, from);
expect(third.status).toBe(429);
- expect(third.body.error).toBe(limits.POOL_LIMIT_WORDS.address);
+ expect(third.body.error).toMatch(/^Lots of people on your network are creating right now, so free runs are shared out — yours refresh in about \d+ min\.$/);
expect((await post({ ...IMAGE, ...SHOWN }, b.cookie, { "x-forwarded-for": "198.51.100.4" })).status).toBe(201);
const kept = db().prepare("SELECT addr FROM pool_admissions WHERE addr IS NOT NULL").all() as { addr: string }[];
expect(kept.length).toBeGreaterThan(0);
diff --git a/tests/pool-line-order.test.ts b/tests/pool-line-order.test.ts
index 885740a4..35a1ad6e 100644
--- a/tests/pool-line-order.test.ts
+++ b/tests/pool-line-order.test.ts
@@ -50,6 +50,7 @@ const { loadManifest, comfyProvider, onComputer, NO_WORKER_FOR_LANE } = await im
const { loadIndex } = await import("@/server/gpu/index-file");
const { allLanes } = await import("@/lib/lanes");
const { POOL_WORDS } = await import("@/lib/relay");
+const { ENGINE_WORDS } = await import("@/lib/engine-error");
const hosted = await import("@/server/hosted");
const { withRunStamp } = await import("@/server/run-stamp");
const { getModel } = await import("@/lib/catalog");
@@ -551,7 +552,7 @@ describe("the run ceiling", () => {
beatAs(w);
await tick();
expect(getGeneration(id)?.status).toBe("failed");
- expect(getGeneration(id)?.error).toBe(POOL_WORDS.failed);
+ expect(getGeneration(id)?.error).toBe(ENGINE_WORDS.timeout);
});
it("a job a worker gives back and takes again between two polls gets its whole time again", async () => {
@@ -580,7 +581,7 @@ describe("the run ceiling", () => {
expect(g.progress).toBeNull();
});
- it("a worker with another model loaded: Working · getting ready until the first step reports; with its model loaded, Working at once", async () => {
+ it("a worker with another model loaded: Warming up · starting in a moment until the first step reports; with its model loaded, Working at once", async () => {
const w = standInWorker();
const { id, t } = await accountRun("getting ready");
const lane = rowOf(t.id).lane!;
diff --git a/tests/run-place.test.ts b/tests/run-place.test.ts
index 29891e70..153c7697 100644
--- a/tests/run-place.test.ts
+++ b/tests/run-place.test.ts
@@ -395,7 +395,7 @@ describe("a tool page's own price check, for a run on this studio's GPUs", () =>
const p = toolPoolPrice({ costUsd: 0, demo: false, notes: [], place: "pool", quote: { allowed: true, amount: 0, priceVersion: "v1", text: "Free" }, line });
expect(p?.text).toBe("Free · ready in about 3 min");
// Every GPU away: Run stays on, and the chip says it starts when one is free.
- expect(toolPoolPrice({ place: "pool", quote: { allowed: true, amount: 0, priceVersion: "v1", text: "Free" }, line: { place: 2, etaSeconds: null, unknown: true } })).toMatchObject({ text: "Free · starts when a GPU is free", refused: false });
+ expect(toolPoolPrice({ place: "pool", quote: { allowed: true, amount: 0, priceVersion: "v1", text: "Free" }, line: { place: 2, etaSeconds: null, unknown: true } })).toMatchObject({ text: "Free · starts automatically", refused: false });
// Light work: ready in seconds.
expect(toolPoolPrice({ place: "pool", quote: { allowed: true, amount: 0, priceVersion: "", text: "Free" }, line: { place: 1, etaSeconds: null, light: true } })?.text).toBe("Free · ready in seconds");
expect(p?.text).not.toMatch(/GPU/);
diff --git a/tests/text-helper.test.ts b/tests/text-helper.test.ts
index 08139ed3..b055622a 100644
--- a/tests/text-helper.test.ts
+++ b/tests/text-helper.test.ts
@@ -364,7 +364,7 @@ describe("the AI helper's order and the lyrics route", () => {
process.env.FUOBE_HOSTED_RUNS = "1";
const busy = await enhanceRoute.POST(post("/api/enhance", { prompt: "a song", target: "lyrics" }, "account"));
expect(busy.status).toBe(503);
- expect(await busy.json()).toEqual({ error: "Writing lyrics is busy right now. Try again in a moment, or type your own.", code: "helper-busy" });
+ expect(await busy.json()).toEqual({ error: "Lots of people are writing lyrics right now — try again in a moment, or type your own.", code: "helper-busy" });
// A rewrite always comes back: the offline one when the helper is busy.
const rewrite = await enhanceRoute.POST(post("/api/enhance", { prompt: "a cat" }, "account"));
expect(((await rewrite.json()) as { prompt: string }).prompt).toMatch(/^a cat\. /);
diff --git a/tests/workers-pool.test.ts b/tests/workers-pool.test.ts
index b7343f4c..68ab033d 100644
--- a/tests/workers-pool.test.ts
+++ b/tests/workers-pool.test.ts
@@ -354,7 +354,7 @@ describe("losing a worker (checks 3, 4, 5)", () => {
clock += 2 * MIN;
pool.sweepPool(clock);
expect(state(id).state).toBe("failed");
- expect(state(id).error).toBe("The GPUs were busy. Not charged.");
+ expect(state(id).error).toBe("This one didn't start in time — try again, or try a similar model.");
});
it("a person's task with no wait limit (the policy's 0) never fails for a wait: 40 minutes with every worker paused, it is still in line", () => {