omnius 1.0.333 → 1.0.334
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -9
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -279541,19 +279541,26 @@ import { execFileSync as execFileSync6 } from "node:child_process";
|
|
|
279541
279541
|
import { existsSync as existsSync42, readFileSync as readFileSync31, writeFileSync as writeFileSync21, mkdirSync as mkdirSync23, statfsSync as statfsSync3 } from "node:fs";
|
|
279542
279542
|
import { join as join51 } from "node:path";
|
|
279543
279543
|
import { cpus, totalmem as totalmem2 } from "node:os";
|
|
279544
|
+
function gpuComputeUsable(computeCap) {
|
|
279545
|
+
if (!computeCap)
|
|
279546
|
+
return true;
|
|
279547
|
+
const v = parseFloat(computeCap);
|
|
279548
|
+
return Number.isFinite(v) ? v >= MIN_COMPUTE_CAP : true;
|
|
279549
|
+
}
|
|
279544
279550
|
function bytesToGiB(bytes) {
|
|
279545
279551
|
return Math.round(bytes / 1024 ** 3 * 10) / 10;
|
|
279546
279552
|
}
|
|
279547
279553
|
function probeGpus() {
|
|
279548
279554
|
try {
|
|
279549
|
-
const out = execFileSync6("nvidia-smi", ["--query-gpu=index,name,memory.total,memory.free", "--format=csv,noheader,nounits"], { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] });
|
|
279555
|
+
const out = execFileSync6("nvidia-smi", ["--query-gpu=index,name,memory.total,memory.free,compute_cap", "--format=csv,noheader,nounits"], { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] });
|
|
279550
279556
|
return out.trim().split("\n").map((line) => {
|
|
279551
|
-
const [index, name10, total, free] = line.split(",").map((s2) => s2.trim());
|
|
279557
|
+
const [index, name10, total, free, cap] = line.split(",").map((s2) => s2.trim());
|
|
279552
279558
|
return {
|
|
279553
279559
|
index: parseInt(index || "0", 10),
|
|
279554
279560
|
name: name10 || "GPU",
|
|
279555
279561
|
memTotalMiB: parseInt(total || "0", 10),
|
|
279556
|
-
memFreeMiB: parseInt(free || "0", 10)
|
|
279562
|
+
memFreeMiB: parseInt(free || "0", 10),
|
|
279563
|
+
computeCap: cap || ""
|
|
279557
279564
|
};
|
|
279558
279565
|
}).filter((g) => Number.isFinite(g.memTotalMiB) && g.memTotalMiB > 0);
|
|
279559
279566
|
} catch {
|
|
@@ -279577,9 +279584,10 @@ function diskFreeGiB(path12) {
|
|
|
279577
279584
|
}
|
|
279578
279585
|
}
|
|
279579
279586
|
function selectStack(facts) {
|
|
279580
|
-
const usable = facts.gpus.filter((g) => g.memTotalMiB >= USABLE_GPU_MIN_MIB);
|
|
279587
|
+
const usable = facts.gpus.filter((g) => g.memTotalMiB >= USABLE_GPU_MIN_MIB && gpuComputeUsable(g.computeCap));
|
|
279581
279588
|
const maxVramGiB = usable.length > 0 ? Math.round(Math.max(...usable.map((g) => g.memTotalMiB)) / 1024) : 0;
|
|
279582
279589
|
const gpuCount = usable.length;
|
|
279590
|
+
const cudaVisibleDevices = usable.map((g) => g.index).join(",");
|
|
279583
279591
|
if (gpuCount === 0) {
|
|
279584
279592
|
return {
|
|
279585
279593
|
stack: "edge",
|
|
@@ -279587,7 +279595,8 @@ function selectStack(facts) {
|
|
|
279587
279595
|
precision: "fp32",
|
|
279588
279596
|
vramGiB: 0,
|
|
279589
279597
|
gpuCount: 0,
|
|
279590
|
-
|
|
279598
|
+
cudaVisibleDevices: "",
|
|
279599
|
+
reason: `No usable GPU (>=8 GiB, compute>=7.0) detected; CPU edge stack on ${facts.cpuCores} cores / ${facts.ramGiB} GiB RAM.`
|
|
279591
279600
|
};
|
|
279592
279601
|
}
|
|
279593
279602
|
const precision = maxVramGiB >= 24 ? "bf16" : "fp16";
|
|
@@ -279598,7 +279607,8 @@ function selectStack(facts) {
|
|
|
279598
279607
|
precision,
|
|
279599
279608
|
vramGiB: maxVramGiB,
|
|
279600
279609
|
gpuCount,
|
|
279601
|
-
|
|
279610
|
+
cudaVisibleDevices,
|
|
279611
|
+
reason: `Forensic stack: ${gpuCount} usable GPU(s) [${cudaVisibleDevices}], max ${maxVramGiB} GiB VRAM — multi-pass + thinking-variant LALM + high-res reinspection.`
|
|
279602
279612
|
};
|
|
279603
279613
|
}
|
|
279604
279614
|
if (maxVramGiB >= 16) {
|
|
@@ -279608,7 +279618,8 @@ function selectStack(facts) {
|
|
|
279608
279618
|
precision,
|
|
279609
279619
|
vramGiB: maxVramGiB,
|
|
279610
279620
|
gpuCount,
|
|
279611
|
-
|
|
279621
|
+
cudaVisibleDevices,
|
|
279622
|
+
reason: `Baseline stack: one ${maxVramGiB} GiB GPU [${cudaVisibleDevices}] — V-JEPA2-L/VideoPrism + YOLOE+SAM2 + event-triggered 7B VLM/LALM.`
|
|
279612
279623
|
};
|
|
279613
279624
|
}
|
|
279614
279625
|
return {
|
|
@@ -279617,7 +279628,8 @@ function selectStack(facts) {
|
|
|
279617
279628
|
precision,
|
|
279618
279629
|
vramGiB: maxVramGiB,
|
|
279619
279630
|
gpuCount,
|
|
279620
|
-
|
|
279631
|
+
cudaVisibleDevices,
|
|
279632
|
+
reason: `Edge stack on GPU [${cudaVisibleDevices}]: only ${maxVramGiB} GiB VRAM — keyframe detectors + lite encoders, small models on event windows.`
|
|
279621
279633
|
};
|
|
279622
279634
|
}
|
|
279623
279635
|
function adapterPlacement(cap, role) {
|
|
@@ -279664,11 +279676,12 @@ function getMediaCapability(opts = {}) {
|
|
|
279664
279676
|
}
|
|
279665
279677
|
return cap;
|
|
279666
279678
|
}
|
|
279667
|
-
var USABLE_GPU_MIN_MIB, CACHE_FILE2, CACHE_TTL_MS2;
|
|
279679
|
+
var MIN_COMPUTE_CAP, USABLE_GPU_MIN_MIB, CACHE_FILE2, CACHE_TTL_MS2;
|
|
279668
279680
|
var init_media_capability = __esm({
|
|
279669
279681
|
"packages/execution/dist/av/media-capability.js"() {
|
|
279670
279682
|
"use strict";
|
|
279671
279683
|
init_model_store();
|
|
279684
|
+
MIN_COMPUTE_CAP = 7;
|
|
279672
279685
|
USABLE_GPU_MIN_MIB = 8 * 1024;
|
|
279673
279686
|
CACHE_FILE2 = "av-capability.json";
|
|
279674
279687
|
CACHE_TTL_MS2 = 60 * 60 * 1e3;
|
|
@@ -553530,6 +553543,7 @@ __export(dist_exports2, {
|
|
|
553530
553543
|
gigabytesToBytes: () => gigabytesToBytes,
|
|
553531
553544
|
globalMediaDir: () => globalMediaDir,
|
|
553532
553545
|
globalMediaRootDir: () => globalMediaRootDir,
|
|
553546
|
+
gpuComputeUsable: () => gpuComputeUsable,
|
|
553533
553547
|
hasMaterialAmbiguity: () => hasMaterialAmbiguity,
|
|
553534
553548
|
hashGeneratedArtifactContent: () => hashGeneratedArtifactContent,
|
|
553535
553549
|
hashProcessCommand: () => hashProcessCommand,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.334",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.334",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED