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.

Hosted runs: RTX Video models are refused in plain words on a studio GPU that can't run them

Claudedba5be1aa3bb
diff --git a/scripts/comfy/install-comfyui.sh b/scripts/comfy/install-comfyui.sh
index ce2b3386..e61e0959 100755
--- a/scripts/comfy/install-comfyui.sh
+++ b/scripts/comfy/install-comfyui.sh
@@ -130,10 +130,11 @@ fi
# docs/research/new-models-10.md §6): Comfy-Org's ComfyUI Nvidia VFX Nodes 0.2.1 (Apache-2.0) and NVIDIA's nvidia-vfx
# runtime (its requirements.txt; NVIDIA Software License Agreement, a wheel from pypi.nvidia.com with the SDK's models).
# They run only on an NVIDIA RTX card (frame generation: RTX 40 or later) with a CUDA PyTorch (cu130 or newer, the
-# pack's README) and a recent driver, so they go in only where nvidia-smi names an RTX card (or RTX_VIDEO=1);
-# RTX_VIDEO=0 leaves them out. This script installs CPU PyTorch: on a GPU server install a CUDA build too.
+# pack's README) and a recent driver, so they go in only where nvidia-smi names an RTX card on an x86_64 machine (or
+# RTX_VIDEO=1); RTX_VIDEO=0 leaves them out. nvidia-vfx 0.2.0.0 has no Linux arm64 wheel, so a DGX Spark (GB10) is skipped. This script installs CPU PyTorch: on a GPU server install a CUDA build too.
RTX_VIDEO_REF="${RTX_VIDEO_REF:-38d790ded00650681fa3645362efe28c8560cf40}" # 0.2.1 (registry comfyui_nvidia_rtx_nodes), 2026-10-14
-rtx_card="$(command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi --query-gpu=name --format=csv,noheader 2>/dev/null | grep -i -m1 -E 'RTX|GB10' || true)"
+rtx_card="$(command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi --query-gpu=name --format=csv,noheader 2>/dev/null | grep -i -m1 -E 'RTX' || true)"
+[ "$(uname -m)" = "x86_64" ] || rtx_card=""
if [ "${RTX_VIDEO:-auto}" = "1" ] || { [ "${RTX_VIDEO:-auto}" = "auto" ] && [ -n "$rtx_card" ]; }; then
dest="$COMFYUI_DIR/custom_nodes/ComfyUI_Nvidia_VFX_Nodes"
if [ -d "$dest/.git" ] || git clone -q https://github.com/Comfy-Org/ComfyUI_Nvidia_VFX_Nodes "$dest"; then
diff --git a/src/components/gpu/guided-fix.tsx b/src/components/gpu/guided-fix.tsx
index 0769192b..d1238774 100644
--- a/src/components/gpu/guided-fix.tsx
+++ b/src/components/gpu/guided-fix.tsx
@@ -272,7 +272,7 @@ function Body({ detail, actions, titleRef }: { detail: GpuSetupDetail; actions:
<div className="space-y-3 text-[13px] text-muted-foreground">
<p>
{plan.gpuNeed
- ? `It runs on NVIDIA's RTX video engine, which only ${plan.gpuNeed === "nvidia-rtx-40" ? "RTX 40 series cards and newer" : "NVIDIA RTX cards"} have${plan.gpu ? `, and your ${plan.gpu} isn't one` : ""}. The other choices in this tool work on your GPU.`
+ ? `It runs on NVIDIA's RTX video engine, which only ${plan.gpuNeed === "nvidia-rtx-40" ? "RTX 40 series cards and newer" : "NVIDIA RTX cards"} have${plan.gpu ? `, and your ${plan.gpu} isn't one` : ""}. Pick another choice in this tool for this clip.`
: "This one needs its own ComfyUI, so it can't run next to your other add-ons."}
</p>
<Button variant="secondary" className="h-11 sm:h-9" onClick={actions.close}>
diff --git a/src/components/studio/radio-keys.ts b/src/components/studio/radio-keys.ts
index 8ad73bb6..b29b42f9 100644
--- a/src/components/studio/radio-keys.ts
+++ b/src/components/studio/radio-keys.ts
@@ -7,7 +7,7 @@
export function radioKeys(e: React.KeyboardEvent<HTMLElement>) {
const step = ({ ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 } as Record<string, number>)[e.key];
if (step === undefined && e.key !== "Home" && e.key !== "End") return;
- const radios = [...e.currentTarget.querySelectorAll<HTMLElement>('[role="radio"]:not([disabled])')];
+ const radios = [...e.currentTarget.querySelectorAll<HTMLElement>('[role="radio"]:not([disabled]):not([aria-disabled="true"])')];
if (!radios.length) return;
e.preventDefault();
const at = radios.indexOf(document.activeElement as HTMLElement);
diff --git a/src/lib/catalog/rtx-video.ts b/src/lib/catalog/rtx-video.ts
index a0cbb52d..514c1774 100644
--- a/src/lib/catalog/rtx-video.ts
+++ b/src/lib/catalog/rtx-video.ts
@@ -14,6 +14,9 @@ export { RTX_UPSCALE_WORKFLOW } from "@/lib/av/video-finish";
export const RTX_FRAMEGEN_WORKFLOW = "fps-rtx-framegen";
export const RTX_HDR_WORKFLOW = "sdr-to-hdr-rtx";
+/** The pack's node classes (ComfyUI_Nvidia_VFX_Nodes), as the GPU check lists them. */
+export const RTX_CLASSES = ["RTXVideoSuperResolution", "RTXVideoFrameGeneration", "RTXTrueHDR"] as const;
+
/** The card each model needs. */
export const RTX_CARD: Record<string, GpuNeed> = {
[RTX_UPSCALE_MODEL]: "nvidia-rtx",
diff --git a/src/lib/gpu/readiness.ts b/src/lib/gpu/readiness.ts
index cdebf1ea..2b3e3bf0 100644
--- a/src/lib/gpu/readiness.ts
+++ b/src/lib/gpu/readiness.ts
@@ -21,6 +21,16 @@ export function deviceLabel(name: string | undefined): string {
.trim();
}
+/**
+ * A graphics card's name for words that say "your …" (a fix plan's gpu): only a CUDA or Intel card, never ComfyUI's bare
+ * "cpu" or "mps" device names.
+ */
+export function cardLabel(d: { name: string; type: string } | undefined): string | undefined {
+ if (!d || (d.type !== "cuda" && d.type !== "xpu")) return undefined;
+ const n = deviceLabel(d.name);
+ return n && !/^(cpu|mps|cuda|xpu)(:\d+)?$/i.test(n) ? n : undefined;
+}
+
/** The short name people use: "NVIDIA GeForce RTX 4070" → "RTX 4070". */
export function shortGpu(name: string | undefined): string {
return deviceLabel(name).replace(/^(NVIDIA\s+)?(GeForce\s+)?/i, "").trim() || "GPU";
diff --git a/src/lib/gpu/rtx.ts b/src/lib/gpu/rtx.ts
index 2e8a4d97..36b2841b 100644
--- a/src/lib/gpu/rtx.ts
+++ b/src/lib/gpu/rtx.ts
@@ -25,8 +25,9 @@ export function readCard(name: string | undefined, type?: string): CardReading {
if (!n) return { rtx: type === undefined ? undefined : false };
// ROCm reports its cards as "cuda" devices; Intel and Apple have their own device types.
if (/\b(AMD|Radeon|Instinct|Intel|Arc|Apple|M\d( Pro| Max| Ultra)?)\b/i.test(n) || /^cpu$/i.test(n)) return { rtx: false };
- // NVIDIA's DGX Spark (GB10, Blackwell), which the pack's README lists as supported.
- if (/\bGB10\b/i.test(n)) return { rtx: true, series: 50 };
+ // NVIDIA's DGX Spark (GB10, Blackwell, Linux arm64): the pack's README lists it, but NVIDIA's nvidia-vfx runtime has no
+ // arm64 Linux wheel yet, so it reads as unknown: never blocked, never put first.
+ if (/\bGB10\b/i.test(n)) return { rtx: undefined };
if (/\bRTX\b/i.test(n)) return { rtx: true, ...seriesOf(n) };
// GeForce GTX / older Quadro and Tesla cards have no RTX Video support.
if (/\b(GTX|GT \d|Quadro (?!RTX)|Tesla [KMP]\d|TITAN (X|V|Xp))\b/i.test(n)) return { rtx: false };
diff --git a/src/server/gpu/gate.ts b/src/server/gpu/gate.ts
index b6ec06bb..331bb96e 100644
--- a/src/server/gpu/gate.ts
+++ b/src/server/gpu/gate.ts
@@ -3,7 +3,7 @@ import crypto from "node:crypto";
import { resolveWorkflowId } from "@/lib/comfy-variants";
import { fixPlan } from "@/lib/gpu/plan";
import { CLEAN_VAE, DECODER_PARAM, GPU_PARAM } from "@/lib/qwen21-speed";
-import { deviceLabel, needTargets, toolReadiness } from "@/lib/gpu/readiness";
+import { cardLabel, needTargets, toolReadiness } from "@/lib/gpu/readiness";
import { GPU_NEED_TEXT } from "@/lib/gpu/rtx";
import type { FixPlan, ToolReadiness, ToolRef } from "@/lib/gpu/types";
import type { GenerationRequest } from "@/lib/catalog/types";
@@ -87,7 +87,7 @@ export async function gateGeneration(t: GpuTarget, g: GateInput): Promise<GateRe
if (!blocks(r)) return { ok: true };
}
const dev = snap.inventory.devices[0];
- const plan = fixPlan(r, snap.inventory, idx, { hash: sha256, urlHash: urlHash(t), account: ctx.account, loras, gpu: dev ? deviceLabel(dev.name) : undefined });
+ const plan = fixPlan(r, snap.inventory, idx, { hash: sha256, urlHash: urlHash(t), account: ctx.account, loras, gpu: cardLabel(dev) });
const what =
r.state === "unsupported"
? r.gpuNeed
diff --git a/src/server/gpu/readiness-service.ts b/src/server/gpu/readiness-service.ts
index 0bf45835..56b42970 100644
--- a/src/server/gpu/readiness-service.ts
+++ b/src/server/gpu/readiness-service.ts
@@ -2,7 +2,7 @@ import "server-only";
import crypto from "node:crypto";
import { problemText } from "@/lib/gpu/gather";
import { fixPlan } from "@/lib/gpu/plan";
-import { badgeOf, deviceLabel, needTargets, rankOf, shortGpu, summaryOf, toolReadiness, type ReadinessContext } from "@/lib/gpu/readiness";
+import { badgeOf, cardLabel, needTargets, rankOf, shortGpu, summaryOf, toolReadiness, type ReadinessContext } from "@/lib/gpu/readiness";
import type { BadgeMap, FixPlan, GpuInventory, GpuProblem, ReadinessReport, RequirementIndex, StudioRow, ToolReadiness, ToolRef } from "@/lib/gpu/types";
import { vramGb } from "@/lib/gpu/requirements";
import { getSetting } from "../settings";
@@ -131,7 +131,7 @@ export async function planFor(t: ReadTarget, ref: string, actor: string): Promis
r = readinessOf(tool, snap.inventory, idx, ctx);
}
const fits = fitsFor(tool, t, snap.inventory, idx, ctx);
- const gpu = snap.inventory.devices[0] ? deviceLabel(snap.inventory.devices[0].name) : undefined;
+ const gpu = cardLabel(snap.inventory.devices[0]);
return fixPlan(r, snap.inventory, idx, { hash: sha256, urlHash: urlHash(t), account: ctx.account, loras: tool.loras, fits, gpu: gpu && vramGb(snap.inventory.devices[0].vramTotal) ? gpu : undefined });
}
diff --git a/src/server/hosted-run.ts b/src/server/hosted-run.ts
index 4b52b95b..e5f5199d 100644
--- a/src/server/hosted-run.ts
+++ b/src/server/hosted-run.ts
@@ -3,6 +3,8 @@ import crypto from "node:crypto";
import { nanoid } from "nanoid";
import type { GenerationRequest } from "@/lib/catalog/types";
import { OWN_GPU_TOOL_MESSAGE } from "@/lib/guest-access";
+import { RTX_CLASSES, rtxCardOf } from "@/lib/catalog/rtx-video";
+import { gpuFits } from "@/lib/gpu/readiness";
import { gpuState } from "./account-gpu";
import { accountGpu, type Account } from "./auth";
import {
@@ -25,6 +27,7 @@ import { hostedRunsOn } from "./hosted-switch";
import { checkRun, moderationConfigured } from "./moderation";
import type { RunStamp } from "./run-stamp";
import { readRef } from "./storage";
+import { readSnapshot } from "./gpu/snapshots";
import { ACCOUNT_LIMITS } from "./account-files";
import { runAsTenant } from "./tenant";
@@ -77,6 +80,19 @@ async function ownGpuOnline(accountId: string): Promise<boolean> {
}
}
+/**
+ * A model that needs an NVIDIA RTX card (src/lib/catalog/rtx-video.ts) on this install's GPUs: refused when the install's
+ * last GPU check says its card can't run it (a CPU, an Apple, AMD or Intel device, an older NVIDIA card) or its ComfyUI
+ * lacks the RTX Video nodes. A card the name doesn't tell, or no check yet, never refuses (the run says what it finds).
+ */
+export function poolCardRefuses(modelId: string): boolean {
+ const need = rtxCardOf(modelId);
+ if (!need) return false;
+ const inv = readSnapshot({ kind: "install", key: "install", via: "server" })?.inventory;
+ if (!inv?.reachable) return false;
+ return gpuFits(need, inv) === false || RTX_CLASSES.some((c) => inv.nodes.missing.includes(c));
+}
+
/**
* Where an account's run goes (hosted.ts has the order). Only with hosted runs on; otherwise always "own" (today).
*/
@@ -99,6 +115,7 @@ export async function decidePlace(account: Account, req: GenerationRequest, wish
const notHere = (error: string): PlaceDecision => (hasGpu && wish !== "pool" ? { kind: "own" } : { kind: "refuse", refusal: { status: 403, body: { error, code: "not-offered" }, headers: { [BILLING_HEADER]: "not-offered" } } });
if (outputKind(planned.op, planned.model) === "model3d") return hasGpu && wish !== "pool" ? { kind: "own" } : { kind: "refuse", refusal: { status: 403, body: { error: OWN_GPU_TOOL_MESSAGE, code: "own-gpu-tool" }, headers: {} } };
if (!poolAllows(p, planned.model.id, req.presetId)) return notHere(HOSTED_WORDS.notOffered);
+ if (poolCardRefuses(planned.model.id)) return notHere(HOSTED_WORDS.rtxCard);
if (req.loras?.length) return notHere(HOSTED_WORDS.loras);
const inputs = inputCounts(req);
if ((inputs.image && !p.uploads.image) || (inputs.video && !p.uploads.video) || (inputs.audio && !p.uploads.audio)) return notHere(HOSTED_WORDS.inputs);
@@ -200,6 +217,7 @@ export async function poolQuote(account: Account | null, asked: GenerationReques
if (planned.route.provider !== "comfyui") return null;
if (account && wish !== "pool" && accountGpu(account.id) && (await ownGpuOnline(account.id))) return null;
if (p && (!p.hosted || !poolAllows(p, planned.model.id, req.presetId))) return null;
+ if (poolCardRefuses(planned.model.id)) return null;
const kind = outputKind(planned.op, planned.model);
const q = await billingQuote(account ? accountFacts(account) : null, runFacts(req, planned, kind), queueFacts(account?.id ?? null));
return { planned, quote: q };
diff --git a/src/server/hosted.ts b/src/server/hosted.ts
index 043fe2fd..bc651119 100644
--- a/src/server/hosted.ts
+++ b/src/server/hosted.ts
@@ -47,6 +47,7 @@ export const HOSTED_WORDS = {
notOffered: "This one runs on your own GPU. Connect one in Settings, or pick another model.",
loras: "Extra LoRAs run on your own GPU. Connect one in Settings, or run without them.",
inputs: "This kind of file runs on your own GPU. Connect one in Settings, or use a picture.",
+ rtxCard: "This one needs an NVIDIA RTX card, and this studio's GPUs can't run it right now. Connect your own GPU in Settings, or pick another choice.",
notHosted: "Runs on this studio's GPUs aren't open to this account. Connect your own GPU in Settings.",
waitedTooLong: "This studio's GPUs were busy, so it didn't run. Not charged.",
};
diff --git a/src/server/providers/comfyui.ts b/src/server/providers/comfyui.ts
index 9d8d8a5c..37880def 100644
--- a/src/server/providers/comfyui.ts
+++ b/src/server/providers/comfyui.ts
@@ -1866,13 +1866,15 @@ export function promptRefusal(body: PromptRefusalBody, status: number, manifest:
// A node class the server doesn't have: name the pack to install (opt-in packs like ComfyUI-Whisper).
const packs = missingClass?.pack ? [missingClass.pack] : manifest.customNodes.map((c) => c.name);
const where = worker === "isolated" ? "the isolated ComfyUI worker" : "your ComfyUI";
+ // An account's run (on its own GPU, or on this install's GPUs as a hosted run) gets the visitor's words, never the owner's.
+ const visitorRun = !!ownGpu() || !!tenantAccount();
const missingPack =
body.error?.type === "missing_node_type" && manifest.id === REGEN_WORKFLOW && worker === "main"
- ? ownGpu()
+ ? visitorRun
? REGEN_COPY.missingVisitor
: REGEN_COPY.missing
: body.error?.type === "missing_node_type" && RTX_WORKFLOWS.has(manifest.id) && worker === "main"
- ? ownGpu()
+ ? visitorRun
? RTX_MISSING.visitor
: RTX_MISSING.owner
: body.error?.type === "missing_node_type" && packs.length
diff --git a/tests/hosted-runs.test.ts b/tests/hosted-runs.test.ts
index 8080185c..56593f9c 100644
--- a/tests/hosted-runs.test.ts
+++ b/tests/hosted-runs.test.ts
@@ -32,6 +32,8 @@ const { resetRates } = await import("@/server/rate");
const billing = await import("@/server/billing");
const { visitorStatus } = await import("@/server/account-gpu");
const { poolAllows } = await import("@/server/hosted");
+const { writeSnapshot } = await import("@/server/gpu/snapshots");
+const { RTX_MISSING } = await import("@/lib/catalog/rtx-video");
let fake: FakeBilling;
let a = "";
@@ -137,6 +139,67 @@ describe("hosted runs on", () => {
expect(poolAllows({ pool: { apps: { allow: ["app-y"] } } }, "m", "app-x")).toBe(false);
});
+ it("an NVIDIA RTX model on an install whose card isn't RTX: refused in plain words before any quote or hold", async () => {
+ process.env.FUOBE_BILLING_URL = fake.url;
+ process.env.FUOBE_BILLING_TOKEN = "test-billing-token";
+ fake.policy = { ...fake.policy, uploads: { image: true, video: true, audio: false } };
+ const clip = await upload(TINY_MP4, "video/mp4", "rtx.mp4");
+ expect(clip.status).toBe(201);
+ const { url } = (await clip.json()) as { url: string };
+ const INSTALL = { kind: "install", key: "install", via: "server" } as const;
+ const check = (device: { name: string; type: string } | null, missing: string[] = []) => {
+ const at = Date.now();
+ writeSnapshot(INSTALL, {
+ v: 1, via: "server", checkedAt: at, tookMs: 5, reachable: true,
+ devices: device ? [{ ...device, index: 0, vramTotal: 24 * 2 ** 30, vramFree: 24 * 2 ** 30 }] : [],
+ manager: { api: "none" }, nodes: { have: [], missing, total: 1, readAt: at, how: "object_info" },
+ combos: {}, packs: {}, models: {}, loras: {}, fingerprint: "x", errors: [],
+ } as never);
+ };
+ const rtx = { feature: "upscale", modelId: "oss-rtx-video-upscale", op: "upscale-video", inputs: { video: url }, params: { resolution: "1080p" } };
+ const runs = async (body: unknown) => {
+ const before = fake.calls.length;
+ const r = await post(body);
+ const reached = fake.calls.slice(before).map((c) => c.path.split("?")[0]);
+ return { r, body: (await r.json()) as { error: string; code?: string }, reached };
+ };
+ try {
+ for (const [device, missing] of [
+ [{ name: "cpu", type: "cpu" }, []],
+ [{ name: "cuda:0 AMD Radeon RX 7900 XTX : native", type: "cuda" }, []],
+ [{ name: "cuda:0 NVIDIA GeForce GTX 1080 Ti : cudaMallocAsync", type: "cuda" }, []],
+ [{ name: "cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync", type: "cuda" }, ["RTXVideoSuperResolution"]],
+ ] as const) {
+ check(device, [...missing]);
+ const { r, body, reached } = await runs(rtx);
+ expect(r.status).toBe(403);
+ expect(body.code).toBe("not-offered");
+ expect(body.error).toContain("NVIDIA RTX card");
+ // Visitor words: no script, switch or file names.
+ expect(body.error).not.toMatch(/install-comfyui|RTX_VIDEO|scripts\/|\.sh\b/);
+ expect(reached).not.toContain("/v1/quote");
+ expect(reached).not.toContain("/v1/reserve");
+ // The price check doesn't offer it here either: it is priced for the account's own GPU (no quote).
+ const preview = await generationsRoute.POST(new Request("http://localhost:3000/api/generations?preview=1", { method: "POST", headers: headers({ "content-type": "application/json" }), body: JSON.stringify(rtx) }));
+ expect(((await preview.json()) as { place?: string }).place).toBeUndefined();
+ }
+ // Frame generation needs an RTX 40 series card or newer: an RTX 3090 is refused, an RTX 4070 isn't.
+ check({ name: "cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync", type: "cuda" });
+ const fg = { feature: "fps-boost", modelId: "oss-rtx-frame-generation", op: "interpolate", inputs: { video: url }, params: { targetFps: 60 } };
+ expect((await runs(fg)).body.code).toBe("not-offered");
+ check({ name: "cuda:0 NVIDIA GeForce RTX 4070 : cudaMallocAsync", type: "cuda" });
+ expect((await runs(fg)).body.code).not.toBe("not-offered");
+ // A card the name doesn't tell (a data-centre card) is never refused for its name.
+ check({ name: "cuda:0 NVIDIA H100 80GB HBM3 : cudaMallocAsync", type: "cuda" });
+ expect((await runs(rtx)).body.code).not.toBe("not-offered");
+ } finally {
+ check({ name: "cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync", type: "cuda" });
+ }
+ // The owner's line names the setup script; an account never gets it.
+ expect(RTX_MISSING.owner).toContain("install-comfyui.sh");
+ expect(RTX_MISSING.visitor).not.toMatch(/install-comfyui|RTX_VIDEO|scripts\//);
+ });
+
it("an install whose ComfyUI is on the owner's computer doesn't offer hosted runs", async () => {
process.env.COMFYUI_WHERE = "computer";
try {
diff --git a/tests/rtx-video.test.ts b/tests/rtx-video.test.ts
index c5adaa28..0b84a4f2 100644
--- a/tests/rtx-video.test.ts
+++ b/tests/rtx-video.test.ts
@@ -16,7 +16,7 @@ delete process.env.FUOBE_PASSWORD;
const RTX = await import("@/lib/catalog/rtx-video");
const { readCard, cardFits, offerOn, GPU_NEED_TEXT } = await import("@/lib/gpu/rtx");
-const { badgeOf, stateLine, toolReadiness, workflowReadiness } = await import("@/lib/gpu/readiness");
+const { badgeOf, cardLabel, stateLine, toolReadiness, workflowReadiness } = await import("@/lib/gpu/readiness");
const { parseIndex } = await import("@/lib/gpu/requirements");
const { emptyInventory } = await import("@/lib/gpu/gather");
const { parseArgv } = await import("@/lib/gpu/argv");
@@ -32,6 +32,7 @@ const studios = await import("@/lib/studios");
const { NODE_PACKS, licenceInfo, workflowLicence } = await import("@/lib/licences");
const { prepareWorkflow, getWorkflow, promptRefusal } = await import("@/server/providers/comfyui");
const { STUDIO_ROWS, studioTool } = await import("@/server/gpu/tools");
+const { runAsTenant } = await import("@/server/tenant");
const ROOT = path.resolve(__dirname, "..");
const read = (f: string) => JSON.parse(fs.readFileSync(path.join(ROOT, f), "utf8"));
@@ -119,7 +120,8 @@ describe("the graphs against the pack's node definitions", () => {
it("the installer adds the pack only on an NVIDIA RTX host, at the pinned commit with the runtime", () => {
const sh = fs.readFileSync(path.join(ROOT, "scripts/comfy/install-comfyui.sh"), "utf8");
expect(sh).toContain('RTX_VIDEO_REF="${RTX_VIDEO_REF:-38d790ded00650681fa3645362efe28c8560cf40}"');
- expect(sh).toMatch(/nvidia-smi --query-gpu=name --format=csv,noheader .*grep -i -m1 -E 'RTX\|GB10'/);
+ expect(sh).toMatch(/nvidia-smi --query-gpu=name --format=csv,noheader .*grep -i -m1 -E 'RTX'/);
+ expect(sh).toContain('[ "$(uname -m)" = "x86_64" ] || rtx_card=""');
expect(sh).toContain('"nvidia-vfx==0.2.0.0"');
expect(sh).toContain('"${RTX_VIDEO:-auto}" = "auto" ] && [ -n "$rtx_card" ]');
});
@@ -245,7 +247,7 @@ describe("the card check", () => {
expect(readCard("NVIDIA RTX 6000 Ada Generation")).toEqual({ rtx: true, series: 40 });
expect(readCard("NVIDIA RTX PRO 6000 Blackwell Workstation Edition")).toEqual({ rtx: true, series: 50 });
expect(readCard("Quadro RTX 8000")).toEqual({ rtx: true, series: 20 });
- expect(readCard("NVIDIA GB10")).toEqual({ rtx: true, series: 50 });
+ expect(readCard("NVIDIA GB10")).toEqual({ rtx: undefined });
expect(readCard("NVIDIA GeForce GTX 1080 Ti").rtx).toBe(false);
expect(readCard("cuda:0 AMD Radeon RX 7900 XTX : native").rtx).toBe(false);
expect(readCard("mps", "mps").rtx).toBe(false);
@@ -387,5 +389,21 @@ describe("where the choices show up", () => {
const body = { error: { type: "missing_node_type", message: "Node 'x' not found" } };
const { message } = promptRefusal(body, 400, getWorkflow(RTX.RTX_UPSCALE_WORKFLOW).manifest, []);
expect(message).toBe(RTX.RTX_MISSING.owner);
+ // An account's run on this install's GPUs (a hosted run) gets the visitor's words, never the setup script's name.
+ const pooled = runAsTenant({ kind: "account", id: "acct-rtx" }, () => promptRefusal(body, 400, getWorkflow(RTX.RTX_UPSCALE_WORKFLOW).manifest, []));
+ expect(pooled.message).toBe(RTX.RTX_MISSING.visitor);
+ expect(pooled.message).not.toMatch(/install-comfyui|RTX_VIDEO|scripts\//);
+ });
+
+ it("the guided fix names a graphics card only when it is one (never 'your cpu' or 'your mps')", () => {
+ expect(cardLabel({ name: "cpu", type: "cpu" })).toBeUndefined();
+ expect(cardLabel({ name: "mps", type: "mps" })).toBeUndefined();
+ expect(cardLabel({ name: "cuda:0", type: "cuda" })).toBeUndefined();
+ expect(cardLabel(undefined)).toBeUndefined();
+ expect(cardLabel({ name: "cuda:0 NVIDIA GeForce GTX 1080 Ti : cudaMallocAsync", type: "cuda" })).toBe("NVIDIA GeForce GTX 1080 Ti");
+ const fix = fs.readFileSync(path.join(ROOT, "src/components/gpu/guided-fix.tsx"), "utf8");
+ expect(fix).not.toContain("The other choices in this tool work on your GPU");
+ // The arrow keys skip a choice that is switched off (Quick · RTX on a card that can't run it).
+ expect(fs.readFileSync(path.join(ROOT, "src/components/studio/radio-keys.ts"), "utf8")).toContain(':not([aria-disabled="true"])');
});
});