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.

Split soundtrack: the time estimate uses the speeds measured on a quiet CPU host (DBS-BSRNN 0.25x, DBS-TIGER 0.10x)

Claude34868ce381e3
diff --git a/src/lib/av/split.ts b/src/lib/av/split.ts
index 9eed410f..f96323bf 100644
--- a/src/lib/av/split.ts
+++ b/src/lib/av/split.ts
@@ -132,13 +132,14 @@ export function separationPasses(mode: DbsChannels, channels?: number | null): n
// Time on the open engine
/**
- * Times real time (seconds of audio per second of work, one pass), as measured. CPU: real runs on a 4-CPU host
- * (torch 2.14.1+cpu, ComfyUI-DBS f656e53, 10–20 s clips, other jobs sharing the CPU; docs/research/dbs-separation-7.md
- * §2.4): DBS-BSRNN 0.17–0.33x, typically 0.27x; DBS-TIGER 0.08–0.09x. GPU: the pack author's RTX 5090 (the same
- * section); a smaller GPU is slower, so the estimate is a range.
+ * Times real time (seconds of audio per second of work, one pass), as measured. CPU: the separation suite on a 4-CPU
+ * host (torch 2.14.1+cpu, ComfyUI-DBS f656e53, 24 runs of 12 s mixes with nothing else running, DBS D4;
+ * docs/research/dbs-separation-7.md §2.4): DBS-BSRNN 0.22–0.28x, typically 0.25x; DBS-TIGER 0.10–0.11x (D1 measured
+ * 0.27x and 0.09x on the same host while other jobs shared it). GPU: the pack author's RTX 5090 (the same section); a
+ * smaller GPU is slower, so the estimate is a range.
*/
export const DBS_SPEED: Record<"cpu" | "cuda", Record<SplitQuality, number>> = {
- cpu: { fast: 0.27, best: 0.09 },
+ cpu: { fast: 0.25, best: 0.1 },
cuda: { fast: 22.4, best: 15.9 },
};
/** Loading the model and the audio, saving four FLAC stems (seconds, measured on the CPU host). */
diff --git a/tests/split-soundtrack.test.ts b/tests/split-soundtrack.test.ts
index 9807013b..f2304fb4 100644
--- a/tests/split-soundtrack.test.ts
+++ b/tests/split-soundtrack.test.ts
@@ -254,26 +254,26 @@ describe("planSplit", () => {
});
describe("time on the open engine", () => {
- it("uses the measured CPU speeds (0.27x / 0.09x per pass) and the reference GPU's", () => {
- expect(DBS_SPEED.cpu).toEqual({ fast: 0.27, best: 0.09 });
- // 60 s on a CPU with DBS-BSRNN: about 222 s of work, 3 s to load and save.
- expect(splitTime({ seconds: 60, quality: "fast", mode: "mono", device: "cpu" })).toEqual({ low: 181, high: 359 });
+ it("uses the measured CPU speeds (0.25x / 0.10x per pass, DBS D4) and the reference GPU's", () => {
+ expect(DBS_SPEED.cpu).toEqual({ fast: 0.25, best: 0.1 });
+ // 60 s on a CPU with DBS-BSRNN: about 240 s of work, 3 s to load and save.
+ expect(splitTime({ seconds: 60, quality: "fast", mode: "mono", device: "cpu" })).toEqual({ low: 195, high: 387 });
// Stereo stems: one pass per channel.
const stereo = splitTime({ seconds: 60, quality: "fast", mode: "each channel", channels: 2, device: "cpu" });
- expect(stereo.high).toBe(Math.round(3 + ((60 * 2) / 0.27) * 1.6));
- expect(splitTime({ seconds: 60, quality: "best", mode: "mono" }).low).toBe(Math.round(3 + (60 / 0.09) * 0.8));
+ expect(stereo.high).toBe(Math.round(3 + ((60 * 2) / 0.25) * 1.6));
+ expect(splitTime({ seconds: 60, quality: "best", mode: "mono" }).low).toBe(Math.round(3 + (60 / 0.1) * 0.8));
// A mono file with stereo stems asked for: one pass (DBS runs once per channel).
- expect(splitTime({ seconds: 60, quality: "fast", mode: dbsChannelsFor("each channel", 1), channels: 1, device: "cpu" })).toEqual({ low: 181, high: 359 });
+ expect(splitTime({ seconds: 60, quality: "fast", mode: dbsChannelsFor("each channel", 1), channels: 1, device: "cpu" })).toEqual({ low: 195, high: 387 });
// Each channel is one pass per channel (the measured 5.1 run: six passes); a 5.1 split is mono now, one pass.
- expect(splitTime({ seconds: 10, quality: "fast", mode: "each channel", channels: 6, device: "cpu" }).low).toBe(Math.round(3 + (60 / 0.27) * 0.8));
- expect(splitTime({ seconds: 10, quality: "fast", mode: dbsChannelsFor("each channel", 6), channels: 6, device: "cpu" }).low).toBe(Math.round(3 + (10 / 0.27) * 0.8));
+ expect(splitTime({ seconds: 10, quality: "fast", mode: "each channel", channels: 6, device: "cpu" }).low).toBe(Math.round(3 + (60 / 0.25) * 0.8));
+ expect(splitTime({ seconds: 10, quality: "fast", mode: dbsChannelsFor("each channel", 6), channels: 6, device: "cpu" }).low).toBe(Math.round(3 + (10 / 0.25) * 0.8));
// CUDA: well over real time, a range up to 4x slower than the reference card.
expect(splitTime({ seconds: 600, quality: "best", mode: "mono", device: "cuda" })).toEqual({ low: 41, high: 154 });
});
it("says it in words", () => {
expect(durationWords({ low: 20, high: 50 })).toBe("under a minute");
- expect(durationWords({ low: 181, high: 359 })).toBe("about 3–6 min");
+ expect(durationWords({ low: 195, high: 387 })).toBe("about 3–6 min");
expect(durationWords({ low: 120, high: 130 })).toBe("about 2 min");
expect(durationWords({ low: 7200, high: 10800 })).toBe("about 2–3 h");
});