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.

Docs: FUOBE_POOL_MEDIA_INPUTS in the self-hosting settings table

Adarsh4dd30afe1fb8
diff --git a/docs/SELF-HOSTING.md b/docs/SELF-HOSTING.md
index a5368f78..f85844f2 100644
--- a/docs/SELF-HOSTING.md
+++ b/docs/SELF-HOSTING.md
@@ -137,6 +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 |
| `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_POOL_WAIT_MIN` | How long a hosted run may wait in line before a GPU first takes it, in minutes (default `30`) |
+| `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_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 |
| `FUOBE_BILLING_URL`, `FUOBE_BILLING_TOKEN` | An optional external billing service for hosted runs ([billing-hook.md](billing-hook.md)). None: hosted runs are closed, or free with `FUOBE_HOSTED_FREE=1` |
| `FUOBE_MODERATION_URL`, `FUOBE_MODERATION_TOKEN`, `FUOBE_MODERATION_MAX_WAIT_H` | An optional external moderation service ([moderation-hook.md](moderation-hook.md)). None: nothing is checked |
diff --git a/tests/self-hosting-env.test.ts b/tests/self-hosting-env.test.ts
new file mode 100644
index 00000000..fb8bbd78
--- /dev/null
+++ b/tests/self-hosting-env.test.ts
@@ -0,0 +1,33 @@
+import fs from "node:fs";
+import path from "node:path";
+import { describe, expect, it } from "vitest";
+
+/**
+ * Every setting that hosted runs, the worker queue and the optional services read from the environment is in
+ * docs/SELF-HOSTING.md's table, so an install that opens hosted runs sees all of them (the kinds of input file the
+ * workers take among them).
+ */
+
+const root = path.resolve(__dirname, "..");
+
+function sources(dir: string): string[] {
+ return fs.readdirSync(dir, { withFileTypes: true }).flatMap((e) => {
+ const p = path.join(dir, e.name);
+ if (e.isDirectory()) return sources(p);
+ return /\.(ts|tsx)$/.test(e.name) ? [p] : [];
+ });
+}
+
+describe("the self-hosting settings table", () => {
+ it("lists every hosted-run, worker-token and service variable the app reads", () => {
+ const read = new Set<string>();
+ for (const file of sources(path.join(root, "src"))) {
+ for (const m of fs.readFileSync(file, "utf8").matchAll(/process\.env\.(FUOBE_(?:HOSTED|POOL|BILLING|MODERATION|WORKER_TOKEN)[A-Z_]*)/g)) read.add(m[1]);
+ }
+ expect(read).toContain("FUOBE_POOL_MEDIA_INPUTS");
+ const doc = fs.readFileSync(path.join(root, "docs", "SELF-HOSTING.md"), "utf8");
+ const rows = doc.split(/\r?\n/).filter((l) => l.startsWith("| `"));
+ const missing = [...read].filter((v) => !rows.some((r) => new RegExp("`" + v + "[`=]").test(r)));
+ expect(missing).toEqual([]);
+ });
+});