@camstack/addon-pipeline 1.2.348 → 1.2.350
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/audio-analyzer/index.js +3 -3
- package/dist/audio-analyzer/index.mjs +3 -3
- package/dist/{custom-model-catalog-ae8UGV5D.js → custom-model-catalog-B1oKNuAa.js} +10 -7
- package/dist/{custom-model-catalog-B9iY9L4J.mjs → custom-model-catalog-XCE-YLb2.mjs} +10 -7
- package/dist/detection-pipeline/index.js +36 -17
- package/dist/detection-pipeline/index.mjs +36 -18
- package/dist/{dist-BrHqpGoN.js → dist-C2jSMJo_.js} +41 -2
- package/dist/{dist-Cr4QsawE.mjs → dist-DFCl7PZV.mjs} +41 -2
- package/dist/{model-catalogs-BHBzN67T.js → model-catalogs-CVhIiNhe.js} +1 -1
- package/dist/{model-catalogs-Bj9lxXcI.mjs → model-catalogs-Cind8NmH.mjs} +1 -1
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-CJ1zilVO.js → node-B7ZinEw5.js} +1 -1
- package/dist/{node-Dym0f_3g.mjs → node-C12l0K5V.mjs} +1 -1
- package/dist/pipeline-runner/index.js +3 -3
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-CwDymrXT.mjs → process-memory-3F1cP1ou.mjs} +1 -1
- package/dist/{process-memory-CAMKwMJs.js → process-memory-C1s8YIw4.js} +1 -1
- package/dist/recorder/index.js +2 -2
- package/dist/recorder/index.mjs +2 -2
- package/dist/{segment-demux-js-CjTXPNsG.mjs → segment-demux-js-7l4LsdU4.mjs} +1 -1
- package/dist/{segment-demux-js-BEaJw3G9.js → segment-demux-js-B2IxTWms.js} +1 -1
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Db59r-U9.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-VwFAKiPW.mjs} +3 -3
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-CsgP9_0g.mjs → hostInit-CozpWK-g.mjs} +3 -3
- package/dist/stream-broker/index.js +3 -3
- package/dist/stream-broker/index.mjs +3 -3
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/python/inference_pool.py +86 -24
- package/python/requirements-webgpu.txt +7 -0
- package/python/test_inference_pool_device_selection.py +10 -0
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_model_catalogs = require("../model-catalogs-
|
|
8
|
-
const require_process_memory = require("../process-memory-
|
|
6
|
+
const require_dist = require("../dist-C2jSMJo_.js");
|
|
7
|
+
const require_model_catalogs = require("../model-catalogs-CVhIiNhe.js");
|
|
8
|
+
const require_process_memory = require("../process-memory-C1s8YIw4.js");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
10
10
|
node_fs = require_chunk.__toESM(node_fs);
|
|
11
11
|
let node_path = require("node:path");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { $ as audioAnalysisCapability, Hn as hydrateSchema, Kn as nodePin, L as PoolMemoryWatchdog, Ln as audioChunkBytesPerSample, Mn as errMsg, Pn as BaseAddon, Rt as mapAudioLabelToMacro, Vn as expandAudioChunkToF32le, cr as EventCategory, et as audioAnalyzerCapability, h as DEFAULT_AUDIO_ANALYZER_CONFIG, r as AUDIO_BACKEND_CHOICES, un as resolvePoolMemoryPolicy } from "../dist-
|
|
3
|
-
import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-
|
|
4
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
2
|
+
import { $ as audioAnalysisCapability, Hn as hydrateSchema, Kn as nodePin, L as PoolMemoryWatchdog, Ln as audioChunkBytesPerSample, Mn as errMsg, Pn as BaseAddon, Rt as mapAudioLabelToMacro, Vn as expandAudioChunkToF32le, cr as EventCategory, et as audioAnalyzerCapability, h as DEFAULT_AUDIO_ANALYZER_CONFIG, r as AUDIO_BACKEND_CHOICES, un as resolvePoolMemoryPolicy } from "../dist-DFCl7PZV.mjs";
|
|
3
|
+
import { n as AUDIO_CLASSIFIER_MODELS } from "../model-catalogs-Cind8NmH.mjs";
|
|
4
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-3F1cP1ou.mjs";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import { ensureModel } from "@camstack/system/addon-utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
2
|
-
const require_model_catalogs = require("./model-catalogs-
|
|
1
|
+
const require_dist = require("./dist-C2jSMJo_.js");
|
|
2
|
+
const require_model_catalogs = require("./model-catalogs-CVhIiNhe.js");
|
|
3
3
|
const require_worker_protocol = require("./worker-protocol-C-G8qmye.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
@@ -1840,10 +1840,9 @@ var OBJECT_DETECTION_STEP_ID = "object-detection";
|
|
|
1840
1840
|
* Balanced default object-detection model per accelerator class. `'cpu'` maps to
|
|
1841
1841
|
* `null` → the caller substitutes the step's own `defaultModelId` (`yolo26n`).
|
|
1842
1842
|
* INTEL NPU + iGPU default to the Ultralytics YOLOv9 re-export (int8 @320), which
|
|
1843
|
-
* runs on both (~298 fps measured on the NPU).
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1846
|
-
* CoreML yolov9 @320 build.
|
|
1843
|
+
* runs on both (~298 fps measured on the NPU). OpenVINO CPU (AMD Zen4 path) uses
|
|
1844
|
+
* the same int8 IR. AMD iGPU WebGPU uses the ONNX fp32 @320 build. Apple ANE uses
|
|
1845
|
+
* the CoreML yolov9 @320 build.
|
|
1847
1846
|
*
|
|
1848
1847
|
* Do **not** promote these ids to `yolov9m-640` / `*-640`. The controlled
|
|
1849
1848
|
* evaluation recovered 0/3 misses at the current 0.50 threshold and failed the
|
|
@@ -1857,6 +1856,8 @@ var MODEL_BY_CLASS = {
|
|
|
1857
1856
|
"apple-ane": "yolov9m-320",
|
|
1858
1857
|
"intel-npu": "yolov9m-320-int8",
|
|
1859
1858
|
"intel-gpu": "yolov9m-320-int8",
|
|
1859
|
+
"openvino-cpu": "yolov9m-320-int8",
|
|
1860
|
+
"amd-igpu": "yolov9m-320",
|
|
1860
1861
|
cpu: null
|
|
1861
1862
|
};
|
|
1862
1863
|
/**
|
|
@@ -1880,11 +1881,13 @@ function classifyAccelerator(backend, device) {
|
|
|
1880
1881
|
if (b === "coreml" || b === "ane" || b === "mps") return "apple-ane";
|
|
1881
1882
|
if (b === "openvino") {
|
|
1882
1883
|
if (d === "npu") return "intel-npu";
|
|
1883
|
-
if (d === "cpu") return "cpu";
|
|
1884
|
+
if (d === "cpu") return "openvino-cpu";
|
|
1884
1885
|
return "intel-gpu";
|
|
1885
1886
|
}
|
|
1886
1887
|
if (b === "npu" || b === "intel-npu") return "intel-npu";
|
|
1887
1888
|
if (b === "gpu" || b === "intel-gpu" || b === "gpu-openvino") return "intel-gpu";
|
|
1889
|
+
if (b === "onnx" && d === "webgpu") return "amd-igpu";
|
|
1890
|
+
if (b === "webgpu" || b === "amd-igpu") return "amd-igpu";
|
|
1888
1891
|
return "cpu";
|
|
1889
1892
|
}
|
|
1890
1893
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as LABEL_SUPPLY_VOCABULARIES, Mt as inferModelProvider, b as DEVICE_BACKEND_TO_FORMAT, f as COCO_80_LABELS, hn as stepModelRunsOnFormat, i as AUDIO_MACRO_LABELS, p as COCO_TO_MACRO, tt as audioKindId } from "./dist-
|
|
2
|
-
import { a as FACE_DETECTION_MODELS, c as OBJECT_DETECTION_MODELS, d as PLATE_OCR_MODELS, f as SEGMENTATION_REFINER_MODELS, i as CLIP_EMBEDDING_MODELS, l as PACKAGE_DETECTION_MODELS, n as AUDIO_CLASSIFIER_MODELS, o as FACE_EMBEDDING_MODELS, p as VEHICLE_CLASSIFIER_MODELS, r as BIRD_CLASSIFIER_MODELS, s as INSTANCE_SEGMENTATION_MODELS, t as ANIMAL_CLASSIFIER_MODELS, u as PLATE_DETECTION_MODELS } from "./model-catalogs-
|
|
1
|
+
import { A as LABEL_SUPPLY_VOCABULARIES, Mt as inferModelProvider, b as DEVICE_BACKEND_TO_FORMAT, f as COCO_80_LABELS, hn as stepModelRunsOnFormat, i as AUDIO_MACRO_LABELS, p as COCO_TO_MACRO, tt as audioKindId } from "./dist-DFCl7PZV.mjs";
|
|
2
|
+
import { a as FACE_DETECTION_MODELS, c as OBJECT_DETECTION_MODELS, d as PLATE_OCR_MODELS, f as SEGMENTATION_REFINER_MODELS, i as CLIP_EMBEDDING_MODELS, l as PACKAGE_DETECTION_MODELS, n as AUDIO_CLASSIFIER_MODELS, o as FACE_EMBEDDING_MODELS, p as VEHICLE_CLASSIFIER_MODELS, r as BIRD_CLASSIFIER_MODELS, s as INSTANCE_SEGMENTATION_MODELS, t as ANIMAL_CLASSIFIER_MODELS, u as PLATE_DETECTION_MODELS } from "./model-catalogs-Cind8NmH.mjs";
|
|
3
3
|
import { t as isWorkerReply } from "./worker-protocol-D_NzPcnh.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
@@ -1840,10 +1840,9 @@ var OBJECT_DETECTION_STEP_ID = "object-detection";
|
|
|
1840
1840
|
* Balanced default object-detection model per accelerator class. `'cpu'` maps to
|
|
1841
1841
|
* `null` → the caller substitutes the step's own `defaultModelId` (`yolo26n`).
|
|
1842
1842
|
* INTEL NPU + iGPU default to the Ultralytics YOLOv9 re-export (int8 @320), which
|
|
1843
|
-
* runs on both (~298 fps measured on the NPU).
|
|
1844
|
-
*
|
|
1845
|
-
*
|
|
1846
|
-
* CoreML yolov9 @320 build.
|
|
1843
|
+
* runs on both (~298 fps measured on the NPU). OpenVINO CPU (AMD Zen4 path) uses
|
|
1844
|
+
* the same int8 IR. AMD iGPU WebGPU uses the ONNX fp32 @320 build. Apple ANE uses
|
|
1845
|
+
* the CoreML yolov9 @320 build.
|
|
1847
1846
|
*
|
|
1848
1847
|
* Do **not** promote these ids to `yolov9m-640` / `*-640`. The controlled
|
|
1849
1848
|
* evaluation recovered 0/3 misses at the current 0.50 threshold and failed the
|
|
@@ -1857,6 +1856,8 @@ var MODEL_BY_CLASS = {
|
|
|
1857
1856
|
"apple-ane": "yolov9m-320",
|
|
1858
1857
|
"intel-npu": "yolov9m-320-int8",
|
|
1859
1858
|
"intel-gpu": "yolov9m-320-int8",
|
|
1859
|
+
"openvino-cpu": "yolov9m-320-int8",
|
|
1860
|
+
"amd-igpu": "yolov9m-320",
|
|
1860
1861
|
cpu: null
|
|
1861
1862
|
};
|
|
1862
1863
|
/**
|
|
@@ -1880,11 +1881,13 @@ function classifyAccelerator(backend, device) {
|
|
|
1880
1881
|
if (b === "coreml" || b === "ane" || b === "mps") return "apple-ane";
|
|
1881
1882
|
if (b === "openvino") {
|
|
1882
1883
|
if (d === "npu") return "intel-npu";
|
|
1883
|
-
if (d === "cpu") return "cpu";
|
|
1884
|
+
if (d === "cpu") return "openvino-cpu";
|
|
1884
1885
|
return "intel-gpu";
|
|
1885
1886
|
}
|
|
1886
1887
|
if (b === "npu" || b === "intel-npu") return "intel-npu";
|
|
1887
1888
|
if (b === "gpu" || b === "intel-gpu" || b === "gpu-openvino") return "intel-gpu";
|
|
1889
|
+
if (b === "onnx" && d === "webgpu") return "amd-igpu";
|
|
1890
|
+
if (b === "webgpu" || b === "amd-igpu") return "amd-igpu";
|
|
1888
1891
|
return "cpu";
|
|
1889
1892
|
}
|
|
1890
1893
|
/**
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_custom_model_catalog = require("../custom-model-catalog-
|
|
6
|
+
const require_dist = require("../dist-C2jSMJo_.js");
|
|
7
|
+
const require_node = require("../node-B7ZinEw5.js");
|
|
8
|
+
const require_custom_model_catalog = require("../custom-model-catalog-B1oKNuAa.js");
|
|
9
9
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
10
|
-
const require_process_memory = require("../process-memory-
|
|
10
|
+
const require_process_memory = require("../process-memory-C1s8YIw4.js");
|
|
11
11
|
let node_os = require("node:os");
|
|
12
12
|
node_os = require_chunk.__toESM(node_os);
|
|
13
13
|
let node_fs = require("node:fs");
|
|
@@ -31,7 +31,11 @@ var KNOWN_GPU_TYPES = [
|
|
|
31
31
|
"intel",
|
|
32
32
|
"apple"
|
|
33
33
|
];
|
|
34
|
-
var KNOWN_NPU_TYPES = [
|
|
34
|
+
var KNOWN_NPU_TYPES = [
|
|
35
|
+
"apple-ane",
|
|
36
|
+
"intel-npu",
|
|
37
|
+
"amd-xdna"
|
|
38
|
+
];
|
|
35
39
|
function toKnownPlatform(p) {
|
|
36
40
|
return KNOWN_PLATFORMS.find((v) => v === p) ?? "linux";
|
|
37
41
|
}
|
|
@@ -203,12 +207,19 @@ function tuningFor(id) {
|
|
|
203
207
|
}
|
|
204
208
|
/**
|
|
205
209
|
* Proactive-install hint kept for back-compat (re-exported from index.ts).
|
|
206
|
-
* Intel on Linux warrants
|
|
207
|
-
*
|
|
210
|
+
* Intel on Linux warrants OpenVINO for iGPU/NPU; AMD on Linux warrants it for
|
|
211
|
+
* the CPU device (int8 IRs on Zen4 VNNI). coremltools covers macOS; NVIDIA
|
|
212
|
+
* stays on ORT CUDA.
|
|
208
213
|
*/
|
|
209
214
|
function shouldInstallOpenvino(env) {
|
|
210
215
|
if (env.platform === "darwin") return false;
|
|
211
|
-
return env.gpu?.type === "intel" || env.npu?.type === "intel-npu";
|
|
216
|
+
return env.gpu?.type === "intel" || env.npu?.type === "intel-npu" || env.gpu?.type === "amd";
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Proactive-install hint for the ONNX WebGPU plugin EP (AMD iGPU on Linux).
|
|
220
|
+
*/
|
|
221
|
+
function shouldInstallWebgpu(env) {
|
|
222
|
+
return env.platform === "linux" && env.gpu?.type === "amd";
|
|
212
223
|
}
|
|
213
224
|
//#endregion
|
|
214
225
|
//#region src/detection-pipeline/auto-pick.ts
|
|
@@ -12110,16 +12121,23 @@ var DetectionPipelineAddon = class extends require_dist.BaseAddon {
|
|
|
12110
12121
|
gpu: hw?.gpu ?? null,
|
|
12111
12122
|
npu: hw?.npu ?? null
|
|
12112
12123
|
};
|
|
12113
|
-
if (
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12124
|
+
if (shouldInstallOpenvino(hardware)) {
|
|
12125
|
+
this.ctx.logger.info("OpenVINO-capable hardware detected — proactively installing OpenVINO Python package", { meta: {
|
|
12126
|
+
gpu: hardware.gpu?.type ?? null,
|
|
12127
|
+
npu: hardware.npu?.type ?? null
|
|
12128
|
+
} });
|
|
12129
|
+
const requirementsFile = node_path.join(this.pythonAddonDir, "requirements-openvino.txt");
|
|
12130
|
+
await this.ctx.deps.installPythonRequirements(requirementsFile);
|
|
12131
|
+
this.ctx.logger.info("Proactive OpenVINO install complete");
|
|
12132
|
+
}
|
|
12133
|
+
if (shouldInstallWebgpu(hardware)) {
|
|
12134
|
+
this.ctx.logger.info("AMD iGPU detected — proactively installing ONNX WebGPU plugin", { meta: { gpu: hardware.gpu?.type ?? null } });
|
|
12135
|
+
const webgpuReq = node_path.join(this.pythonAddonDir, "requirements-webgpu.txt");
|
|
12136
|
+
await this.ctx.deps.installPythonRequirements(webgpuReq);
|
|
12137
|
+
this.ctx.logger.info("Proactive WebGPU install complete");
|
|
12138
|
+
}
|
|
12121
12139
|
} catch (err) {
|
|
12122
|
-
this.ctx.logger.warn("Proactive
|
|
12140
|
+
this.ctx.logger.warn("Proactive accelerator Python install failed — falling back to onnx-cpu baseline", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
12123
12141
|
}
|
|
12124
12142
|
}
|
|
12125
12143
|
async onShutdown() {
|
|
@@ -12181,3 +12199,4 @@ exports.default = DetectionPipelineAddon;
|
|
|
12181
12199
|
exports.getDefaultModelForFormat = require_custom_model_catalog.getDefaultModelForFormat;
|
|
12182
12200
|
exports.getStepDefinition = require_custom_model_catalog.getStepDefinition;
|
|
12183
12201
|
exports.shouldInstallOpenvino = shouldInstallOpenvino;
|
|
12202
|
+
exports.shouldInstallWebgpu = shouldInstallWebgpu;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { Gt as modelBindingKey, Hn as hydrateSchema, It as loadContributionCapability, Kn as nodePin, L as PoolMemoryWatchdog, Mn as errMsg$1, Pn as BaseAddon, Pt as linkedLabelStepId, Q as applyModelBoundSettings, Qt as pipelineExecutorCapability, Rn as createEvent, St as evaluateZoneRules, Y as YAMNET_TO_MACRO, Yn as sleep, Yt as pickClusterStepSettings, Zn as array, an as resolveClusterStepModelId, bn as supportedRuntimes$1, cr as EventCategory, ct as collectModelBoundKeys, d as CLUSTER_MODEL_SCOPED_STEPS, g as DEFAULT_CLUSTER_STEP_SETTINGS, hn as stepModelRunsOnFormat, jt as hfModelUrl, k as LABEL_SUPPLY_MACRO, lt as containingParentIndex, mn as runtimeDevices$1, n as APPLE_SA_TO_MACRO, or as string, pn as rootSuppliesOf, pt as defaultDeviceFor$1, qt as overlayClusterStepSettings, rr as object, sr as union, un as resolvePoolMemoryPolicy, vt as detectionPipelineCapability, xt as enumerateInferenceDevices } from "../dist-
|
|
3
|
-
import { s as readProcessCost } from "../node-
|
|
4
|
-
import { C as resolveModelDefaultConfidence, S as landmarkPrecisionVerdict, _ as ALL_STEPS, b as getStepDefinition, f as localFrameRegistry, g as ALL_PIPELINE_STEPS, l as resolveDefaultDetectionModel, n as mergeCustomModels, o as deviceKeyOf, r as buildSubtreeCanRun, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, v as getDefaultModelForFormat, x as resolveModelForFormat, y as getStep } from "../custom-model-catalog-
|
|
2
|
+
import { Gt as modelBindingKey, Hn as hydrateSchema, It as loadContributionCapability, Kn as nodePin, L as PoolMemoryWatchdog, Mn as errMsg$1, Pn as BaseAddon, Pt as linkedLabelStepId, Q as applyModelBoundSettings, Qt as pipelineExecutorCapability, Rn as createEvent, St as evaluateZoneRules, Y as YAMNET_TO_MACRO, Yn as sleep, Yt as pickClusterStepSettings, Zn as array, an as resolveClusterStepModelId, bn as supportedRuntimes$1, cr as EventCategory, ct as collectModelBoundKeys, d as CLUSTER_MODEL_SCOPED_STEPS, g as DEFAULT_CLUSTER_STEP_SETTINGS, hn as stepModelRunsOnFormat, jt as hfModelUrl, k as LABEL_SUPPLY_MACRO, lt as containingParentIndex, mn as runtimeDevices$1, n as APPLE_SA_TO_MACRO, or as string, pn as rootSuppliesOf, pt as defaultDeviceFor$1, qt as overlayClusterStepSettings, rr as object, sr as union, un as resolvePoolMemoryPolicy, vt as detectionPipelineCapability, xt as enumerateInferenceDevices } from "../dist-DFCl7PZV.mjs";
|
|
3
|
+
import { s as readProcessCost } from "../node-C12l0K5V.mjs";
|
|
4
|
+
import { C as resolveModelDefaultConfidence, S as landmarkPrecisionVerdict, _ as ALL_STEPS, b as getStepDefinition, f as localFrameRegistry, g as ALL_PIPELINE_STEPS, l as resolveDefaultDetectionModel, n as mergeCustomModels, o as deviceKeyOf, r as buildSubtreeCanRun, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, v as getDefaultModelForFormat, x as resolveModelForFormat, y as getStep } from "../custom-model-catalog-XCE-YLb2.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
6
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-3F1cP1ou.mjs";
|
|
7
7
|
import * as os$1 from "node:os";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
@@ -24,7 +24,11 @@ var KNOWN_GPU_TYPES = [
|
|
|
24
24
|
"intel",
|
|
25
25
|
"apple"
|
|
26
26
|
];
|
|
27
|
-
var KNOWN_NPU_TYPES = [
|
|
27
|
+
var KNOWN_NPU_TYPES = [
|
|
28
|
+
"apple-ane",
|
|
29
|
+
"intel-npu",
|
|
30
|
+
"amd-xdna"
|
|
31
|
+
];
|
|
28
32
|
function toKnownPlatform(p) {
|
|
29
33
|
return KNOWN_PLATFORMS.find((v) => v === p) ?? "linux";
|
|
30
34
|
}
|
|
@@ -196,12 +200,19 @@ function tuningFor(id) {
|
|
|
196
200
|
}
|
|
197
201
|
/**
|
|
198
202
|
* Proactive-install hint kept for back-compat (re-exported from index.ts).
|
|
199
|
-
* Intel on Linux warrants
|
|
200
|
-
*
|
|
203
|
+
* Intel on Linux warrants OpenVINO for iGPU/NPU; AMD on Linux warrants it for
|
|
204
|
+
* the CPU device (int8 IRs on Zen4 VNNI). coremltools covers macOS; NVIDIA
|
|
205
|
+
* stays on ORT CUDA.
|
|
201
206
|
*/
|
|
202
207
|
function shouldInstallOpenvino(env) {
|
|
203
208
|
if (env.platform === "darwin") return false;
|
|
204
|
-
return env.gpu?.type === "intel" || env.npu?.type === "intel-npu";
|
|
209
|
+
return env.gpu?.type === "intel" || env.npu?.type === "intel-npu" || env.gpu?.type === "amd";
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Proactive-install hint for the ONNX WebGPU plugin EP (AMD iGPU on Linux).
|
|
213
|
+
*/
|
|
214
|
+
function shouldInstallWebgpu(env) {
|
|
215
|
+
return env.platform === "linux" && env.gpu?.type === "amd";
|
|
205
216
|
}
|
|
206
217
|
//#endregion
|
|
207
218
|
//#region src/detection-pipeline/auto-pick.ts
|
|
@@ -12103,16 +12114,23 @@ var DetectionPipelineAddon = class extends BaseAddon {
|
|
|
12103
12114
|
gpu: hw?.gpu ?? null,
|
|
12104
12115
|
npu: hw?.npu ?? null
|
|
12105
12116
|
};
|
|
12106
|
-
if (
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12117
|
+
if (shouldInstallOpenvino(hardware)) {
|
|
12118
|
+
this.ctx.logger.info("OpenVINO-capable hardware detected — proactively installing OpenVINO Python package", { meta: {
|
|
12119
|
+
gpu: hardware.gpu?.type ?? null,
|
|
12120
|
+
npu: hardware.npu?.type ?? null
|
|
12121
|
+
} });
|
|
12122
|
+
const requirementsFile = path$1.join(this.pythonAddonDir, "requirements-openvino.txt");
|
|
12123
|
+
await this.ctx.deps.installPythonRequirements(requirementsFile);
|
|
12124
|
+
this.ctx.logger.info("Proactive OpenVINO install complete");
|
|
12125
|
+
}
|
|
12126
|
+
if (shouldInstallWebgpu(hardware)) {
|
|
12127
|
+
this.ctx.logger.info("AMD iGPU detected — proactively installing ONNX WebGPU plugin", { meta: { gpu: hardware.gpu?.type ?? null } });
|
|
12128
|
+
const webgpuReq = path$1.join(this.pythonAddonDir, "requirements-webgpu.txt");
|
|
12129
|
+
await this.ctx.deps.installPythonRequirements(webgpuReq);
|
|
12130
|
+
this.ctx.logger.info("Proactive WebGPU install complete");
|
|
12131
|
+
}
|
|
12114
12132
|
} catch (err) {
|
|
12115
|
-
this.ctx.logger.warn("Proactive
|
|
12133
|
+
this.ctx.logger.warn("Proactive accelerator Python install failed — falling back to onnx-cpu baseline", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
12116
12134
|
}
|
|
12117
12135
|
}
|
|
12118
12136
|
async onShutdown() {
|
|
@@ -12168,4 +12186,4 @@ var DetectionPipelineAddon = class extends BaseAddon {
|
|
|
12168
12186
|
}
|
|
12169
12187
|
};
|
|
12170
12188
|
//#endregion
|
|
12171
|
-
export { ALL_STEPS, DetectionPipelineProvider, DetectionPipelineAddon as default, getDefaultModelForFormat, getStepDefinition, shouldInstallOpenvino };
|
|
12189
|
+
export { ALL_STEPS, DetectionPipelineProvider, DetectionPipelineAddon as default, getDefaultModelForFormat, getStepDefinition, shouldInstallOpenvino, shouldInstallWebgpu };
|
|
@@ -29129,11 +29129,14 @@ var HardwareClassIdSchema = _enum([
|
|
|
29129
29129
|
"intel-n-series",
|
|
29130
29130
|
"apple-m-base",
|
|
29131
29131
|
"apple-m-pro",
|
|
29132
|
+
"amd-phoenix",
|
|
29132
29133
|
"unknown"
|
|
29133
29134
|
]);
|
|
29134
29135
|
var AcceleratorKindSchema = _enum([
|
|
29135
29136
|
"intel-npu",
|
|
29136
29137
|
"intel-igpu",
|
|
29138
|
+
"amd-igpu",
|
|
29139
|
+
"amd-npu",
|
|
29137
29140
|
"x86-cpu",
|
|
29138
29141
|
"arm-cpu",
|
|
29139
29142
|
"apple-ane",
|
|
@@ -39721,7 +39724,15 @@ var GpuInfoSchema = object({
|
|
|
39721
39724
|
name: string(),
|
|
39722
39725
|
memoryMB: number().optional()
|
|
39723
39726
|
});
|
|
39724
|
-
var NpuInfoSchema = object({
|
|
39727
|
+
var NpuInfoSchema = object({
|
|
39728
|
+
type: _enum([
|
|
39729
|
+
"apple-ane",
|
|
39730
|
+
"intel-npu",
|
|
39731
|
+
"amd-xdna"
|
|
39732
|
+
]),
|
|
39733
|
+
name: string().optional(),
|
|
39734
|
+
generation: _enum(["xdna1", "xdna2"]).optional()
|
|
39735
|
+
});
|
|
39725
39736
|
var CoralInfoSchema = object({
|
|
39726
39737
|
type: literal("coral-edgetpu"),
|
|
39727
39738
|
bus: string().optional()
|
|
@@ -58292,6 +58303,10 @@ var RUNTIMES = [
|
|
|
58292
58303
|
value: "cuda",
|
|
58293
58304
|
label: "CUDA"
|
|
58294
58305
|
});
|
|
58306
|
+
if (hw.gpu?.type === "amd") out.push({
|
|
58307
|
+
value: "webgpu",
|
|
58308
|
+
label: "WebGPU (AMD iGPU)"
|
|
58309
|
+
});
|
|
58295
58310
|
if (hw.npu?.type === "apple-ane") out.push({
|
|
58296
58311
|
value: "coreml",
|
|
58297
58312
|
label: "CoreML EP"
|
|
@@ -58302,9 +58317,10 @@ var RUNTIMES = [
|
|
|
58302
58317
|
},
|
|
58303
58318
|
{
|
|
58304
58319
|
id: "openvino",
|
|
58305
|
-
supports: (hw) => hw?.arch === "x64" && hw.platform !== "darwin" && hw.gpu?.type === "intel",
|
|
58320
|
+
supports: (hw) => hw?.arch === "x64" && hw.platform !== "darwin" && (hw.gpu?.type === "intel" || hw.gpu?.type === "amd"),
|
|
58306
58321
|
devices: (hw) => {
|
|
58307
58322
|
if (!hw) return [AUTO];
|
|
58323
|
+
if (hw.gpu?.type === "amd") return [CPU];
|
|
58308
58324
|
const out = [AUTO, CPU];
|
|
58309
58325
|
if (hw.gpu?.type === "intel") out.push({
|
|
58310
58326
|
value: "gpu",
|
|
@@ -58415,6 +58431,24 @@ function scoreRuntimes(hw) {
|
|
|
58415
58431
|
available: true
|
|
58416
58432
|
});
|
|
58417
58433
|
}
|
|
58434
|
+
if (hw.gpu?.type === "amd") {
|
|
58435
|
+
scores.push({
|
|
58436
|
+
runtime: "python",
|
|
58437
|
+
backend: "onnx",
|
|
58438
|
+
format: "onnx",
|
|
58439
|
+
score: 75,
|
|
58440
|
+
reason: "ONNX WebGPU (AMD iGPU)",
|
|
58441
|
+
available: true
|
|
58442
|
+
});
|
|
58443
|
+
scores.push({
|
|
58444
|
+
runtime: "python",
|
|
58445
|
+
backend: "openvino",
|
|
58446
|
+
format: "openvino",
|
|
58447
|
+
score: 65,
|
|
58448
|
+
reason: "OpenVINO CPU (AMD x64)",
|
|
58449
|
+
available: true
|
|
58450
|
+
});
|
|
58451
|
+
}
|
|
58418
58452
|
if (hw.coral != null) scores.push({
|
|
58419
58453
|
runtime: "python",
|
|
58420
58454
|
backend: "edgetpu",
|
|
@@ -58470,6 +58504,7 @@ function enumerateInferenceDevices(hw) {
|
|
|
58470
58504
|
if (s.backend === "openvino") {
|
|
58471
58505
|
if (hw.npu?.type === "intel-npu") out.push(device("openvino", "npu", s.format, s.score + 2));
|
|
58472
58506
|
if (hw.gpu?.type === "intel") out.push(device("openvino", "gpu", s.format, s.score));
|
|
58507
|
+
if (hw.gpu?.type === "amd") out.push(device("openvino", "cpu", s.format, s.score));
|
|
58473
58508
|
continue;
|
|
58474
58509
|
}
|
|
58475
58510
|
if (s.backend === "edgetpu") {
|
|
@@ -58480,6 +58515,10 @@ function enumerateInferenceDevices(hw) {
|
|
|
58480
58515
|
}
|
|
58481
58516
|
continue;
|
|
58482
58517
|
}
|
|
58518
|
+
if (s.backend === "onnx" && s.reason.startsWith("ONNX WebGPU")) {
|
|
58519
|
+
out.push(device("onnx", "webgpu", s.format, s.score));
|
|
58520
|
+
continue;
|
|
58521
|
+
}
|
|
58483
58522
|
const dev = DEVICE_FOR_BACKEND[s.backend] ?? s.backend;
|
|
58484
58523
|
out.push(device(s.backend, dev, s.format, s.score));
|
|
58485
58524
|
}
|
|
@@ -29129,11 +29129,14 @@ var HardwareClassIdSchema = _enum([
|
|
|
29129
29129
|
"intel-n-series",
|
|
29130
29130
|
"apple-m-base",
|
|
29131
29131
|
"apple-m-pro",
|
|
29132
|
+
"amd-phoenix",
|
|
29132
29133
|
"unknown"
|
|
29133
29134
|
]);
|
|
29134
29135
|
var AcceleratorKindSchema = _enum([
|
|
29135
29136
|
"intel-npu",
|
|
29136
29137
|
"intel-igpu",
|
|
29138
|
+
"amd-igpu",
|
|
29139
|
+
"amd-npu",
|
|
29137
29140
|
"x86-cpu",
|
|
29138
29141
|
"arm-cpu",
|
|
29139
29142
|
"apple-ane",
|
|
@@ -39721,7 +39724,15 @@ var GpuInfoSchema = object({
|
|
|
39721
39724
|
name: string(),
|
|
39722
39725
|
memoryMB: number().optional()
|
|
39723
39726
|
});
|
|
39724
|
-
var NpuInfoSchema = object({
|
|
39727
|
+
var NpuInfoSchema = object({
|
|
39728
|
+
type: _enum([
|
|
39729
|
+
"apple-ane",
|
|
39730
|
+
"intel-npu",
|
|
39731
|
+
"amd-xdna"
|
|
39732
|
+
]),
|
|
39733
|
+
name: string().optional(),
|
|
39734
|
+
generation: _enum(["xdna1", "xdna2"]).optional()
|
|
39735
|
+
});
|
|
39725
39736
|
var CoralInfoSchema = object({
|
|
39726
39737
|
type: literal("coral-edgetpu"),
|
|
39727
39738
|
bus: string().optional()
|
|
@@ -58292,6 +58303,10 @@ var RUNTIMES = [
|
|
|
58292
58303
|
value: "cuda",
|
|
58293
58304
|
label: "CUDA"
|
|
58294
58305
|
});
|
|
58306
|
+
if (hw.gpu?.type === "amd") out.push({
|
|
58307
|
+
value: "webgpu",
|
|
58308
|
+
label: "WebGPU (AMD iGPU)"
|
|
58309
|
+
});
|
|
58295
58310
|
if (hw.npu?.type === "apple-ane") out.push({
|
|
58296
58311
|
value: "coreml",
|
|
58297
58312
|
label: "CoreML EP"
|
|
@@ -58302,9 +58317,10 @@ var RUNTIMES = [
|
|
|
58302
58317
|
},
|
|
58303
58318
|
{
|
|
58304
58319
|
id: "openvino",
|
|
58305
|
-
supports: (hw) => hw?.arch === "x64" && hw.platform !== "darwin" && hw.gpu?.type === "intel",
|
|
58320
|
+
supports: (hw) => hw?.arch === "x64" && hw.platform !== "darwin" && (hw.gpu?.type === "intel" || hw.gpu?.type === "amd"),
|
|
58306
58321
|
devices: (hw) => {
|
|
58307
58322
|
if (!hw) return [AUTO];
|
|
58323
|
+
if (hw.gpu?.type === "amd") return [CPU];
|
|
58308
58324
|
const out = [AUTO, CPU];
|
|
58309
58325
|
if (hw.gpu?.type === "intel") out.push({
|
|
58310
58326
|
value: "gpu",
|
|
@@ -58415,6 +58431,24 @@ function scoreRuntimes(hw) {
|
|
|
58415
58431
|
available: true
|
|
58416
58432
|
});
|
|
58417
58433
|
}
|
|
58434
|
+
if (hw.gpu?.type === "amd") {
|
|
58435
|
+
scores.push({
|
|
58436
|
+
runtime: "python",
|
|
58437
|
+
backend: "onnx",
|
|
58438
|
+
format: "onnx",
|
|
58439
|
+
score: 75,
|
|
58440
|
+
reason: "ONNX WebGPU (AMD iGPU)",
|
|
58441
|
+
available: true
|
|
58442
|
+
});
|
|
58443
|
+
scores.push({
|
|
58444
|
+
runtime: "python",
|
|
58445
|
+
backend: "openvino",
|
|
58446
|
+
format: "openvino",
|
|
58447
|
+
score: 65,
|
|
58448
|
+
reason: "OpenVINO CPU (AMD x64)",
|
|
58449
|
+
available: true
|
|
58450
|
+
});
|
|
58451
|
+
}
|
|
58418
58452
|
if (hw.coral != null) scores.push({
|
|
58419
58453
|
runtime: "python",
|
|
58420
58454
|
backend: "edgetpu",
|
|
@@ -58470,6 +58504,7 @@ function enumerateInferenceDevices(hw) {
|
|
|
58470
58504
|
if (s.backend === "openvino") {
|
|
58471
58505
|
if (hw.npu?.type === "intel-npu") out.push(device("openvino", "npu", s.format, s.score + 2));
|
|
58472
58506
|
if (hw.gpu?.type === "intel") out.push(device("openvino", "gpu", s.format, s.score));
|
|
58507
|
+
if (hw.gpu?.type === "amd") out.push(device("openvino", "cpu", s.format, s.score));
|
|
58473
58508
|
continue;
|
|
58474
58509
|
}
|
|
58475
58510
|
if (s.backend === "edgetpu") {
|
|
@@ -58480,6 +58515,10 @@ function enumerateInferenceDevices(hw) {
|
|
|
58480
58515
|
}
|
|
58481
58516
|
continue;
|
|
58482
58517
|
}
|
|
58518
|
+
if (s.backend === "onnx" && s.reason.startsWith("ONNX WebGPU")) {
|
|
58519
|
+
out.push(device("onnx", "webgpu", s.format, s.score));
|
|
58520
|
+
continue;
|
|
58521
|
+
}
|
|
58483
58522
|
const dev = DEVICE_FOR_BACKEND[s.backend] ?? s.backend;
|
|
58484
58523
|
out.push(device(s.backend, dev, s.format, s.score));
|
|
58485
58524
|
}
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-C2jSMJo_.js");
|
|
6
6
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Hn as hydrateSchema, Kt as motionDetectionCapability, Pn as BaseAddon, St as evaluateZoneRules, jn as DeviceType } from "../dist-
|
|
1
|
+
import { Hn as hydrateSchema, Kt as motionDetectionCapability, Pn as BaseAddon, St as evaluateZoneRules, jn as DeviceType } from "../dist-DFCl7PZV.mjs";
|
|
2
2
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-C2jSMJo_.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_chunk.__toESM(node_fs, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { En as buildFfmpegArgs, Mn as errMsg, Tn as Fmp4BoxSplitter, kn as isSoftwareDecode } from "./dist-
|
|
1
|
+
import { En as buildFfmpegArgs, Mn as errMsg, Tn as Fmp4BoxSplitter, kn as isSoftwareDecode } from "./dist-DFCl7PZV.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_custom_model_catalog = require("../custom-model-catalog-
|
|
6
|
+
const require_dist = require("../dist-C2jSMJo_.js");
|
|
7
|
+
const require_node = require("../node-B7ZinEw5.js");
|
|
8
|
+
const require_custom_model_catalog = require("../custom-model-catalog-B1oKNuAa.js");
|
|
9
9
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
10
10
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
11
11
|
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $t as pipelineRunnerCapability, Bn as defineCustomActions, E as FailureCounters, Et as failureContributionCapability, Ft as linkedStepOf, I as PIPELINE_RAMP, It as loadContributionCapability, Kn as nodePin, M as NativeLeaseAdmissionSchema, Mn as errMsg, N as NativeLeaseSettingsSchema, P as NodeBenchRunnerInputSchema, Pn as BaseAddon, Qn as boolean, Rn as createEvent, U as ROOT_SUPPLIABLE_STEP_IDS, Xn as _enum, Xt as pickDetailCropConvention, Z as allowedSuppliedEffect, Zn as array, Zt as pickNativeLeaseOverride, _ as DEFAULT_DETAIL_CROP_CONVENTION, _t as deriveRootFaceRefineRect, a as BackgroundRunRegistry, cr as EventCategory, er as lazy, fn as resolveRootSupply, ht as deriveDetailCropRect, it as cameraOwnsMotionViaSensor, j as MODEL_FORMATS, ln as resolveModelBoundSetting, m as CROP_SUPPLY_SOURCES, nr as number, or as string, pn as rootSuppliesOf, rr as object, rt as buildBenchStepTree, tr as literal, x as DEVICE_RAMP, y as DEFAULT_NATIVE_LEASE_SETTINGS, zn as customAction } from "../dist-
|
|
2
|
-
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
3
|
-
import { a as stepsForElectedPool, b as getStepDefinition, d as rootObjectGate, f as localFrameRegistry, h as resolveFrameViewGeometry, i as placeDetailStep, l as resolveDefaultDetectionModel, m as createSessionDecodeCoordinator, p as isSessionDecodeReadGone, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, y as getStep } from "../custom-model-catalog-
|
|
1
|
+
import { $t as pipelineRunnerCapability, Bn as defineCustomActions, E as FailureCounters, Et as failureContributionCapability, Ft as linkedStepOf, I as PIPELINE_RAMP, It as loadContributionCapability, Kn as nodePin, M as NativeLeaseAdmissionSchema, Mn as errMsg, N as NativeLeaseSettingsSchema, P as NodeBenchRunnerInputSchema, Pn as BaseAddon, Qn as boolean, Rn as createEvent, U as ROOT_SUPPLIABLE_STEP_IDS, Xn as _enum, Xt as pickDetailCropConvention, Z as allowedSuppliedEffect, Zn as array, Zt as pickNativeLeaseOverride, _ as DEFAULT_DETAIL_CROP_CONVENTION, _t as deriveRootFaceRefineRect, a as BackgroundRunRegistry, cr as EventCategory, er as lazy, fn as resolveRootSupply, ht as deriveDetailCropRect, it as cameraOwnsMotionViaSensor, j as MODEL_FORMATS, ln as resolveModelBoundSetting, m as CROP_SUPPLY_SOURCES, nr as number, or as string, pn as rootSuppliesOf, rr as object, rt as buildBenchStepTree, tr as literal, x as DEVICE_RAMP, y as DEFAULT_NATIVE_LEASE_SETTINGS, zn as customAction } from "../dist-DFCl7PZV.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-C12l0K5V.mjs";
|
|
3
|
+
import { a as stepsForElectedPool, b as getStepDefinition, d as rootObjectGate, f as localFrameRegistry, h as resolveFrameViewGeometry, i as placeDetailStep, l as resolveDefaultDetectionModel, m as createSessionDecodeCoordinator, p as isSessionDecodeReadGone, s as resolveDeviceEngine, t as CustomModelCatalog, u as macroGateVerdict, y as getStep } from "../custom-model-catalog-XCE-YLb2.mjs";
|
|
4
4
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
6
|
import { c as withDetectionIntent, o as preRollRequestOf, t as DETECTION_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-C2jSMJo_.js");
|
|
3
3
|
let node_fs = require("node:fs");
|
|
4
4
|
node_fs = require_chunk.__toESM(node_fs);
|
|
5
5
|
let node_child_process = require("node:child_process");
|
package/dist/recorder/index.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
6
|
+
const require_dist = require("../dist-C2jSMJo_.js");
|
|
7
|
+
const require_node = require("../node-B7ZinEw5.js");
|
|
8
8
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
9
9
|
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
10
10
|
const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
|
package/dist/recorder/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { An as DeviceFeature, B as RECORDING_EXPORT_MAX_READ_BYTES, Bn as defineCustomActions, Bt as mayReadLocation, C as EVENT_PAD_MS, Ct as evictionPolicyForMode, Dn as evaluateSensorEdge, F as OpsLogEntrySchema, G as RecordingSignalStatusSchema, H as RECORDING_SOURCE_CAMSTACK_ADDON, Hn as hydrateSchema, Ht as memoizePinnedFfmpeg, It as loadContributionCapability, J as VISIT_MERGE_GAP_MS, Jn as selectAssignedProfileSlots, Kn as nodePin, Mn as errMsg$1, Nt as isFirstLevelMacroClass, Ot as gbToBytes, Pn as BaseAddon, Qn as boolean, S as EVENT_OWNER_TYPES, T as ExportRecordSchema, Tt as exportSubjectOf, Ut as migrateLegacyDeviceSignalConfig, V as RECORDING_SOURCE_CAMSTACK, Vt as mayWriteToLocation, W as RecordingConfigSchema, Wt as modeMayWrite, Xn as _enum, Yn as sleep$1, Zn as array, _n as storageOccupancyCapability, ar as record, cn as resolveLocationMode, cr as EventCategory, dn as resolveRecordingProfiles, gn as storageEvictableCapability, gt as deriveRecordingMode, in as recordingSignalCapability, ir as preprocess, jn as DeviceType, mt as deriveBatteryPresence, nn as recordingCapability, nr as number, nt as batteryCapability, o as BatteryStatusSchema, on as resolveCreateExportSubject, or as string, ot as clipExportFailure, q as VIDEOCLIPS_MAX_OFFER_BYTES, rn as recordingExportCapability, rr as object, s as CLIP_BROKER_PACED_RATES, st as clipExportFailureOf, tn as recordingArchiveCapability, v as DEFAULT_EVENTS_BAND_BUFFER_SEC, wt as evictionPolicyOfLocation, xn as videoclipsCapability, yn as stripRetiredBandPreBufferSec, zn as customAction } from "../dist-
|
|
2
|
-
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
1
|
+
import { An as DeviceFeature, B as RECORDING_EXPORT_MAX_READ_BYTES, Bn as defineCustomActions, Bt as mayReadLocation, C as EVENT_PAD_MS, Ct as evictionPolicyForMode, Dn as evaluateSensorEdge, F as OpsLogEntrySchema, G as RecordingSignalStatusSchema, H as RECORDING_SOURCE_CAMSTACK_ADDON, Hn as hydrateSchema, Ht as memoizePinnedFfmpeg, It as loadContributionCapability, J as VISIT_MERGE_GAP_MS, Jn as selectAssignedProfileSlots, Kn as nodePin, Mn as errMsg$1, Nt as isFirstLevelMacroClass, Ot as gbToBytes, Pn as BaseAddon, Qn as boolean, S as EVENT_OWNER_TYPES, T as ExportRecordSchema, Tt as exportSubjectOf, Ut as migrateLegacyDeviceSignalConfig, V as RECORDING_SOURCE_CAMSTACK, Vt as mayWriteToLocation, W as RecordingConfigSchema, Wt as modeMayWrite, Xn as _enum, Yn as sleep$1, Zn as array, _n as storageOccupancyCapability, ar as record, cn as resolveLocationMode, cr as EventCategory, dn as resolveRecordingProfiles, gn as storageEvictableCapability, gt as deriveRecordingMode, in as recordingSignalCapability, ir as preprocess, jn as DeviceType, mt as deriveBatteryPresence, nn as recordingCapability, nr as number, nt as batteryCapability, o as BatteryStatusSchema, on as resolveCreateExportSubject, or as string, ot as clipExportFailure, q as VIDEOCLIPS_MAX_OFFER_BYTES, rn as recordingExportCapability, rr as object, s as CLIP_BROKER_PACED_RATES, st as clipExportFailureOf, tn as recordingArchiveCapability, v as DEFAULT_EVENTS_BAND_BUFFER_SEC, wt as evictionPolicyOfLocation, xn as videoclipsCapability, yn as stripRetiredBandPreBufferSec, zn as customAction } from "../dist-DFCl7PZV.mjs";
|
|
2
|
+
import { a as physicalRootOf, i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-C12l0K5V.mjs";
|
|
3
3
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
4
4
|
import { d as PREBUFFER_MAX_MS, l as withRecordingIntent, r as RECORDING_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
|
|
5
5
|
import { n as RowMapStore, t as retireRootKeys } from "../retire-root-keys-DZvlso2l.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { Mn as errMsg } from "./dist-
|
|
2
|
+
import { Mn as errMsg } from "./dist-DFCl7PZV.mjs";
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
//#region src/stream-broker/recorded/avcc-annexb.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-C2jSMJo_.js");
|
|
3
3
|
let node_child_process = require("node:child_process");
|
|
4
4
|
//#region src/stream-broker/recorded/avcc-annexb.ts
|
|
5
5
|
/**
|
|
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
|
|
|
3
3
|
var e = {
|
|
4
4
|
"@camstack/sdk": {
|
|
5
5
|
name: "@camstack/sdk",
|
|
6
|
-
version: "1.2.
|
|
6
|
+
version: "1.2.129",
|
|
7
7
|
scope: ["default"],
|
|
8
8
|
loaded: !1,
|
|
9
9
|
from: "addon_stream_broker_widgets",
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.2.
|
|
21
|
+
version: "1.2.338",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_stream_broker_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.2.
|
|
36
|
+
version: "1.2.258",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_stream_broker_widgets",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_segment_demux_js = require("../segment-demux-js-
|
|
1
|
+
const require_segment_demux_js = require("../segment-demux-js-B2IxTWms.js");
|
|
2
2
|
let node_worker_threads = require("node:worker_threads");
|
|
3
3
|
//#region src/stream-broker/recorded/demux-worker-child.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as demuxSegmentFullJs } from "../segment-demux-js-
|
|
1
|
+
import { t as demuxSegmentFullJs } from "../segment-demux-js-7l4LsdU4.mjs";
|
|
2
2
|
import { parentPort } from "node:worker_threads";
|
|
3
3
|
//#region src/stream-broker/recorded/demux-worker-child.ts
|
|
4
4
|
/**
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.338",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -45,7 +45,7 @@ async function r() {
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"@camstack/sdk": {
|
|
48
|
-
version: "1.2.
|
|
48
|
+
version: "1.2.129",
|
|
49
49
|
scope: "default",
|
|
50
50
|
shareConfig: {
|
|
51
51
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.258",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -3,12 +3,12 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
6
|
+
const require_dist = require("../dist-C2jSMJo_.js");
|
|
7
|
+
const require_node = require("../node-B7ZinEw5.js");
|
|
8
8
|
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
9
9
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
10
10
|
const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
|
|
11
|
-
const require_segment_demux_js = require("../segment-demux-js-
|
|
11
|
+
const require_segment_demux_js = require("../segment-demux-js-B2IxTWms.js");
|
|
12
12
|
let node_os = require("node:os");
|
|
13
13
|
node_os = require_chunk.__toESM(node_os);
|
|
14
14
|
let node_crypto = require("node:crypto");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as __toESM } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { $n as discriminatedUnion, An as DeviceFeature, At as gifFromMp4Args, Cn as AUDIO_PRESETS, D as G711_SCALE_CORRECTION_DB, Dt as ffmpegRate, En as buildFfmpegArgs, Fn as CAM_PROFILE_ORDER, Gn as makeSourceBrokerId, Ht as memoizePinnedFfmpeg, In as CamProfileSchema, It as loadContributionCapability, K as RingBuffer, Kn as nodePin, Lt as logChannelsCapability, Mn as errMsg, Nn as BOOT_RECOVERY_BACKOFF_MS, On as invocationFromEncodeProfile, Pn as BaseAddon, Qn as boolean, R as RATE_CONTROL_RELAXED, Rn as createEvent, Sn as webrtcSessionCapability, Un as isEvent, Vn as expandAudioChunkToF32le, Wn as makeProfileBrokerId, X as addonWidgetsSourceCapability, Xn as _enum, Zn as array, ar as record, at as cameraStreamsCapability, bt as egressTransportFromRequest, c as CLIP_STILL_REASON_CODE_HEADER, cr as EventCategory, dt as createLogChannelsProvider, en as rankStreams, ft as declareLogChannel, jn as DeviceType, kn as isSoftwareDecode, kt as gifDeriveSpeed, mt as deriveBatteryPresence, nr as number, nt as batteryCapability, o as BatteryStatusSchema, or as string, qn as parseProfileBrokerId, rr as object, s as CLIP_BROKER_PACED_RATES, sn as resolveEgressDecodeHwAccel, sr as union, st as clipExportFailureOf, tr as literal, ut as createHwAccelCache, vn as streamBrokerCapability, w as EncodeProfileSchema, yt as egressTranscodeSharingKey, z as RATE_CONTROL_TIGHT, zt as maskUrlCredentials } from "../dist-
|
|
3
|
-
import { i as NO_COST_CLAIM, n as Fmp4FragmentChild, o as probeFfmpegBinary, r as Fmp4FragmentPlane, t as ChildCostRegistry } from "../node-
|
|
2
|
+
import { $n as discriminatedUnion, An as DeviceFeature, At as gifFromMp4Args, Cn as AUDIO_PRESETS, D as G711_SCALE_CORRECTION_DB, Dt as ffmpegRate, En as buildFfmpegArgs, Fn as CAM_PROFILE_ORDER, Gn as makeSourceBrokerId, Ht as memoizePinnedFfmpeg, In as CamProfileSchema, It as loadContributionCapability, K as RingBuffer, Kn as nodePin, Lt as logChannelsCapability, Mn as errMsg, Nn as BOOT_RECOVERY_BACKOFF_MS, On as invocationFromEncodeProfile, Pn as BaseAddon, Qn as boolean, R as RATE_CONTROL_RELAXED, Rn as createEvent, Sn as webrtcSessionCapability, Un as isEvent, Vn as expandAudioChunkToF32le, Wn as makeProfileBrokerId, X as addonWidgetsSourceCapability, Xn as _enum, Zn as array, ar as record, at as cameraStreamsCapability, bt as egressTransportFromRequest, c as CLIP_STILL_REASON_CODE_HEADER, cr as EventCategory, dt as createLogChannelsProvider, en as rankStreams, ft as declareLogChannel, jn as DeviceType, kn as isSoftwareDecode, kt as gifDeriveSpeed, mt as deriveBatteryPresence, nr as number, nt as batteryCapability, o as BatteryStatusSchema, or as string, qn as parseProfileBrokerId, rr as object, s as CLIP_BROKER_PACED_RATES, sn as resolveEgressDecodeHwAccel, sr as union, st as clipExportFailureOf, tr as literal, ut as createHwAccelCache, vn as streamBrokerCapability, w as EncodeProfileSchema, yt as egressTranscodeSharingKey, z as RATE_CONTROL_TIGHT, zt as maskUrlCredentials } from "../dist-DFCl7PZV.mjs";
|
|
3
|
+
import { i as NO_COST_CLAIM, n as Fmp4FragmentChild, o as probeFfmpegBinary, r as Fmp4FragmentPlane, t as ChildCostRegistry } from "../node-C12l0K5V.mjs";
|
|
4
4
|
import { a as parseRestreamPath, d as PREBUFFER_MAX_MS, f as capPreRollRequestMs, i as isLiveEdgeOnlyDial, m as resolvePrebuffer, n as NO_DECLARATION, p as prebufferRetentionMs, s as sdpVariantFor, u as withSentryIntent } from "../restream-intent-DyGmLAU9.mjs";
|
|
5
5
|
import { n as profileForStreamId } from "../remote-restream-BeHi78PZ.mjs";
|
|
6
6
|
import { n as RowMapStore, t as retireRootKeys } from "../retire-root-keys-DZvlso2l.mjs";
|
|
7
|
-
import { a as require_mp4box_all, c as parseNalLengthSize, i as runFfmpegOnce, n as demuxSegmentPreferJs, o as avccSampleToAnnexB, r as FfmpegFallbackRefusedError, s as buildKeyframeAnnexB, t as demuxSegmentFullJs } from "../segment-demux-js-
|
|
7
|
+
import { a as require_mp4box_all, c as parseNalLengthSize, i as runFfmpegOnce, n as demuxSegmentPreferJs, o as avccSampleToAnnexB, r as FfmpegFallbackRefusedError, s as buildKeyframeAnnexB, t as demuxSegmentFullJs } from "../segment-demux-js-7l4LsdU4.mjs";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import * as os$1 from "node:os";
|
|
10
10
|
import { networkInterfaces, tmpdir } from "node:os";
|
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-VwFAKiPW.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-pipeline",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.350",
|
|
4
4
|
"description": "Pipeline bundle — runner, detection, motion, audio + stream broker. Multi-entry npm package shipping pipeline addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
package/python/inference_pool.py
CHANGED
|
@@ -448,6 +448,9 @@ def _resolve_ov_devices(available: list[str], full_names: dict[str, str]) -> lis
|
|
|
448
448
|
ONNX_CUDA_EP = "CUDAExecutionProvider"
|
|
449
449
|
ONNX_COREML_EP = "CoreMLExecutionProvider"
|
|
450
450
|
ONNX_CPU_EP = "CPUExecutionProvider"
|
|
451
|
+
# Plugin EP (onnxruntime-ep-webgpu) — registered at session load, not in
|
|
452
|
+
# get_available_providers() until register_execution_provider_library runs.
|
|
453
|
+
ONNX_WEBGPU_EP_REGISTRATION = "webgpu_ep_registration"
|
|
451
454
|
|
|
452
455
|
|
|
453
456
|
def _resolve_onnx_providers(
|
|
@@ -468,6 +471,8 @@ def _resolve_onnx_providers(
|
|
|
468
471
|
Deliberate adaptations for camstack:
|
|
469
472
|
- an operator device pin is honored: "cuda"/"coreml" put that EP first
|
|
470
473
|
(CPU still last as fallback); "cpu" compiles CPU only.
|
|
474
|
+
- "webgpu" is NOT handled here — it uses the plugin-EP SessionOptions
|
|
475
|
+
path in `_load_onnx_webgpu_session` (ORT ≥1.24 + onnxruntime-ep-webgpu).
|
|
471
476
|
- hardware entries not present in `available`
|
|
472
477
|
(ort.get_available_providers()) are dropped — camstack ships the
|
|
473
478
|
plain `onnxruntime` wheel on most nodes, and requesting an EP the
|
|
@@ -481,8 +486,9 @@ def _resolve_onnx_providers(
|
|
|
481
486
|
ordered.append((ONNX_CUDA_EP, {"device_id": cuda_device_id}))
|
|
482
487
|
elif dev == "coreml":
|
|
483
488
|
ordered.append(ONNX_COREML_EP)
|
|
484
|
-
elif dev
|
|
485
|
-
|
|
489
|
+
elif dev in ("cpu", "webgpu"):
|
|
490
|
+
# webgpu uses the plugin path; if we fall through here it must be CPU only.
|
|
491
|
+
pass
|
|
486
492
|
else:
|
|
487
493
|
# AUTO/default — platform-driven ordering.
|
|
488
494
|
if plat == "darwin":
|
|
@@ -497,6 +503,57 @@ def _resolve_onnx_providers(
|
|
|
497
503
|
return providers
|
|
498
504
|
|
|
499
505
|
|
|
506
|
+
def _load_onnx_webgpu_session(ort, path: str):
|
|
507
|
+
"""Build an InferenceSession on the WebGPU plugin EP, CPU fallback on miss.
|
|
508
|
+
|
|
509
|
+
Registers `onnxruntime-ep-webgpu`, picks the first OrtEpDevice whose ep_name
|
|
510
|
+
matches the plugin, and attaches it via SessionOptions.add_provider_for_devices.
|
|
511
|
+
Any failure (missing wheel, no adapter, old ORT) falls back to CPU so the
|
|
512
|
+
pool still loads — the stderr line names which path won.
|
|
513
|
+
"""
|
|
514
|
+
try:
|
|
515
|
+
import onnxruntime_ep_webgpu as webgpu_ep # type: ignore
|
|
516
|
+
except Exception as err:
|
|
517
|
+
sys.stderr.write(f"ONNX WebGPU: plugin import failed ({err}); CPU fallback\n")
|
|
518
|
+
sys.stderr.flush()
|
|
519
|
+
return ort.InferenceSession(path, providers=[ONNX_CPU_EP]), [ONNX_CPU_EP]
|
|
520
|
+
|
|
521
|
+
try:
|
|
522
|
+
ort.register_execution_provider_library(
|
|
523
|
+
ONNX_WEBGPU_EP_REGISTRATION, webgpu_ep.get_library_path()
|
|
524
|
+
)
|
|
525
|
+
except Exception as err:
|
|
526
|
+
# Already registered across pool workers is fine; other errors → CPU.
|
|
527
|
+
msg = str(err).lower()
|
|
528
|
+
if "already" not in msg and "exist" not in msg:
|
|
529
|
+
sys.stderr.write(f"ONNX WebGPU: register failed ({err}); CPU fallback\n")
|
|
530
|
+
sys.stderr.flush()
|
|
531
|
+
return ort.InferenceSession(path, providers=[ONNX_CPU_EP]), [ONNX_CPU_EP]
|
|
532
|
+
|
|
533
|
+
ep_name = webgpu_ep.get_ep_name()
|
|
534
|
+
webgpu_device = next(
|
|
535
|
+
(d for d in ort.get_ep_devices() if getattr(d, "ep_name", None) == ep_name),
|
|
536
|
+
None,
|
|
537
|
+
)
|
|
538
|
+
if webgpu_device is None:
|
|
539
|
+
sys.stderr.write(
|
|
540
|
+
f"ONNX WebGPU: no OrtEpDevice for {ep_name!r} "
|
|
541
|
+
f"(Vulkan/libvulkan missing?); CPU fallback\n"
|
|
542
|
+
)
|
|
543
|
+
sys.stderr.flush()
|
|
544
|
+
return ort.InferenceSession(path, providers=[ONNX_CPU_EP]), [ONNX_CPU_EP]
|
|
545
|
+
|
|
546
|
+
sess_options = ort.SessionOptions()
|
|
547
|
+
sess_options.add_provider_for_devices([webgpu_device], {})
|
|
548
|
+
session = ort.InferenceSession(path, sess_options=sess_options)
|
|
549
|
+
active = list(session.get_providers())
|
|
550
|
+
sys.stderr.write(
|
|
551
|
+
f"ONNX WebGPU: providers={active} ep={ep_name} device=webgpu\n"
|
|
552
|
+
)
|
|
553
|
+
sys.stderr.flush()
|
|
554
|
+
return session, active
|
|
555
|
+
|
|
556
|
+
|
|
500
557
|
# ---------------------------------------------------------------------------
|
|
501
558
|
# CoreML persistent compiled-model cache
|
|
502
559
|
# ---------------------------------------------------------------------------
|
|
@@ -1328,28 +1385,33 @@ def _load_model(slot: ModelSlot, config: dict) -> None:
|
|
|
1328
1385
|
elif _runtime == "onnxruntime":
|
|
1329
1386
|
ort = _runtime_lib
|
|
1330
1387
|
ort_device = str(config.get("device", "") or "")
|
|
1331
|
-
#
|
|
1332
|
-
#
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1388
|
+
# WebGPU uses the plugin-EP SessionOptions path (ORT ≥1.24); everything
|
|
1389
|
+
# else uses the classic providers= list (see _resolve_onnx_providers).
|
|
1390
|
+
if ort_device.strip().lower() == "webgpu":
|
|
1391
|
+
session, active_list = _load_onnx_webgpu_session(ort, path)
|
|
1392
|
+
_active_eps = [p for p in active_list if p != ONNX_CPU_EP]
|
|
1393
|
+
sys.stderr.write(
|
|
1394
|
+
f"ONNX: execution provider {', '.join(_active_eps) or ONNX_CPU_EP} "
|
|
1395
|
+
f"(device=webgpu)\n"
|
|
1396
|
+
)
|
|
1397
|
+
sys.stderr.flush()
|
|
1398
|
+
else:
|
|
1399
|
+
try:
|
|
1400
|
+
available_eps = list(ort.get_available_providers())
|
|
1401
|
+
except Exception:
|
|
1402
|
+
available_eps = [ONNX_CPU_EP]
|
|
1403
|
+
providers = _resolve_onnx_providers(
|
|
1404
|
+
ort_device, sys.platform, platform.machine(), available_eps,
|
|
1405
|
+
)
|
|
1406
|
+
session = ort.InferenceSession(path, providers=providers)
|
|
1407
|
+
_active_eps = [p for p in session.get_providers() if p != ONNX_CPU_EP]
|
|
1408
|
+
_requested = [p[0] if isinstance(p, tuple) else p for p in providers]
|
|
1409
|
+
sys.stderr.write(
|
|
1410
|
+
f"ONNX: execution provider {', '.join(_active_eps) or ONNX_CPU_EP} "
|
|
1411
|
+
f"(device={ort_device or 'auto'}, requested={_requested}, "
|
|
1412
|
+
f"available={available_eps})\n"
|
|
1413
|
+
)
|
|
1414
|
+
sys.stderr.flush()
|
|
1353
1415
|
output_names = [o.name for o in session.get_outputs()]
|
|
1354
1416
|
slot.config["_input_name"] = session.get_inputs()[0].name
|
|
1355
1417
|
# Declared input layout (ArcFace/CLIP are NHWC) → correct preprocess.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# ONNX Runtime WebGPU plugin EP — AMD iGPU (RADV) and other Vulkan adapters.
|
|
2
|
+
# Requires a compatible core ORT (plugin refuses older builds at register time).
|
|
3
|
+
# Installed lazily when the node offers `onnx:webgpu` (see runtime-packages /
|
|
4
|
+
# shouldInstallWebgpu). Does NOT replace requirements-onnxruntime.txt for the
|
|
5
|
+
# CPU/CUDA path — a node that only needs the floor keeps the lighter pin.
|
|
6
|
+
onnxruntime>=1.24.4,<2
|
|
7
|
+
onnxruntime-ep-webgpu>=0.4.0,<1
|
|
@@ -232,6 +232,16 @@ class ResolveOnnxProvidersTest(unittest.TestCase):
|
|
|
232
232
|
[ONNX_CPU_EP],
|
|
233
233
|
)
|
|
234
234
|
|
|
235
|
+
def test_webgpu_pin_is_cpu_only_in_classic_resolver(self) -> None:
|
|
236
|
+
# WebGPU uses the plugin SessionOptions path; the classic resolver
|
|
237
|
+
# must not inject CUDA when device=webgpu (would race the plugin load).
|
|
238
|
+
self.assertEqual(
|
|
239
|
+
_resolve_onnx_providers(
|
|
240
|
+
"webgpu", "linux", "x86_64", [ONNX_CUDA_EP, ONNX_CPU_EP],
|
|
241
|
+
),
|
|
242
|
+
[ONNX_CPU_EP],
|
|
243
|
+
)
|
|
244
|
+
|
|
235
245
|
def test_cuda_pin_orders_cuda_first_cpu_last(self) -> None:
|
|
236
246
|
self.assertEqual(
|
|
237
247
|
_resolve_onnx_providers(
|