WebNN Flags in Chromium based Browsers
Flags
Visit via about://flags/
#web-machine-learning-neural-network
Name | Enables WebNN API |
---|---|
Description | Enables the Web Machine Learning Neural Network (WebNN) API. Spec at https://www.w3.org/TR/webnn/ – Mac, Windows, Linux, ChromeOS, Android. |
Expiry Milestone | 150 |
Command Line Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --enable-features=WebMachineLearningNeuralNetwork |
%LOCALAPPDATA%
meansC:\Users\<username>\AppData\Local\
#webnn-onnxruntime
Name | Windows ML / ONNX Runtime backend for WebNN |
---|---|
Description | Enables using ONNX Runtime for CPU, GPU and NPU inference with the WebNN API. Disabling this flag enables a fallback to DirectML or TFLite. – Windows |
Expiry Milestone | 146 |
Command Line Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --enable-features=WebMachineLearningNeuralNetwork,WebNNOnnxRuntime |
#experimental-web-machine-learning-neural-network
Name | Enables experimental WebNN API features |
---|---|
Description | Enables additional, experimental features in Web Machine Learning Neural Network (WebNN) API. Requires the “WebNN API” flag to be enabled. – Mac, Windows, Linux, ChromeOS, Android. |
Expiry Milestone | 150 |
Command Line Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --enable-features=EnablesExperimentalWebNNAPIFeatures |
#webnn-coreml
Name | Core ML backend for WebNN |
---|---|
Description | Enables using Core ML for GPU and NPU inference with the WebNN API |
Expiry Milestone | 146 |
#webnn-coreml-explicit-gpu-or-npu
Name | Core ML backend (explicit GPU or NPU) for WebNN |
---|---|
Description | Enables using Core ML for explicit GPU and NPU inference with the WebNN API |
Expiry Milestone | 146 |
#webnn-directml
Name | DirectML backend for WebNN |
---|---|
Description | Enables using DirectML for GPU and NPU inference with the WebNN API. Disabling this flag enables a fallback to TFLite. – Windows. |
Expiry Milestone | 146 |
Switches (Command Line Flags)
--use-redist-dml
Name | Use redistributable DirectML |
---|---|
Description | Try to use a redistributable DirectML.dll. Used for testing WebNN against newer DirectML release before it is integrated into Windows OS. Please see more info about DirectML releases . |
Note | DirectML was officially deprecated during Microsoft Build 2025. WebNN will leverage Windows ML to access OpenVINO and other EPs to get hardware acceleration. |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --use-redist-dml |
--disable_dml_meta_commands_for_gpu
Name | Disable DirectML Metacommands for GPU |
---|---|
Description | Run with DirectML fallback shaders if disabling Metacommands |
Note | DirectML was officially deprecated during Microsoft Build 2025. WebNN will leverage Windows ML to access OpenVINO and other EPs to get hardware acceleration. |
Usage (true) | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_dml_meta_commands_for_gpu=1 |
Usage (false) | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_dml_meta_commands_for_gpu=0 |
--disable_webnn_for_gpu
Name | Disable WebNN for GPU |
---|---|
Description | If --disable_webnn_for_gpu workaround is enabled for the GPU device, we need to check to see if there is a NPU device available before setting the WebNN gpu feature status. |
Usage (true) | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_webnn_for_gpu=1 |
--disable_webnn_for_npu
Name | Disable WebNN for NPU |
---|---|
Description | If there is a NPU device, check the --disable_webnn_for_npu workaround |
Usage (true) | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_webnn_for_npu=1 |
Usage (false) | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable_webnn_for_npu=0 |
--webnn-coreml-dump-model
Name | WebNN Core ML Dump Model |
---|---|
Description | Copy the generated Core ML model |
Note | The folder needs to be accessible from the GPU sandbox or use --no-sandbox |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-coreml-dump-model=/tmp/CoreMLModels |
--webnn-tflite-dump-model
Name | WebNN TFLite Dump Model |
---|---|
Description | Save the generated TFLite model file |
Note | The folder needs to be accessible from the GPU process sandbox or --no-sandbox must be used |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-tflite-dump-model=/tmp/tflite_models |
--webnn-ort-logging-level
Name | WebNN ONNX Runtime Logging Level |
---|---|
Description | Configure the logging severity level of ONNX Runtime |
Note | ”VERBOSE”, other severity levels could be “INFO”, “WARNING”, “ERROR” (default), and “FATAL” |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-logging-level=VERBOSE |
--webnn-ort-dump-model
Name | WebNN Windows ML Dump Model |
---|---|
Description | To save optimized ONNX model after graph level transformations |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-ort-dump-model=/tmp/ort_models |
--webnn-ort-library-path-for-testing
Name | WebNN ONNX Runtime Library Path For Testing |
---|---|
Description | Force onnxruntime.dll to be loaded from a location specified by the switch for testing development ORT build. |
Note | This switch is not to be used in shipping scenarios and is ignored by default |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-library-path-for-testing="C:\Program Files\ONNXRuntime" --allow-third-party-modules |
--webnn-ort-ep-library-path-for-testing
Name | WebNN ONNX Runtime Execution Provider Library Path For Testing |
---|---|
Description | Specify the ORT EP name and library path pair via this switch for testing development EP builds. Libraries of the ORT EP specified by the EP name are forced to be loaded from the specified path. The value should be in the format <ep_name>?<ep_library_path> . |
Note | This switch is not to be used in shipping scenarios and is ignored by default |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-ep-library-path-for-testing=OpenVINOExecutionProvider?"C:\Program Files\ONNXRuntime-EP\onnxruntime_providers_openvino_plugin.dll" --allow-third-party-modules |
--webnn-ort-graph-optimization-level
Name | WebNN ONNX Runtime Graph Optimization Level |
---|---|
Description | Configure the graph optimization level of ONNX Runtime |
Note | Levels could be “DISABLE_ALL”, “BASIC”, “EXTENDED” and “ALL” |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --webnn-ort-graph-optimization-level=DISABLE_ALL |
--webnn-ort-enable-profiling
Name | WebNN ONNX Runtime Enable Profiling |
---|---|
Description | Collect ORT profile data for performance analysis. The profile data file is generated in Chrome’s folder with a fixed naming format prefix_date_time.json . |
Note | The prefix can be provided by user or use WebNNOrtProfile as default |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox --webnn-ort-enable-profiling="WebNNOrtOvCpuProfile" |
Other Switches
--disable-gpu-sandbox
Name | Disable GPU Sandbox |
---|---|
Description | Often used to fix crashes related to the GPU process. Should only be used when necessary for development or troubleshooting, as it makes the application vulnerable to exploits. |
Note | This is an insecure configuration. After performing the test, you should quit Chrome and re-launch normally. |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --disable-gpu-sandbox |
--no-sandbox
Name | No Sandbox |
---|---|
Description | Disables Chromium’s security sandbox, which isolates browser processes to prevent malicious code execution. While sometimes used in development/testing environments, using this flag in regular browsing is dangerous as it removes essential security protections. |
Note | This is an insecure configuration. After performing the test, you should quit Chrome and re-launch normally. |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --no-sandbox |
--allow-third-party-modules
Name | Allow Third-party Modules |
---|---|
Description | Permits third-party software to inject DLLs or modules into Chrome’s processes |
Note | While useful for legitimate software like antivirus or accessibility tools, it can pose security risks by allowing potentially malicious code injection. |
Usage | "%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe" --allow-third-party-modules |
Additional Resources
Last updated on