Overview
Request 6246 (accepted)
Fixes build in Tumbleweed
- Update to 1.1.13
- Update onnxruntime to 1.17.1.tgz
- Add patch to fix a cmake error:
* fix-cmake-error.patch
- 1.1.6
- Update to 1.1.13
* Add video_tick function to background filter info
* Update Onnxruntime version and fix Windows compilerconfig
- Update to 1.1.12
* Critical bugfix in the PSNR calculation for image-similarity
skipping in background filter
- Update to 1.1.11
* New! RMBG model from Bria.AI
https://huggingface.co/briaai/RMBG-1.4 - remove background from
any object! (not just human)
* We got rid of the annoying "update available" message in favor
of a more discreet message on the plugin settings.
* Better handling of local file paths on Windows
* more.
- Update to 1.1.10
* This release will fix the Flatpak recipe for Linux after the
dependency bump, as well as removing the start menu option from
the Windows installer.
- Update to 1.1.9
* In this release we bumped versions of OpenCV and ONNXRuntime,
and trying to get rid of the annoying "smart screen" block on
Windows. We're also rolling out releases through AUR, Pacstall
obs-backgroundremoval.changes
Changed
-------------------------------------------------------------------
+Tue Feb 18 12:35:51 UTC 2025 - Antonio Larrosa <alarrosa@suse.com>
+
+- Update to 1.1.13
+ * Add video_tick function to background filter info
+ * Update Onnxruntime version and fix Windows compilerconfig
+- Update to 1.1.12
+ * Critical bugfix in the PSNR calculation for image-similarity
+ skipping in background filter
+- Update to 1.1.11
+ * New! RMBG model from Bria.AI
+ https://huggingface.co/briaai/RMBG-1.4 - remove background from
+ any object! (not just human)
+ * We got rid of the annoying "update available" message in favor
+ of a more discreet message on the plugin settings.
+ * Better handling of local file paths on Windows
+ * more.
+- Update to 1.1.10
+ * This release will fix the Flatpak recipe for Linux after the
+ dependency bump, as well as removing the start menu option from
+ the Windows installer.
+- Update to 1.1.9
+ * In this release we bumped versions of OpenCV and ONNXRuntime,
+ and trying to get rid of the annoying "smart screen" block on
+ Windows. We're also rolling out releases through AUR, Pacstall
+ and Flatpak. 💪 Linux!
+- Update to 1.1.8
+ * In this release we're introducing "simple mode" that hides most
+ of the settings under an "Advanced" checkbox, which should make
+ it far easier for newcomers to start using the filter without
+ "settings shock".
+ * Additionaly we implemented "temporal smoothing" that helps with
+ reducing the flickering of the edges in the binary mask.
+ * We bumped ONNX Runtime to v1.16.3 that increases robustness and
+ speed.
+ * We fixed the bug of the updater popping up the dialog because
+ we changed the repo URL.
+- Update to 1.1.7
+ * Upgrade to ONNXRuntime 1.16 which improves speed and
+ robustness.
+ * Repackaging of Mac OS release to a more consistent with Apple
+ dev tools.
+ * Fix crashes and bugs on Linux
+ * We added a new "website" for the plugin, which will eventually
+ have more installation info
+ https://occ-ai.github.io/obs-backgroundremoval/
+ * Adding a detailed log message with plugin info which helps us
+ debug
+
+- Update onnxruntime to 1.17.1.tgz
+- Use Source URLs in the spec file
+- Add patch to fix a cmake error:
+ * fix-cmake-error.patch
+
+-------------------------------------------------------------------
Thu Sep 21 13:50:09 UTC 2023 - Kaito Udagawa <umireon@gmail.com>
-1.1.6
+- 1.1.6
obs-backgroundremoval.spec
Changed
Name: obs-backgroundremoval
-Version: 1.1.6
+Version: 1.1.13
Release: 0
Summary: OBS Plugin for Background Removal
License: GPL-2.0
-URL: https://github.com/royshil/obs-backgroundremoval
-Source: %{name}-%{version}.tar.gz
+URL: https://github.com/locaal-ai/obs-backgroundremoval
+Source: https://github.com/locaal-ai/%{name}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Source2: opencv-linux-Release-4.8.0-1.tar.gz
-Source3: onnxruntime-linux-x64-gpu-1.15.1.tgz
+Source3: https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/onnxruntime-linux-x64-gpu-1.17.1.tgz
+Patch0: fix-cmake-error.patch
BuildRequires: cmake
BuildRequires: gcc12-c++
BuildRequires: libcurl-devel
An OBS plugin for removing background in portrait images (video), making it easy to replace the background when screen recording.
%prep
-%autosetup
+%autosetup -p1
%build
%cmake \
-DCUSTOM_OPENCV_URL=%{SOURCE2} \
-DCUSTOM_OPENCV_HASH=MD5=7a668fbc3ac536812643c6b8c8f96be9 \
-DCUSTOM_ONNXRUNTIME_URL=%{SOURCE3} \
- -DCUSTOM_ONNXRUNTIME_MD5=8d2f5ee9f449bdecb10a45715fe74c53
+ -DCUSTOM_ONNXRUNTIME_HASH=MD5=da53e83b3ad3ab2cf46fbabd6a648a9d
%cmake_build
%install
fix-cmake-error.patch
Added
+Index: obs-backgroundremoval-1.1.13/cmake/common/helpers_common.cmake
+===================================================================
+--- obs-backgroundremoval-1.1.13.orig/cmake/common/helpers_common.cmake
++++ obs-backgroundremoval-1.1.13/cmake/common/helpers_common.cmake
+@@ -86,7 +86,6 @@ macro(find_qt)
+ add_library(Qt::${component} INTERFACE IMPORTED)
+ set_target_properties(Qt::${component} PROPERTIES INTERFACE_LINK_LIBRARIES Qt${_QT_VERSION}::${component})
+ endif()
+- set_property(TARGET Qt::${component} PROPERTY INTERFACE_COMPILE_FEATURES "")
+ endforeach()
+
+ endmacro()
obs-backgroundremoval-1.1.6.tar.gz/.github/scripts/.package.zsh -> obs-backgroundremoval-1.1.13.tar.gz/.github/scripts/.package.zsh
Changed
if (( _loglevel > 1 || ${+CI} )) _tarflags="v${_tarflags}"
if (( package )) {
- if ! -f ${project_root}/build_macos/installer-macos.generated.pkgproj {
- log_error 'Packages project file not found. Run the build script or the CMake build and install procedures first.'
+ if ! -f ${project_root}/build_macos/Distribution.generated.xml {
+ log_error 'Distribution file not found. Run the build script or the CMake build and install procedures first.'
return 2
}
- check_packages
-
log_group "Packaging ${product_name}..."
pushd ${project_root}
pkgbuild \
--scripts "${project_root}/cmake/macos/resources/scripts" \
"${project_root}/release/${config}/${product_name}-flat.pkg"
productbuild \
- --distribution "${project_root}/cmake/macos/resources/Distribution.xml" \
+ --distribution "${project_root}/build_macos/Distribution.generated.xml" \
--package-path "${project_root}/release/${config}" \
"${project_root}/release/${config}/${product_name}.pkg"
rm "${project_root}/release/${config}/${product_name}-flat.pkg"
obs-backgroundremoval-1.1.6.tar.gz/.github/scripts/utils.zsh/check_macos -> obs-backgroundremoval-1.1.13.tar.gz/.github/scripts/utils.zsh/check_macos
Changed
return 2
}
-brew bundle --file ${SCRIPT_HOME}/.Brewfile
+brew bundle --no-upgrade --file ${SCRIPT_HOME}/.Brewfile
rehash
log_group
obs-backgroundremoval-1.1.13.tar.gz/.github/workflows/pages.yaml
Added
+name: "Deploy pages to GitHub Pages"
+
+on:
+ push:
+ branches:
+ - "main"
+ release:
+ - "released"
+ workflow_dispatch:
+
+permissions:
+ contents: "read"
+ pages: "write"
+ id-token: "write"
+
+concurrency:
+ group: "pages"
+ cancel-in-progress: false
+
+jobs:
+ Deploy:
+ environment:
+ name: "github-pages"
+ url: "${{ steps.deployment.outputs.page_url }}"
+ runs-on: "ubuntu-latest"
+ defaults:
+ run:
+ working-directory: "./pages"
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v4"
+ - name: "Setup Pages"
+ uses: "actions/configure-pages@v3"
+ with:
+ static_site_generator: "sveltekit"
+ - uses: "actions/setup-node@v3"
+ with:
+ node-version: 20
+ cache: "npm"
+ cache-dependency-path: "./pages/package-lock.json"
+ - name: "Install dependencies"
+ run: "npm install"
+ - name: "Build pages"
+ run: "npm run build"
+ env:
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+ - name: "Upload artifact"
+ uses: "actions/upload-pages-artifact@v2"
+ with:
+ path: "./pages/build"
+ - name: "Deploy to GitHub Pages"
+ id: "deployment"
+ uses: "actions/deploy-pages@v2"
obs-backgroundremoval-1.1.6.tar.gz/.github/workflows/push.yaml -> obs-backgroundremoval-1.1.13.tar.gz/.github/workflows/push.yaml
Changed
draft: true
prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }}
tag_name: ${{ steps.check.outputs.version }}
- name: OBS Studio ${{ steps.check.outputs.version }}
+ name: obs-backgroundremoval ${{ steps.check.outputs.version }}
body_path: ${{ github.workspace }}/CHECKSUMS.txt
files: |
${{ github.workspace }}/*.exe
obs-backgroundremoval-1.1.13.tar.gz/.github/workflows/winget-update.yaml
Added
+name: Submit package to Windows Package Manager Community Repository
+
+on:
+ release:
+ types:
+ - published
+
+jobs:
+
+ winget:
+ name: Publish winget package
+ runs-on: windows-latest
+ steps:
+ - name: Submit package to Windows Package Manager Community Repository
+ run: |
+ iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
+ $github = Get-Content '${{ github.event_path }}' | ConvertFrom-Json
+ $installerUrl = $github.release.assets | Where-Object -Property name -match 'obs-backgroundremoval-*-windows-x64-Installer.exe' | Select -ExpandProperty browser_download_url -First 1
+ .\wingetcreate.exe update RoyShilkrot.obs-backgroundremoval -s -v $github.release.tag_name -u $installerUrl -t '${{ secrets.OBS_BGREMOVAL_PUBLIC_REPO_PAT }}'
obs-backgroundremoval-1.1.6.tar.gz/.gitignore -> obs-backgroundremoval-1.1.13.tar.gz/.gitignore
Changed
!/cmake
!/data
!/docs
+!/pages
!/src
!/vendor
!.clang-format
!CMakePresets.json
!LICENSE
!README.md
+!patch_libobs.diff
# Exclude lock files
*.lock.json
obs-backgroundremoval-1.1.6.tar.gz/CMakeLists.txt -> obs-backgroundremoval-1.1.13.tar.gz/CMakeLists.txt
Changed
set(USE_SYSTEM_ONNXRUNTIME
OFF
CACHE STRING "Use system ONNX Runtime")
+
+set(DISABLE_ONNXRUNTIME_GPU
+ OFF
+ CACHE STRING "Disables GPU support of ONNX Runtime (Only valid on Linux)")
+
+if(DISABLE_ONNXRUNTIME_GPU)
+ target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE DISABLE_ONNXRUNTIME_GPU)
+endif()
+
if(USE_SYSTEM_ONNXRUNTIME)
if(OS_LINUX)
- find_package(Onnxruntime 1.14.1 REQUIRED)
+ find_package(Onnxruntime 1.16.3 REQUIRED)
set(Onnxruntime_INCLUDE_PATH
${Onnxruntime_INCLUDE_DIR} ${Onnxruntime_INCLUDE_DIR}/onnxruntime
${Onnxruntime_INCLUDE_DIR}/onnxruntime/core/session ${Onnxruntime_INCLUDE_DIR}/onnxruntime/core/providers/cpu)
if(APPLE)
add_subdirectory(src/update-checker/URLSessionClient)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE URLSessionClient)
+ # add Foundation framework
+ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "-framework Foundation")
elseif(MSVC)
add_subdirectory(src/update-checker/WinRTHttpClient)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE WinRTHttpClient)
src/obs-utils/obs-config-utils.cpp
src/update-checker/github-utils.cpp
src/update-checker/update-checker.cpp
- src/update-checker/UpdateDialog.cpp
src/background-filter-info.c
src/background-filter.cpp
src/enhance-filter.cpp
obs-backgroundremoval-1.1.6.tar.gz/CMakePresets.json -> obs-backgroundremoval-1.1.13.tar.gz/CMakePresets.json
Changed
"CODESIGN_IDENTITY": "$penv{CODESIGN_IDENT}",
"CODESIGN_TEAM": "$penv{CODESIGN_TEAM}",
"ENABLE_FRONTEND_API": true,
- "ENABLE_QT": true
+ "ENABLE_QT": false
}
},
{
"QT_VERSION": "6",
"CMAKE_SYSTEM_VERSION": "10.0.18363.657",
"ENABLE_FRONTEND_API": true,
- "ENABLE_QT": true
+ "ENABLE_QT": false
}
},
{
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_POSITION_INDEPENDENT_CODE": true,
"ENABLE_FRONTEND_API": true,
- "ENABLE_QT": true,
- "USE_SYSTEM_CURL": true
+ "ENABLE_QT": false
}
},
{
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_POSITION_INDEPENDENT_CODE": true,
"ENABLE_FRONTEND_API": true,
- "ENABLE_QT": true,
- "USE_SYSTEM_CURL": true
+ "ENABLE_QT": false
}
},
{
obs-backgroundremoval-1.1.6.tar.gz/README.md -> obs-backgroundremoval-1.1.13.tar.gz/README.md
Changed
<div align="center">
-!GitHub(https://img.shields.io/github/license/royshil/obs-backgroundremoval)(https://github.com/royshil/obs-backgroundremoval/blob/main/LICENSE)
-!GitHub Workflow Status(https://img.shields.io/github/actions/workflow/status/royshil/obs-backgroundremoval/push.yaml)(https://github.com/royshil/obs-backgroundremoval/actions/workflows/push.yaml)
-!Total downloads(https://img.shields.io/github/downloads/royshil/obs-backgroundremoval/total)(https://github.com/royshil/obs-backgroundremoval/releases)
+!GitHub(https://img.shields.io/github/license/occ-ai/obs-backgroundremoval)(https://github.com/occ-ai/obs-backgroundremoval/blob/main/LICENSE)
+!GitHub Workflow Status(https://img.shields.io/github/actions/workflow/status/occ-ai/obs-backgroundremoval/push.yaml)(https://github.com/occ-ai/obs-backgroundremoval/actions/workflows/push.yaml)
+!Total downloads(https://img.shields.io/github/downloads/occ-ai/obs-backgroundremoval/total)(https://github.com/occ-ai/obs-backgroundremoval/releases)
!Flathub(https://img.shields.io/flathub/downloads/com.obsproject.Studio.Plugin.BackgroundRemoval?label=Flathub%20Installs)
-!GitHub release (latest by date)(https://img.shields.io/github/v/release/royshil/obs-backgroundremoval)(https://github.com/royshil/obs-backgroundremoval/releases)
+!GitHub release (latest by date)(https://img.shields.io/github/v/release/occ-ai/obs-backgroundremoval)(https://github.com/occ-ai/obs-backgroundremoval/releases)
+!Discord(https://img.shields.io/discord/1200229425141252116)(https://discord.gg/KbjGU2vvUz)
</div>
A plugin for OBS Studio(https://obsproject.com/) that allows you to replace the background in portrait images and video, as well as enhance low-light scenes.
+- Usage(#usage)
+- Download(#download)
- Introduction(#introduction)
- Building(#building)
- MacOSX(#mac-osx)
- - Linux (Ubuntu, Arch, openSUSE)(#linux)
+ - Linux (Ubuntu, Arch, openSUSE, Fedora)(#linux)
- Windows(#windows)
-Other plugins from us:
-- 🚧 Experimental 🚧: CleanStream(https://github.com/royshil/obs-cleanstream) OBS plugin for real-time filler word (uh,um) and profanity removal from live audio stream
-- ✨ NEW: URL/API Source(https://github.com/royshil/obs-urlsource) a plugin for live fetching of API data and displaying on screen as a video source
-- ✨ NEW: LocalVocal(https://github.com/royshil/obs-localvocal) speech AI assistant plugin for real-time local transcription (captions), translation and other language functions
+For other AI plugins from us check out OCC AI(https://github.com/occ-ai).
+
+## Usage
+
+<div align="center">
+<video src="https://github.com/occ-ai/obs-backgroundremoval/assets/1067855/5ba5aae2-7ea2-4c90-ad45-fba5ccde1a4e" width="320"></video>
+</div>
+
+Check out the usage guide page(https://occ-ai.github.io/obs-backgroundremoval/usage) for usage walkthrough and recommendations.
+
+Additional tutorial videos:
+
+- Usage tutorial: https://youtu.be/veqNEsMqEE0
+- Depth of Field effect: https://youtu.be/jC3EKSpNjQk
+- Low-light enhancement: https://youtu.be/WSBLYWFrn2Q
+- Remove background from ANY object (not just human): https://youtu.be/N74VCDCToX8
## Download
-Check out the latest releases(https://github.com/royshil/obs-backgroundremoval/releases) for downloads and install instructions.
+
+Check out the guide page(https://occ-ai.github.io/obs-backgroundremoval) for downloads and install instructions for **Windows** and **MacOS**.
### Linux Installation
+
On Ubuntu, there are two ways to install OBS and you have to use the corresponding method to install this plugin.
-- If you installed OBS via the official PPA, download the deb package from the releases(https://github.com/royshil/obs-backgroundremoval/releases) page and install it directly.
+
+- If you installed OBS via the official PPA, download the deb package from the releases(https://github.com/occ-ai/obs-backgroundremoval/releases) page and install it directly.
- If you installed OBS via FlatHub, run the following command: `flatpak install com.obsproject.Studio.Plugin.BackgroundRemoval`
The pre-built binary of this plugin can run Ubuntu 22.04 or later.
On openSUSE, please see `docs/BUILDING-OPENSUSE.md`(docs/BUILDING-OPENSUSE.md).
+#### FlatHub
+
+On Debian, you cannot use our deb package and we only support FlatHub installation.
+
On other Linux distros, use the FlatHub installation of both OBS and this plugin.
-If you install OBS in a way other than FlatHub, you have to build this plugin by yourself (see instructions for building below(#linux)).
-## Code Walkthrough
-This video on YouTube will take you through the major parts of the code and explain them.
+```
+flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
+flatpak install flathub com.obsproject.Studio
+flatpak install flathub com.obsproject.Studio.Plugin.BackgroundRemoval
+```
-<div align="center">
- <a href="https://youtu.be/iFQtcJg0Wsk" target="_blank">
- <img width="50%" src="https://img.youtube.com/vi/iFQtcJg0Wsk/maxresdefault.jpg"/>
- </a>
-</div>
+If you install OBS in a way other than FlatHub, you have to build this plugin by yourself (see instructions for building below(#linux)).
+
+### OBS Version Support and Compatibility
-## OBS Version Support and Compatibility
- OBS version 29+ (download(https://obsproject.com/download)) for the latest version of this plugin, e.g. 1.1.x and above.
- OBS version 28+ for this plugin's version between 0.5.x and 1.0.x.
- OBS version 27+ for this plugin's version 0.4.x and below.
a transparent color.
If you like this work, which is given to you completely free of charge, please consider supporting it by sponsoring us on GitHub:
+
- https://github.com/sponsors/royshil
- https://github.com/sponsors/umireon
-OBS Plugins forum: https://obsproject.com/forum/resources/background-removal-portrait-segmentation.1260/
+### Support and Help
+
+Reach out to us on Discord(https://discord.gg/3EUBUjpCD3) or the OBS Plugins forum(https://obsproject.com/forum/resources/background-removal-portrait-segmentation.1260/) for online / immediate help.
-Tutorial video on YouTube: https://youtu.be/veqNEsMqEE0
+If you found a bug or want to suggest a feature or improvement please open an issue(https://github.com/occ-ai/obs-backgroundremoval/issues).
-https://github.com/royshil/obs-backgroundremoval/assets/1067855/5ba5aae2-7ea2-4c90-ad45-fba5ccde1a4e
+If you are looking for hands-on help or private consultation please select a sponsorship tier(https://github.com/sponsors/royshil?frequency=one-time).
+
+### Technical Details
GPU support:
-* Currently on Windows we support DirectML, which should reduce CPU usage by 95% and effectively use the systems accelerators (GPUs if available).
-* On Mac we support CoreML for acceleration, which is available on M1 and M2 (not Intel, sorry).
-* CUDA is supported in this plugin through TensorRT, however it is supported only on Linux.
-* The goal of this plugin is to be available for everyone on every system, even if they don't own a GPU.
+
+- Currently on Windows we support DirectML, which should reduce CPU usage by 95% and effectively use the systems accelerators (GPUs if available).
+- On Mac we support CoreML for acceleration, which is available on M1 and M2 (not Intel, sorry).
+- CUDA is supported in this plugin through TensorRT, however it is supported only on Linux.
+- The goal of this plugin is to be available for everyone on every system, even if they don't own a GPU.
Number of CPU threads is controllable through the UI settings. A 2-thread setting works best.
The pretrained model weights used for portrait foreground segmentation are taken from:
+
- https://github.com/anilsathyan7/Portrait-Segmentation/tree/master/SINet
- https://github.com/PaddlePaddle/PaddleSeg/tree/release/2.7/contrib/PP-HumanSeg
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/082_MediaPipe_Meet_Segmentation
- https://github.com/PeterL1n/RobustVideoMatting
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/384_TCMonoDepth and https://github.com/yu-li/TCMonoDepth
+- https://huggingface.co/briaai/RMBG-1.4
Image enhancement (low light) models are taken from:
+
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/213_TBEFN
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/372_URetinex-Net
- https://github.com/PINTO0309/PINTO_model_zoo/tree/main/370_Semantic-Guided-Low-Light-Image-Enhancement
Some more information about how I built it: https://www.morethantechnical.com/2021/04/15/obs-plugin-for-portrait-background-removal-with-onnx-sinet-model/ and https://www.morethantechnical.com/2023/05/20/building-an-obs-background-removal-plugin-a-walkthrough/
+### Code Walkthrough
+
+This video on YouTube will take you through the major parts of the code and explain them.
+
+<div align="center">
+ <a href="https://youtu.be/iFQtcJg0Wsk" target="_blank">
+ <img width="50%" src="https://img.youtube.com/vi/iFQtcJg0Wsk/maxresdefault.jpg"/>
+ </a>
+</div>
+
## Building
-The plugin was built and tested on Mac OSX (Intel & Apple silicon), Windows and several Linux disros (e.g. Ubuntu/Debian-ish, Fedora, and more). Help is appreciated in building on other OSs and packages.
+The plugin was built and tested on Mac OSX (Intel & Apple silicon), Windows and several Linux disros (e.g. Ubuntu/Debian-ish, Fedora, and more). Help is appreciated in building on other OSs and packages.
The building pipelines in CI take care of the heavy lifting. Use them in order to build the plugin locally. We attempt to use external OpenCV, libcurl and ONNX Runtime to reduce build times.
```
#### Install
+
The above script should succeed and the plugin files (e.g. `obs-backgroundremoval.plugin`) will reside in the `./release/Release` folder off of the root. Copy the `.plugin` file to the OBS directory e.g. `~/Library/Application Support/obs-studio/plugins`.
To get `.pkg` installer file, run for example
+
```sh
$ ./.github/scripts/package-macos -c Release
```
+
(Note that maybe the outputs will be in the `Release` folder and not the `install` folder like `pakage-macos` expects, so you will need to rename the folder from `build_x86_64/Release` to `build_x86_64/install`)
### Linux
#### Ubuntu
Use the CI scripts again
+
```sh
$ ./.github/scripts/build-linux.sh
```
#### Arch Linux
+
The community maintains AUR packages: https://aur.archlinux.org/packages/obs-backgroundremoval
#### Fedora
+
To compile on Fedora, you need to manage the dependencies manually. See docs/BUILDING-FEDORA.md(docs/BUILDING-FEDORA.md) for more information.
#### FlatHub
+
The plugin is available on FlatHub: https://github.com/flathub/com.obsproject.Studio.Plugin.BackgroundRemoval
```sh
The build should exist in the `./release` folder off the root. You can manually install the files in the OBS directory.
<picture>
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=royshil/obs-backgroundremoval&type=Date&theme=dark" />
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=royshil/obs-backgroundremoval&type=Date" />
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=royshil/obs-backgroundremoval&type=Date" />
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=occ-ai/obs-backgroundremoval&type=Date&theme=dark" />
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=occ-ai/obs-backgroundremoval&type=Date" />
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=occ-ai/obs-backgroundremoval&type=Date" />
</picture>
obs-backgroundremoval-1.1.6.tar.gz/buildspec.json -> obs-backgroundremoval-1.1.13.tar.gz/buildspec.json
Changed
}
},
"tools": {
- "packages": {
- "version": "1.2.10",
- "baseUrl": "http://s.sudre.free.fr/Software/files",
- "label": "Packages.app",
- "hash": "6afdd25386295974dad8f078b8f1e41cabebd08e72d970bf92f707c7e48b16c9"
- }
},
"platformConfig": {
"macos": {
}
},
"name": "obs-backgroundremoval",
- "version": "1.1.6",
+ "version": "1.1.13",
"author": "Roy Shilkrot",
"website": "https://github.com/royshil/obs-backgroundremoval",
"email": "roy.shil@gmail.com",
obs-backgroundremoval-1.1.6.tar.gz/cmake/FetchOnnxruntime.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/FetchOnnxruntime.cmake
Changed
""
CACHE STRING "URL of a downloaded ONNX Runtime tarball")
-set(CUSTOM_ONNXRUNTIME_MD5
+set(CUSTOM_ONNXRUNTIME_HASH
""
- CACHE STRING "MD5 Hash of a downloaded ONNX Runtime tarball")
+ CACHE STRING "Hash of a downloaded ONNX Runtime tarball")
+
+set(Onnxruntime_VERSION "1.17.1")
if(CUSTOM_ONNXRUNTIME_URL STREQUAL "")
set(USE_PREDEFINED_ONNXRUNTIME ON)
else()
- if(CUSTOM_ONNXRUNTIME_MD5 STREQUAL "")
- message(FATAL_ERROR "Both of CUSTOM_ONNXRUNTIME_URL and CUSTOM_ONNXRUNTIME_MD5 must be present!")
+ if(CUSTOM_ONNXRUNTIME_HASH STREQUAL "")
+ message(FATAL_ERROR "Both of CUSTOM_ONNXRUNTIME_URL and CUSTOM_ONNXRUNTIME_HASH must be present!")
else()
set(USE_PREDEFINED_ONNXRUNTIME OFF)
endif()
endif()
-set(Onnxruntime_VERSION "1.15.1")
+if(USE_PREDEFINED_ONNXRUNTIME)
+ set(Onnxruntime_BASEURL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}")
+ set(Onnxruntime_WINDOWS_VERSION "v${Onnxruntime_VERSION}-1")
+ set(Onnxruntime_WINDOWS_BASEURL
+ "https://github.com/occ-ai/occ-ai-dep-onnxruntime-static-win/releases/download/${Onnxruntime_WINDOWS_VERSION}")
-if(OS_MACOS)
- if(USE_PREDEFINED_ONNXRUNTIME)
- FetchContent_Declare(
- Onnxruntime
- URL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}/onnxruntime-osx-universal2-${Onnxruntime_VERSION}.tgz"
- URL_HASH MD5=6637c31d2dae5ad8bffb4da38ae4d89e)
+ if(APPLE)
+ set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-osx-universal2-${Onnxruntime_VERSION}.tgz")
+ set(Onnxruntime_HASH SHA256=9FA57FA6F202A373599377EF75064AE568FDA8DA838632B26A86024C7378D306)
+ elseif(MSVC)
+ set(Onnxruntime_URL "${Onnxruntime_WINDOWS_BASEURL}/onnxruntime-windows-${Onnxruntime_WINDOWS_VERSION}-Release.zip")
+ set(OOnnxruntime_HASH SHA256=39E63850D9762810161AE1B4DEAE5E3C02363521273E4B894A9D9707AB626C38)
else()
- FetchContent_Declare(
- Onnxruntime
- URL "${CUSTOM_ONNXRUNTIME_URL}"
- URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+ set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-linux-aarch64-${Onnxruntime_VERSION}.tgz")
+ set(Onnxruntime_HASH SHA256=70B6F536BB7AB5961D128E9DBD192368AC1513BFFB74FE92F97AAC342FBD0AC1)
+ else()
+ set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-linux-x64-gpu-${Onnxruntime_VERSION}.tgz")
+ set(Onnxruntime_HASH SHA256=613C53745EA4960ED368F6B3AB673558BB8561C84A8FA781B4EA7FB4A4340BE4)
+ endif()
endif()
- FetchContent_MakeAvailable(Onnxruntime)
+else()
+ set(Onnxruntime_URL "${CUSTOM_ONNXRUNTIME_URL}")
+ set(Onnxruntime_HASH "${CUSTOM_ONNXRUNTIME_HASH}")
+endif()
+
+FetchContent_Declare(
+ onnxruntime
+ URL ${Onnxruntime_URL}
+ URL_HASH ${Onnxruntime_HASH})
+FetchContent_MakeAvailable(onnxruntime)
+
+if(APPLE)
set(Onnxruntime_LIB "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.${Onnxruntime_VERSION}.dylib")
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "${Onnxruntime_LIB}")
target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC "${onnxruntime_SOURCE_DIR}/include")
COMMAND
${CMAKE_INSTALL_NAME_TOOL} -change "@rpath/libonnxruntime.${Onnxruntime_VERSION}.dylib"
"@loader_path/../Frameworks/libonnxruntime.${Onnxruntime_VERSION}.dylib" $<TARGET_FILE:${CMAKE_PROJECT_NAME}>)
-elseif(OS_WINDOWS)
- if(USE_PREDEFINED_ONNXRUNTIME)
- FetchContent_Declare(
- Onnxruntime
- URL "https://github.com/umireon/onnxruntime-static-win/releases/download/v${Onnxruntime_VERSION}-1/onnxruntime-static-win.zip"
- URL_HASH MD5=1be38fe8abe304085b9eb58272fbc941)
- else()
- FetchContent_Declare(
- Onnxruntime
- URL "${CUSTOM_ONNXRUNTIME_URL}"
- URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
- endif()
- FetchContent_MakeAvailable(Onnxruntime)
-
+elseif(MSVC)
add_library(Ort INTERFACE)
set(Onnxruntime_LIB_NAMES
session;providers_shared;providers_dml;optimizer;providers;framework;graph;util;mlas;common;flatbuffers)
set_target_properties(Ort::DirectML PROPERTIES IMPORTED_LOCATION ${onnxruntime_SOURCE_DIR}/bin/DirectML.dll)
set_target_properties(Ort::DirectML PROPERTIES IMPORTED_IMPLIB ${onnxruntime_SOURCE_DIR}/bin/DirectML.lib)
- target_link_libraries(Ort INTERFACE Ort::DirectML d3d12.lib dxgi.lib dxguid.lib)
+ target_link_libraries(Ort INTERFACE Ort::DirectML d3d12.lib dxgi.lib dxguid.lib Dxcore.lib)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Ort)
install(IMPORTED_RUNTIME_ARTIFACTS Ort::DirectML DESTINATION "obs-plugins/64bit")
-elseif(OS_LINUX)
+else()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
- if(USE_PREDEFINED_ONNXRUNTIME)
- FetchContent_Declare(
- Onnxruntime
- URL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}/onnxruntime-linux-aarch64-${Onnxruntime_VERSION}.tgz"
- URL_HASH MD5=ebec0b185c9bec94fde884a97b144c04)
- else()
- FetchContent_Declare(
- Onnxruntime
- URL "${CUSTOM_ONNXRUNTIME_URL}"
- URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
- endif()
- FetchContent_MakeAvailable(Onnxruntime)
set(Onnxruntime_LINK_LIBS "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.${Onnxruntime_VERSION}")
set(Onnxruntime_INSTALL_LIBS ${Onnxruntime_LINK_LIBS})
else()
- if(USE_PREDEFINED_ONNXRUNTIME)
- FetchContent_Declare(
- Onnxruntime
- URL "https://github.com/microsoft/onnxruntime/releases/download/v${Onnxruntime_VERSION}/onnxruntime-linux-x64-gpu-${Onnxruntime_VERSION}.tgz"
- URL_HASH MD5=8d2f5ee9f449bdecb10a45715fe74c53)
- else()
- FetchContent_Declare(
- Onnxruntime
- URL "${CUSTOM_ONNXRUNTIME_URL}"
- URL_HASH MD5=${CUSTOM_ONNXRUNTIME_MD5})
- endif()
- FetchContent_MakeAvailable(Onnxruntime)
set(Onnxruntime_LINK_LIBS "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime.so.${Onnxruntime_VERSION}")
set(Onnxruntime_INSTALL_LIBS
${Onnxruntime_LINK_LIBS} "${onnxruntime_SOURCE_DIR}/lib/libonnxruntime_providers_shared.so"
obs-backgroundremoval-1.1.6.tar.gz/cmake/FetchOpenCV.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/FetchOpenCV.cmake
Changed
endif()
if(USE_PREDEFINED_OPENCV)
- set(OpenCV_VERSION "4.8.0-1")
- set(OpenCV_BASEURL "https://github.com/umireon/obs-backgroundremoval-dep-opencv/releases/download/${OpenCV_VERSION}")
+ set(OpenCV_VERSION "v4.8.1-1")
+ set(OpenCV_BASEURL "https://github.com/obs-ai/obs-backgroundremoval-dep-opencv/releases/download/${OpenCV_VERSION}")
if(${CMAKE_BUILD_TYPE} STREQUAL Release OR ${CMAKE_BUILD_TYPE} STREQUAL RelWithDebInfo)
set(OpenCV_BUILD_TYPE Release)
endif()
if(APPLE)
- if(OpenCV_BUILD_TYPE STREQUAL Release)
- set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-Release.tar.gz")
- set(OpenCV_HASH MD5=0875366a03aa44def76ab5a12d3e7b8f)
+ if(OpenCV_BUILD_TYPE STREQUAL Debug)
+ set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-${OpenCV_VERSION}-Debug.tar.gz")
+ set(OpenCV_HASH SHA256=2930e335a19cc03a3d825e2b76eadd0d5cf08d8baf6537747d43f503dff32454)
else()
- set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-Debug.tar.gz")
- set(OpenCV_HASH MD5=9ae59653c7f9a4c991fbf59018e45d2c)
+ set(OpenCV_URL "${OpenCV_BASEURL}/opencv-macos-${OpenCV_VERSION}-Release.tar.gz")
+ set(OpenCV_HASH SHA256=b0c4fe2370b0bd5aa65c408e875b1ab18508ba31b93083805d7e398a3ecafdac)
endif()
elseif(MSVC)
- if(OpenCV_BUILD_TYPE STREQUAL Release)
- set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-Release.zip")
- set(OpenCV_HASH MD5=e653d590cfbcc3a9bf15ef20e64a6e32)
+ if(OpenCV_BUILD_TYPE STREQUAL Debug)
+ set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-${OpenCV_VERSION}-Debug.zip")
+ set(OpenCV_HASH SHA256=0c5ef12cf4b4e4db7ea17a24db156165b6f01759f3f1660b069d0722e5d5dc37)
else()
- set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-Debug.zip")
- set(OpenCV_HASH MD5=abad340ccb73da2924544ec9066afcb3)
+ set(OpenCV_URL "${OpenCV_BASEURL}/opencv-windows-${OpenCV_VERSION}-Release.zip")
+ set(OpenCV_HASH SHA256=5e468f71d41d3a3ea46cc4f247475877f65d3655a2764a2c01074bda3b3e6864)
endif()
else()
- if(OpenCV_BUILD_TYPE STREQUAL Release)
- set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-Release.tar.gz")
- set(OpenCV_HASH MD5=7a668fbc3ac536812643c6b8c8f96be9)
+ if(OpenCV_BUILD_TYPE STREQUAL Debug)
+ set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-${OpenCV_VERSION}-Debug.tar.gz")
+ set(OpenCV_HASH SHA256=e2e246d6b4f279be80e7fd0a78cba8a0eeee7b53ae807f2f57428d6876306422)
else()
- set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-Debug.tar.gz")
- set(OpenCV_HASH MD5=259699c71055ff748c200e62af059104)
+ set(OpenCV_URL "${OpenCV_BASEURL}/opencv-linux-${OpenCV_VERSION}-Release.tar.gz")
+ set(OpenCV_HASH SHA256=809922a7cc9f344a2d82a232ed7b02e122c82e77cba94b4047e666a0527cc00e)
endif()
endif()
else()
if(MSVC)
target_link_libraries(
OpenCV
- INTERFACE ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_imgproc480.lib
- ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_core480.lib
+ INTERFACE ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_imgproc481.lib
+ ${opencv_SOURCE_DIR}/x64/vc17/staticlib/opencv_core481.lib
${opencv_SOURCE_DIR}/x64/vc17/staticlib/zlib.lib)
target_include_directories(OpenCV SYSTEM INTERFACE ${opencv_SOURCE_DIR}/include)
else()
obs-backgroundremoval-1.1.6.tar.gz/cmake/common/buildspec_common.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/common/buildspec_common.cmake
Changed
set(_cmake_version "3.0.0")
endif()
+ message(STATUS "Patch libobs")
+ execute_process(
+ COMMAND patch --forward "libobs/CMakeLists.txt" "${CMAKE_CURRENT_SOURCE_DIR}/patch_libobs.diff"
+ RESULT_VARIABLE _process_result
+ WORKING_DIRECTORY "${dependencies_dir}/${_obs_destination}")
+ message(STATUS "Patch - done")
+
message(STATUS "Configure ${label} (${arch})")
execute_process(
COMMAND
obs-backgroundremoval-1.1.13.tar.gz/cmake/macos/resources/Distribution.xml.in
Added
+<?xml version="1.0" encoding="utf-8"?>
+<installer-gui-script minSpecVersion="1">
+ <pkg-ref id="@MACOS_BUNDLEID@"/>
+ <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/>
+ <choices-outline>
+ <line choice="default">
+ <line choice="@MACOS_BUNDLEID@"/>
+ </line>
+ </choices-outline>
+ <choice id="default"/>
+ <choice id="@MACOS_BUNDLEID@" visible="false">
+ <pkg-ref id="@MACOS_BUNDLEID@"/>
+ </choice>
+ <pkg-ref id="@MACOS_BUNDLEID@" version="@CMAKE_PROJECT_VERSION@" onConclusion="none">@CMAKE_PROJECT_NAME@-flat.pkg</pkg-ref>
+ <domains enable_anywhere="false" enable_currentUserHome="true" enable_localSystem="false"/>
+</installer-gui-script>
obs-backgroundremoval-1.1.6.tar.gz/cmake/macos/resources/create-package.cmake.in -> obs-backgroundremoval-1.1.13.tar.gz/cmake/macos/resources/create-package.cmake.in
Changed
set(MACOS_BUNDLEID ${MACOS_BUNDLEID})
set(UUID_PACKAGE ${UUID_PACKAGE})
set(UUID_INSTALLER ${UUID_INSTALLER})
-configure_file(cmake/macos/resources/installer-macos.pkgproj.in
- "${CMAKE_CURRENT_BINARY_DIR}/installer-macos.generated.pkgproj")
+configure_file(cmake/macos/resources/Distribution.xml.in
+ "${CMAKE_CURRENT_BINARY_DIR}/Distribution.generated.xml")
obs-backgroundremoval-1.1.6.tar.gz/cmake/windows/compilerconfig.cmake -> obs-backgroundremoval-1.1.13.tar.gz/cmake/windows/compilerconfig.cmake
Changed
endif()
add_compile_options(
- /W3 /utf-8 "$<$<COMPILE_LANG_AND_ID:C,MSVC>:/MP>" "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/MP>"
+ /W3
+ /utf-8
+ "$<$<COMPILE_LANG_AND_ID:C,MSVC>:/MP>"
+ "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/MP>"
"$<$<COMPILE_LANG_AND_ID:C,Clang>:${_obs_clang_c_options}>"
- "$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>")
+ "$<$<COMPILE_LANG_AND_ID:CXX,Clang>:${_obs_clang_cxx_options}>"
+ /IGNORE:4099)
add_compile_definitions(UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS $<$<CONFIG:DEBUG>:DEBUG>
$<$<CONFIG:DEBUG>:_DEBUG>)
add_link_options("$<$<NOT:$<CONFIG:Debug>>:/OPT:REF>" "$<$<CONFIG:Debug>:/INCREMENTAL:NO>"
- "$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>" "$<$<CONFIG:RelWithDebInfo>:/OPT:ICF>")
+ "$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>" "$<$<CONFIG:RelWithDebInfo>:/OPT:ICF>" /IGNORE:4099)
if(CMAKE_COMPILE_WARNING_AS_ERROR)
add_link_options(/WX)
obs-backgroundremoval-1.1.6.tar.gz/cmake/windows/resources/installer-Windows.iss.in -> obs-backgroundremoval-1.1.13.tar.gz/cmake/windows/resources/installer-Windows.iss.in
Changed
Compression=lzma
SolidCompression=yes
DirExistsWarning=no
+VersionInfoVersion={#MyAppVersion}
+AppCopyright=Copyright (C) 2023 {#MyAppPublisher}
+DisableProgramGroupPage=Yes
Languages
Name: "english"; MessagesFile: "compiler:Default.isl"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ar-EG.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ar-EG.ini
Changed
SGLLIE="تحسين موجّه بالدليل الدلالي"
ZERODCE="Zero-DCE"
EnableThreshold="تمكين الحد"
+Advanced="إعدادات متقدمة"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/bn-IN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/bn-IN.ini
Changed
SGLLIE="সেমান্টিক গাইডেড উন্নয়ন"
ZERODCE="শূন্য-DCE"
EnableThreshold="থ্রেসহোল্ড সক্ষম করুন"
+Advanced="উন্নত সেটিংস"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/en-US.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/en-US.ini
Changed
SelfieSegmentation="Selfie Segmentation"
PPHumanSeg="PPHumanSeg"
RobustVideoMatting="Robust Video Matting"
-CalculateMaskEveryXFrame="Calculate mask every X frame"
-BlurBackgroundFactor0NoBlurUseColor="Blur background factor (0 - no blur)"
+CalculateMaskEveryXFrame="Calculate every X frame"
+BlurBackgroundFactor0NoBlurUseColor="Blur background (0 - no blur)"
EnhancePortrait="Enhance portrait"
EffectStrengh="Effect strength (0 - no enhance)"
EnhancementModel="Enhancement model"
TCMonoDepth="TCMonoDepth (Depth)"
EnableFocalBlur="Enable focal blur"
BlurFocusDepth="Blur focus depth"
+Advanced="Advanced settings"
+FocalBlurGroup="Focal blur settings"
+ThresholdGroup="Threshold settings"
+EnableImageSimilarity="Skip image based on similarity?"
+ImageSimilarityThreshold="Sim. thresh. (high -> sensitive)"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/es-SP.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/es-SP.ini
Changed
SGLLIE="Mejora guiada semántica"
ZERODCE="Zero-DCE"
EnableThreshold="Habilitar umbral"
+Advanced="Configuración avanzada"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/fr-FR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/fr-FR.ini
Changed
SGLLIE="Amélioration Guidée par la Sémantique"
ZERODCE="Zero-DCE"
EnableThreshold="Activer le seuil"
+Advanced="Paramètres avancés"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/hi-IN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/hi-IN.ini
Changed
SGLLIE="सेमांटिक गाइडेड एन्हांसमेंट"
ZERODCE="ज़ीरो-डीसीई"
EnableThreshold="थ्रेसहोल्ड सक्षम करें"
+Advanced="उन्नत सेटिंग्स"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/it-IT.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/it-IT.ini
Changed
SGLLIE="Miglioramento semantico guidato"
ZERODCE="Zero-DCE"
EnableThreshold="Abilita soglia"
+Advanced="Impostazioni avanzate"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ja-JP.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ja-JP.ini
Changed
CalculateMaskEveryXFrame="Xフレーム毎にマスクを計算"
BlurBackgroundFactor0NoBlurUseColor="背景ぼかし係数(0でぼかさず背景色を使用)"
EnableThreshold="しきい値を有効にする"
+Advanced="詳細設定"
+BlurFocusPoint="ぼかし焦点点"
+EnableFocalBlur="焦点ぼかしを有効にする"
+BlurFocusDepth="ぼかし焦点深度"
+EffectStrengh="効果強度(0で効果なし)"
+EnhancementModel="強化モデル"
+NumThreads="# CPUスレッド"
+TCMonoDepth="TCMonoDepth(深度)"
+TBEFN="TBEFN"
+URETINEX="URetinex-Net"
+SGLLIE="Semantic Guided Enhancement"
+ZERODCE="Zero-DCE"
+FocalBlurGroup="焦点ぼかし設定"
+ThresholdGroup="しきい値設定"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ko-KR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ko-KR.ini
Changed
SGLLIE="시맨틱 가이드 개선"
ZERODCE="Zero-DCE"
EnableThreshold="임계값 활성화"
+Advanced="고급 설정"
+FocalBlurGroup="초점 블러 설정"
+ThresholdGroup="임계값 설정"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/pt-BR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/pt-BR.ini
Changed
SGLLIE="Aprimoramento Guiado Semântico"
ZERODCE="Zero-DCE"
EnableThreshold="Ativar Limiar"
+Advanced="Configurações Avançadas"
+FocalBlurGroup="Configurações de desfoque focal"
+BlurFocusPoint="Ponto de foco desfocado"
+EnableFocalBlur="Ativar desfoque focal"
+BlurFocusDepth="Profundidade de foco desfocada"
+TCMonoDepth="TCMonoDepth (Profundidade)"
+ThresholdGroup="Configurações de Limiar"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ru-RU.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ru-RU.ini
Changed
SGLLIE="Семантическое улучшение"
ZERODCE="Zero-DCE"
EnableThreshold="Включить порог"
+Advanced="Расширенные настройки"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/ta-IN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/ta-IN.ini
Changed
SGLLIE="பரிமாற்றத்தை உதர்வுபடுத்திய மேம்படுத்தல்"
ZERODCE="பூஜிய மேற்கோளிக் குறியீடு"
EnableThreshold="அளவுருக்கு அனுமதி"
+Advanced="மேம்படுத்தப்பட்ட அமைப்புகள்"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/tr-TR.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/tr-TR.ini
Changed
SGLLIE="Semantik Rehberli İyileştirme"
ZERODCE="Zero-DCE"
EnableThreshold="Eşik Değerini Etkinleştir"
+Advanced="Gelişmiş Ayarlar"
obs-backgroundremoval-1.1.6.tar.gz/data/locale/zh-CN.ini -> obs-backgroundremoval-1.1.13.tar.gz/data/locale/zh-CN.ini
Changed
SGLLIE="语义引导增强"
ZERODCE="Zero-DCE"
EnableThreshold="启用阈值"
+Advanced="高级设置"
obs-backgroundremoval-1.1.6.tar.gz/docs/BUILDING-FEDORA.md -> obs-backgroundremoval-1.1.13.tar.gz/docs/BUILDING-FEDORA.md
Changed
Clone the repository and set up the submodules:
```
-git clone https://github.com/royshil/obs-backgroundremoval.git
+git clone https://github.com/obs-ai/obs-backgroundremoval.git
cd obs-backgroundremoval
git submodule update --init
```
obs-backgroundremoval-1.1.6.tar.gz/docs/BUILDING-OPENSUSE.md -> obs-backgroundremoval-1.1.13.tar.gz/docs/BUILDING-OPENSUSE.md
Changed
```
sudo zypper install -t pattern devel_basis
sudo zypper install zsh cmake Mesa-libGL-devel \
- ffmpeg-6-libavcodes-devel ffmpeg-6-libavdevice-devel ffmpeg-6-libavformat-devel \
+ ffmpeg-6-libavcodec-devel ffmpeg-6-libavdevice-devel ffmpeg-6-libavformat-devel \
libcurl-devel Mesa-libEGL-devel \
libpulse-devel libxkbcommon-devel
-</dev/null >.github/scripts/utils.zsh/check_linux
-CI=1 .github/scripts/build-linux.zsh --skip-deps
+sudo zypper in cmake gcc12-c++ ninja obs-studio-devel opencv-devel qt6-base-devel zsh curl-devel jq
+
+cmake . -B build_x86_64 \
+ -DCMAKE_C_COMPILER=gcc-12 \
+ -DCMAKE_CXX_COMPILER=g++-12 \
+ -DQT_VERSION=6 \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -DENABLE_FRONTEND_API=ON \
+ -DENABLE_QT=ON
+cmake --build build_x86_64
sudo cmake --install build_x86_64 --prefix /usr
```
obs-backgroundremoval-1.1.13.tar.gz/pages
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/.eslintignore
Added
+.DS_Store
+node_modules
+/build
+/.svelte-kit
+/package
+.env
+.env.*
+!.env.example
+
+# Ignore files for PNPM, NPM and YARN
+pnpm-lock.yaml
+package-lock.json
+yarn.lock
obs-backgroundremoval-1.1.13.tar.gz/pages/.eslintrc.cjs
Added
+module.exports = {
+ root: true,
+ extends:
+ 'eslint:recommended',
+ 'plugin:@typescript-eslint/recommended',
+ 'plugin:svelte/recommended',
+ 'prettier'
+ ,
+ parser: '@typescript-eslint/parser',
+ plugins: '@typescript-eslint',
+ parserOptions: {
+ sourceType: 'module',
+ ecmaVersion: 2020,
+ extraFileExtensions: '.svelte'
+ },
+ env: {
+ browser: true,
+ es2017: true,
+ node: true
+ },
+ overrides:
+ {
+ files: '*.svelte',
+ parser: 'svelte-eslint-parser',
+ parserOptions: {
+ parser: '@typescript-eslint/parser'
+ }
+ }
+
+};
obs-backgroundremoval-1.1.13.tar.gz/pages/.gitignore
Added
+.DS_Store
+node_modules
+/build
+/.svelte-kit
+/package
+.env
+.env.*
+!.env.example
+.vercel
+.output
+vite.config.js.timestamp-*
+vite.config.ts.timestamp-*
obs-backgroundremoval-1.1.13.tar.gz/pages/.npmrc
Added
+engine-strict=true
obs-backgroundremoval-1.1.13.tar.gz/pages/.prettierignore
Added
+.DS_Store
+node_modules
+/build
+/.svelte-kit
+/package
+.env
+.env.*
+!.env.example
+
+# Ignore files for PNPM, NPM and YARN
+pnpm-lock.yaml
+package-lock.json
+yarn.lock
obs-backgroundremoval-1.1.13.tar.gz/pages/.prettierrc
Added
+{
+ "useTabs": true,
+ "singleQuote": true,
+ "trailingComma": "none",
+ "printWidth": 100,
+ "plugins": "prettier-plugin-svelte",
+ "pluginSearchDirs": ".",
+ "overrides": { "files": "*.svelte", "options": { "parser": "svelte" } }
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/README.md
Added
+# create-svelte
+
+Everything you need to build a Svelte project, powered by `create-svelte`(https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
+
+## Creating a project
+
+If you're seeing this, you've probably already done this step. Congrats!
+
+```bash
+# create a new project in the current directory
+npm create svelte@latest
+
+# create a new project in my-app
+npm create svelte@latest my-app
+```
+
+## Developing
+
+Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
+
+```bash
+npm run dev
+
+# or start the server and open the app in a new browser tab
+npm run dev -- --open
+```
+
+## Building
+
+To create a production version of your app:
+
+```bash
+npm run build
+```
+
+You can preview the production build with `npm run preview`.
+
+> To deploy your app, you may need to install an adapter(https://kit.svelte.dev/docs/adapters) for your target environment.
obs-backgroundremoval-1.1.13.tar.gz/pages/package-lock.json
Added
+{
+ "name": "pages",
+ "version": "0.0.1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "pages",
+ "version": "0.0.1",
+ "devDependencies": {
+ "@fontsource/fira-mono": "^4.5.10",
+ "@neoconfetti/svelte": "^1.0.0",
+ "@sveltejs/adapter-static": "^2.0.3",
+ "@sveltejs/kit": "^1.20.4",
+ "@types/cookie": "^0.5.1",
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
+ "@typescript-eslint/parser": "^6.0.0",
+ "eslint": "^8.28.0",
+ "eslint-config-prettier": "^8.5.0",
+ "eslint-plugin-svelte": "^2.30.0",
+ "prettier": "^2.8.0",
+ "prettier-plugin-svelte": "^2.10.1",
+ "svelte": "^4.0.5",
+ "svelte-check": "^3.4.3",
+ "tslib": "^2.4.1",
+ "typescript": "^5.0.0",
+ "vite": "^4.4.2"
+ }
+ },
+ "node_modules/@aashutoshrathi/word-wrap": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
+ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/@ampproject/remapping": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
+ "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
+ "cpu":
+ "arm"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "android"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
+ "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
+ "cpu":
+ "arm64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "android"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
+ "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "android"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
+ "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
+ "cpu":
+ "arm64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "darwin"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
+ "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "darwin"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
+ "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
+ "cpu":
+ "arm64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "freebsd"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
+ "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "freebsd"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
+ "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
+ "cpu":
+ "arm"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
+ "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
+ "cpu":
+ "arm64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
+ "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
+ "cpu":
+ "ia32"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
+ "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
+ "cpu":
+ "loong64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
+ "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
+ "cpu":
+ "mips64el"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
+ "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
+ "cpu":
+ "ppc64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
+ "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
+ "cpu":
+ "riscv64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
+ "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
+ "cpu":
+ "s390x"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
+ "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "linux"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "netbsd"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "openbsd"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
+ "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "sunos"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
+ "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
+ "cpu":
+ "arm64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "win32"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
+ "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
+ "cpu":
+ "ia32"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "win32"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
+ "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
+ "cpu":
+ "x64"
+ ,
+ "dev": true,
+ "optional": true,
+ "os":
+ "win32"
+ ,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "dev": true,
+ "dependencies": {
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.9.1",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz",
+ "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==",
+ "dev": true,
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/eslintrc": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz",
+ "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==",
+ "dev": true,
+ "dependencies": {
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^9.6.0",
+ "globals": "^13.19.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint/js": {
+ "version": "8.50.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz",
+ "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@fastify/busboy": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz",
+ "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@fontsource/fira-mono": {
+ "version": "4.5.10",
+ "resolved": "https://registry.npmjs.org/@fontsource/fira-mono/-/fira-mono-4.5.10.tgz",
+ "integrity": "sha512-bxUnRP8xptGRo8YXeY073DSpfK74XpSb0ZyRNpHV9WvLnJ7TwPOjZll8hTMin7zLC6iOp59pDZ8EQDj1gzgAQQ==",
+ "dev": true
+ },
+ "node_modules/@humanwhocodes/config-array": {
+ "version": "0.11.11",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz",
+ "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==",
+ "dev": true,
+ "dependencies": {
+ "@humanwhocodes/object-schema": "^1.2.1",
+ "debug": "^4.1.1",
+ "minimatch": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=10.10.0"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/object-schema": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
+ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
+ "dev": true
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.15",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+ "dev": true
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.19",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
+ "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@neoconfetti/svelte": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/@neoconfetti/svelte/-/svelte-1.0.0.tgz",
+ "integrity": "sha512-SmksyaJAdSlMa9cTidVSIqYo1qti+WTsviNDwgjNVm+KQ3DRP2Df9umDIzC4vCcpEYY+chQe0i2IKnLw03AT8Q==",
+ "dev": true
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@polka/url": {
+ "version": "1.0.0-next.23",
+ "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.23.tgz",
+ "integrity": "sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==",
+ "dev": true
+ },
+ "node_modules/@sveltejs/adapter-static": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-2.0.3.tgz",
+ "integrity": "sha512-VUqTfXsxYGugCpMqQv1U0LIdbR3S5nBkMMDmpjGVJyM6Q2jHVMFtdWJCkeHMySc6mZxJ+0eZK3T7IgmUCDrcUQ==",
+ "dev": true,
+ "peerDependencies": {
+ "@sveltejs/kit": "^1.5.0"
+ }
+ },
+ "node_modules/@sveltejs/kit": {
+ "version": "1.25.1",
+ "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.25.1.tgz",
+ "integrity": "sha512-pD8XsvNJNgTNkFngNlM60my/X8dXWPKVzN5RghEQr0NjGZmuCjy49AfFu2cGbZjNf5pBcqd2RCNMW912P5fkhA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "dependencies": {
+ "@sveltejs/vite-plugin-svelte": "^2.4.1",
+ "@types/cookie": "^0.5.1",
+ "cookie": "^0.5.0",
+ "devalue": "^4.3.1",
+ "esm-env": "^1.0.0",
+ "kleur": "^4.1.5",
+ "magic-string": "^0.30.0",
+ "mime": "^3.0.0",
+ "sade": "^1.8.1",
+ "set-cookie-parser": "^2.6.0",
+ "sirv": "^2.0.2",
+ "tiny-glob": "^0.2.9",
+ "undici": "~5.25.0"
+ },
+ "bin": {
+ "svelte-kit": "svelte-kit.js"
+ },
+ "engines": {
+ "node": "^16.14 || >=18"
+ },
+ "peerDependencies": {
+ "svelte": "^3.54.0 || ^4.0.0-next.0",
+ "vite": "^4.0.0"
+ }
+ },
+ "node_modules/@sveltejs/vite-plugin-svelte": {
+ "version": "2.4.6",
+ "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.6.tgz",
+ "integrity": "sha512-zO79p0+DZnXPnF0ltIigWDx/ux7Ni+HRaFOw720Qeivc1azFUrJxTl0OryXVibYNx1hCboGia1NRV3x8RNv4cA==",
+ "dev": true,
+ "dependencies": {
+ "@sveltejs/vite-plugin-svelte-inspector": "^1.0.4",
+ "debug": "^4.3.4",
+ "deepmerge": "^4.3.1",
+ "kleur": "^4.1.5",
+ "magic-string": "^0.30.3",
+ "svelte-hmr": "^0.15.3",
+ "vitefu": "^0.2.4"
+ },
+ "engines": {
+ "node": "^14.18.0 || >= 16"
+ },
+ "peerDependencies": {
+ "svelte": "^3.54.0 || ^4.0.0",
+ "vite": "^4.0.0"
+ }
+ },
+ "node_modules/@sveltejs/vite-plugin-svelte-inspector": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.4.tgz",
+ "integrity": "sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^14.18.0 || >= 16"
+ },
+ "peerDependencies": {
+ "@sveltejs/vite-plugin-svelte": "^2.2.0",
+ "svelte": "^3.54.0 || ^4.0.0",
+ "vite": "^4.0.0"
+ }
+ },
+ "node_modules/@types/cookie": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.2.tgz",
+ "integrity": "sha512-DBpRoJGKJZn7RY92dPrgoMew8xCWc2P71beqsjyhEI/Ds9mOyVmBwtekyfhpwFIVt1WrxTonFifiOZ62V8CnNA==",
+ "dev": true
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz",
+ "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==",
+ "dev": true
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.13",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",
+ "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==",
+ "dev": true
+ },
+ "node_modules/@types/pug": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/@types/pug/-/pug-2.0.7.tgz",
+ "integrity": "sha512-I469DU0UXNC1aHepwirWhu9YKg5fkxohZD95Ey/5A7lovC+Siu+MCLffva87lnfThaOrw9Vb1DUN5t55oULAAw==",
+ "dev": true
+ },
+ "node_modules/@types/semver": {
+ "version": "7.5.3",
+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",
+ "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",
+ "dev": true
+ },
+ "node_modules/@typescript-eslint/eslint-plugin": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz",
+ "integrity": "sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/regexpp": "^4.5.1",
+ "@typescript-eslint/scope-manager": "6.7.4",
+ "@typescript-eslint/type-utils": "6.7.4",
+ "@typescript-eslint/utils": "6.7.4",
+ "@typescript-eslint/visitor-keys": "6.7.4",
+ "debug": "^4.3.4",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.4",
+ "natural-compare": "^1.4.0",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/parser": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.4.tgz",
+ "integrity": "sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/scope-manager": "6.7.4",
+ "@typescript-eslint/types": "6.7.4",
+ "@typescript-eslint/typescript-estree": "6.7.4",
+ "@typescript-eslint/visitor-keys": "6.7.4",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz",
+ "integrity": "sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.7.4",
+ "@typescript-eslint/visitor-keys": "6.7.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/type-utils": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz",
+ "integrity": "sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/typescript-estree": "6.7.4",
+ "@typescript-eslint/utils": "6.7.4",
+ "debug": "^4.3.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/types": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.4.tgz",
+ "integrity": "sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==",
+ "dev": true,
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/@typescript-eslint/typescript-estree": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz",
+ "integrity": "sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.7.4",
+ "@typescript-eslint/visitor-keys": "6.7.4",
+ "debug": "^4.3.4",
+ "globby": "^11.1.0",
+ "is-glob": "^4.0.3",
+ "semver": "^7.5.4",
+ "ts-api-utils": "^1.0.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@typescript-eslint/utils": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.4.tgz",
+ "integrity": "sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.4.0",
+ "@types/json-schema": "^7.0.12",
+ "@types/semver": "^7.5.0",
+ "@typescript-eslint/scope-manager": "6.7.4",
+ "@typescript-eslint/types": "6.7.4",
+ "@typescript-eslint/typescript-estree": "6.7.4",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/visitor-keys": {
+ "version": "6.7.4",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz",
+ "integrity": "sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==",
+ "dev": true,
+ "dependencies": {
+ "@typescript-eslint/types": "6.7.4",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^16.0.0 || >=18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+ "dev": true
+ },
+ "node_modules/aria-query": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+ "dev": true,
+ "dependencies": {
+ "dequal": "^2.0.3"
+ }
+ },
+ "node_modules/array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/axobject-query": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz",
+ "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==",
+ "dev": true,
+ "dependencies": {
+ "dequal": "^2.0.3"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding":
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ,
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chokidar/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/code-red": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz",
+ "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.4.15",
+ "@types/estree": "^1.0.1",
+ "acorn": "^8.10.0",
+ "estree-walker": "^3.0.3",
+ "periscopic": "^3.1.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/cookie": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/css-tree": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz",
+ "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==",
+ "dev": true,
+ "dependencies": {
+ "mdn-data": "2.0.30",
+ "source-map-js": "^1.0.1"
+ },
+ "engines": {
+ "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
+ }
+ },
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "dev": true,
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true
+ },
+ "node_modules/deepmerge": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/dequal": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
+ "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/detect-indent": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
+ "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/devalue": {
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz",
+ "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==",
+ "dev": true
+ },
+ "node_modules/dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "dependencies": {
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/doctrine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+ "dev": true,
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/es6-promise": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz",
+ "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==",
+ "dev": true
+ },
+ "node_modules/esbuild": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
+ "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.18.20",
+ "@esbuild/android-arm64": "0.18.20",
+ "@esbuild/android-x64": "0.18.20",
+ "@esbuild/darwin-arm64": "0.18.20",
+ "@esbuild/darwin-x64": "0.18.20",
+ "@esbuild/freebsd-arm64": "0.18.20",
+ "@esbuild/freebsd-x64": "0.18.20",
+ "@esbuild/linux-arm": "0.18.20",
+ "@esbuild/linux-arm64": "0.18.20",
+ "@esbuild/linux-ia32": "0.18.20",
+ "@esbuild/linux-loong64": "0.18.20",
+ "@esbuild/linux-mips64el": "0.18.20",
+ "@esbuild/linux-ppc64": "0.18.20",
+ "@esbuild/linux-riscv64": "0.18.20",
+ "@esbuild/linux-s390x": "0.18.20",
+ "@esbuild/linux-x64": "0.18.20",
+ "@esbuild/netbsd-x64": "0.18.20",
+ "@esbuild/openbsd-x64": "0.18.20",
+ "@esbuild/sunos-x64": "0.18.20",
+ "@esbuild/win32-arm64": "0.18.20",
+ "@esbuild/win32-ia32": "0.18.20",
+ "@esbuild/win32-x64": "0.18.20"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "8.50.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz",
+ "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.6.1",
+ "@eslint/eslintrc": "^2.1.2",
+ "@eslint/js": "8.50.0",
+ "@humanwhocodes/config-array": "^0.11.11",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@nodelib/fs.walk": "^1.2.8",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
+ "debug": "^4.3.2",
+ "doctrine": "^3.0.0",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^7.2.2",
+ "eslint-visitor-keys": "^3.4.3",
+ "espree": "^9.6.1",
+ "esquery": "^1.4.2",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^6.0.1",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "globals": "^13.19.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "is-path-inside": "^3.0.3",
+ "js-yaml": "^4.1.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.4.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3",
+ "strip-ansi": "^6.0.1",
+ "text-table": "^0.2.0"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-config-prettier": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz",
+ "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==",
+ "dev": true,
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-svelte": {
+ "version": "2.34.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.34.0.tgz",
+ "integrity": "sha512-4RYUgNai7wr0v+T/kljMiYSjC/oqwgq5i+cPppawryAayj4C7WK1ixFlWCGmNmBppnoKCl4iA4ZPzPtlHcb4CA==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14",
+ "debug": "^4.3.1",
+ "esutils": "^2.0.3",
+ "known-css-properties": "^0.28.0",
+ "postcss": "^8.4.5",
+ "postcss-load-config": "^3.1.4",
+ "postcss-safe-parser": "^6.0.0",
+ "postcss-selector-parser": "^6.0.11",
+ "semver": "^7.5.3",
+ "svelte-eslint-parser": ">=0.33.0 <1.0.0"
+ },
+ "engines": {
+ "node": "^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ota-meshi"
+ },
+ "peerDependencies": {
+ "eslint": "^7.0.0 || ^8.0.0-0",
+ "svelte": "^3.37.0 || ^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "svelte": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
+ "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
+ "dev": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esm-env": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz",
+ "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==",
+ "dev": true
+ },
+ "node_modules/espree": {
+ "version": "9.6.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
+ "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.9.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
+ "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",
+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "^1.0.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-glob/node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true
+ },
+ "node_modules/fastq": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+ "dev": true,
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/file-entry-cache": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+ "dev": true,
+ "dependencies": {
+ "flat-cache": "^3.0.4"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz",
+ "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==",
+ "dev": true,
+ "dependencies": {
+ "flatted": "^3.2.7",
+ "keyv": "^4.5.3",
+ "rimraf": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.2.9",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
+ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
+ "dev": true
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os":
+ "darwin"
+ ,
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/globals": {
+ "version": "13.22.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz",
+ "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==",
+ "dev": true,
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globalyzer": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
+ "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==",
+ "dev": true
+ },
+ "node_modules/globby": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
+ "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
+ "dev": true,
+ "dependencies": {
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.2.9",
+ "ignore": "^5.2.0",
+ "merge2": "^1.4.1",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/globrex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==",
+ "dev": true
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true
+ },
+ "node_modules/graphemer": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
+ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
+ "dev": true
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-path-inside": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-reference": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz",
+ "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true
+ },
+ "node_modules/keyv": {
+ "version": "4.5.3",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz",
+ "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==",
+ "dev": true,
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/kleur": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
+ "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/known-css-properties": {
+ "version": "0.28.0",
+ "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.28.0.tgz",
+ "integrity": "sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==",
+ "dev": true
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/lilconfig": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
+ "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/locate-character": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz",
+ "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==",
+ "dev": true
+ },
+ "node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/magic-string": {
+ "version": "0.30.4",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz",
+ "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.4.15"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/mdn-data": {
+ "version": "2.0.30",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
+ "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
+ "dev": true
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mime": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
+ "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
+ "dev": true,
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/min-indent": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/mkdirp": {
+ "version": "0.5.6",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.6"
+ },
+ "bin": {
+ "mkdirp": "bin/cmd.js"
+ }
+ },
+ "node_modules/mri": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz",
+ "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mrmime": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz",
+ "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
+ "dev": true,
+ "funding":
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ,
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
+ "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
+ "dev": true,
+ "dependencies": {
+ "@aashutoshrathi/word-wrap": "^1.2.3",
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/periscopic": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz",
+ "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "estree-walker": "^3.0.0",
+ "is-reference": "^3.0.0"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
+ "dev": true,
+ "funding":
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ,
+ "dependencies": {
+ "nanoid": "^3.3.6",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss-load-config": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz",
+ "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==",
+ "dev": true,
+ "dependencies": {
+ "lilconfig": "^2.0.5",
+ "yaml": "^1.10.2"
+ },
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ "peerDependencies": {
+ "postcss": ">=8.0.9",
+ "ts-node": ">=9.0.0"
+ },
+ "peerDependenciesMeta": {
+ "postcss": {
+ "optional": true
+ },
+ "ts-node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/postcss-safe-parser": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz",
+ "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ "peerDependencies": {
+ "postcss": "^8.3.3"
+ }
+ },
+ "node_modules/postcss-scss": {
+ "version": "4.0.9",
+ "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz",
+ "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==",
+ "dev": true,
+ "funding":
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss-scss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ,
+ "engines": {
+ "node": ">=12.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.4.29"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "6.0.13",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+ "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
+ "dev": true,
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/prettier-plugin-svelte": {
+ "version": "2.10.1",
+ "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-2.10.1.tgz",
+ "integrity": "sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==",
+ "dev": true,
+ "peerDependencies": {
+ "prettier": "^1.16.4 || ^2.0.0",
+ "svelte": "^3.2.0 || ^4.0.0-next.0"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
+ "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true,
+ "funding":
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true,
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "3.29.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
+ "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
+ "dev": true,
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=14.18.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "funding":
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ,
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/sade": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz",
+ "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==",
+ "dev": true,
+ "dependencies": {
+ "mri": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/sander": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/sander/-/sander-0.5.1.tgz",
+ "integrity": "sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==",
+ "dev": true,
+ "dependencies": {
+ "es6-promise": "^3.1.2",
+ "graceful-fs": "^4.1.3",
+ "mkdirp": "^0.5.1",
+ "rimraf": "^2.5.2"
+ }
+ },
+ "node_modules/sander/node_modules/rimraf": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/set-cookie-parser": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
+ "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==",
+ "dev": true
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/sirv": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.3.tgz",
+ "integrity": "sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==",
+ "dev": true,
+ "dependencies": {
+ "@polka/url": "^1.0.0-next.20",
+ "mrmime": "^1.0.0",
+ "totalist": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/sorcery": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz",
+ "integrity": "sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.4.14",
+ "buffer-crc32": "^0.2.5",
+ "minimist": "^1.2.0",
+ "sander": "^0.5.0"
+ },
+ "bin": {
+ "sorcery": "bin/sorcery"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-indent": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
+ "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
+ "dev": true,
+ "dependencies": {
+ "min-indent": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/svelte": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.1.tgz",
+ "integrity": "sha512-LpLqY2Jr7cRxkrTc796/AaaoMLF/1ax7cto8Ot76wrvKQhrPmZ0JgajiWPmg9mTSDqO16SSLiD17r9MsvAPTmw==",
+ "dev": true,
+ "dependencies": {
+ "@ampproject/remapping": "^2.2.1",
+ "@jridgewell/sourcemap-codec": "^1.4.15",
+ "@jridgewell/trace-mapping": "^0.3.18",
+ "acorn": "^8.9.0",
+ "aria-query": "^5.3.0",
+ "axobject-query": "^3.2.1",
+ "code-red": "^1.0.3",
+ "css-tree": "^2.3.1",
+ "estree-walker": "^3.0.3",
+ "is-reference": "^3.0.1",
+ "locate-character": "^3.0.0",
+ "magic-string": "^0.30.0",
+ "periscopic": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/svelte-check": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.5.2.tgz",
+ "integrity": "sha512-5a/YWbiH4c+AqAUP+0VneiV5bP8YOk9JL3jwvN+k2PEPLgpu85bjQc5eE67+eIZBBwUEJzmO3I92OqKcqbp3fw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "chokidar": "^3.4.1",
+ "fast-glob": "^3.2.7",
+ "import-fresh": "^3.2.1",
+ "picocolors": "^1.0.0",
+ "sade": "^1.7.4",
+ "svelte-preprocess": "^5.0.4",
+ "typescript": "^5.0.3"
+ },
+ "bin": {
+ "svelte-check": "bin/svelte-check"
+ },
+ "peerDependencies": {
+ "svelte": "^3.55.0 || ^4.0.0-next.0 || ^4.0.0"
+ }
+ },
+ "node_modules/svelte-eslint-parser": {
+ "version": "0.33.1",
+ "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.33.1.tgz",
+ "integrity": "sha512-vo7xPGTlKBGdLH8T5L64FipvTrqv3OQRx9d2z5X05KKZDlF4rQk8KViZO4flKERY+5BiVdOh7zZ7JGJWo5P0uA==",
+ "dev": true,
+ "dependencies": {
+ "eslint-scope": "^7.0.0",
+ "eslint-visitor-keys": "^3.0.0",
+ "espree": "^9.0.0",
+ "postcss": "^8.4.29",
+ "postcss-scss": "^4.0.8"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ota-meshi"
+ },
+ "peerDependencies": {
+ "svelte": "^3.37.0 || ^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "svelte": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/svelte-hmr": {
+ "version": "0.15.3",
+ "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz",
+ "integrity": "sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20 || ^14.13.1 || >= 16"
+ },
+ "peerDependencies": {
+ "svelte": "^3.19.0 || ^4.0.0"
+ }
+ },
+ "node_modules/svelte-preprocess": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.0.4.tgz",
+ "integrity": "sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "dependencies": {
+ "@types/pug": "^2.0.6",
+ "detect-indent": "^6.1.0",
+ "magic-string": "^0.27.0",
+ "sorcery": "^0.11.0",
+ "strip-indent": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 14.10.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.10.2",
+ "coffeescript": "^2.5.1",
+ "less": "^3.11.3 || ^4.0.0",
+ "postcss": "^7 || ^8",
+ "postcss-load-config": "^2.1.0 || ^3.0.0 || ^4.0.0",
+ "pug": "^3.0.0",
+ "sass": "^1.26.8",
+ "stylus": "^0.55.0",
+ "sugarss": "^2.0.0 || ^3.0.0 || ^4.0.0",
+ "svelte": "^3.23.0 || ^4.0.0-next.0 || ^4.0.0",
+ "typescript": ">=3.9.5 || ^4.0.0 || ^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@babel/core": {
+ "optional": true
+ },
+ "coffeescript": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "postcss": {
+ "optional": true
+ },
+ "postcss-load-config": {
+ "optional": true
+ },
+ "pug": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/svelte-preprocess/node_modules/magic-string": {
+ "version": "0.27.0",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",
+ "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.4.13"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/text-table": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
+ "dev": true
+ },
+ "node_modules/tiny-glob": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
+ "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
+ "dev": true,
+ "dependencies": {
+ "globalyzer": "0.1.0",
+ "globrex": "^0.1.2"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/totalist": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz",
+ "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/ts-api-utils": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz",
+ "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==",
+ "dev": true,
+ "engines": {
+ "node": ">=16.13.0"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.2.0"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
+ "dev": true
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/typescript": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
+ "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
+ "node_modules/undici": {
+ "version": "5.25.4",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz",
+ "integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==",
+ "dev": true,
+ "dependencies": {
+ "@fastify/busboy": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "dev": true
+ },
+ "node_modules/vite": {
+ "version": "4.4.10",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.10.tgz",
+ "integrity": "sha512-TzIjiqx9BEXF8yzYdF2NTf1kFFbjMjUSV0LFZ3HyHoI3SGSPLnnFUKiIQtL3gl2AjHvMrprOvQ3amzaHgQlAxw==",
+ "dev": true,
+ "dependencies": {
+ "esbuild": "^0.18.10",
+ "postcss": "^8.4.27",
+ "rollup": "^3.27.1"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ },
+ "peerDependencies": {
+ "@types/node": ">= 14",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vitefu": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz",
+ "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==",
+ "dev": true,
+ "peerDependencies": {
+ "vite": "^3.0.0 || ^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "vite": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/yaml": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ }
+ }
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/package.json
Added
+{
+ "name": "pages",
+ "version": "0.0.1",
+ "scripts": {
+ "dev": "vite dev",
+ "build": "vite build",
+ "preview": "vite preview",
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
+ "lint": "prettier --plugin-search-dir . --check . && eslint .",
+ "format": "prettier --plugin-search-dir . --write ."
+ },
+ "devDependencies": {
+ "@fontsource/fira-mono": "^4.5.10",
+ "@neoconfetti/svelte": "^1.0.0",
+ "@sveltejs/adapter-static": "^2.0.3",
+ "@sveltejs/kit": "^1.20.4",
+ "@types/cookie": "^0.5.1",
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
+ "@typescript-eslint/parser": "^6.0.0",
+ "eslint": "^8.28.0",
+ "eslint-config-prettier": "^8.5.0",
+ "eslint-plugin-svelte": "^2.30.0",
+ "prettier": "^2.8.0",
+ "prettier-plugin-svelte": "^2.10.1",
+ "svelte": "^4.0.5",
+ "svelte-check": "^3.4.3",
+ "tslib": "^2.4.1",
+ "typescript": "^5.0.0",
+ "vite": "^4.4.2"
+ },
+ "type": "module"
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/src
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/app.d.ts
Added
+// See https://kit.svelte.dev/docs/types#app
+// for information about these interfaces
+declare global {
+ namespace App {
+ // interface Error {}
+ // interface Locals {}
+ // interface PageData {}
+ // interface Platform {}
+ }
+}
+
+export {};
obs-backgroundremoval-1.1.13.tar.gz/pages/src/app.html
Added
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <link rel="icon" href="%sveltekit.assets%/favicon.png" />
+ <meta name="viewport" content="width=device-width" />
+ %sveltekit.head%
+ </head>
+ <body data-sveltekit-preload-data="hover">
+ <div style="display: contents">%sveltekit.body%</div>
+ </body>
+</html>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/github-release.ts
Added
+interface GitHubLatestReleaseAsset {
+ readonly browser_download_url: string;
+ readonly name: string;
+}
+
+export interface GitHubLatestReleaseResult {
+ readonly assets: GitHubLatestReleaseAsset;
+}
+
+function getHeaders(): Record<string, string> {
+ const { GITHUB_TOKEN } = process.env;
+ if (GITHUB_TOKEN) {
+ return {
+ authorization: `Bearer ${GITHUB_TOKEN}`
+ };
+ } else {
+ return {};
+ }
+}
+
+export async function getLatestReleaseMetadata(
+ owner: string = 'occ-ai',
+ repo: string = 'obs-backgroundremoval'
+): Promise<GitHubLatestReleaseResult> {
+ const url = `https://api.github.com/repos/${owner}/${repo}/releases/latest`;
+ const response = await fetch(url, { headers: getHeaders() });
+ const json = await response.json();
+ if (!response.ok) {
+ console.error(json);
+ throw new Error(`The latest release of ${owner}/${repo} cannot be retrieved!`);
+ }
+ return json;
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/lib/images/github.svg
Added
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 30 30">
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5229 6.47715 22 12 22C17.5229 22 22 17.5229 22 12C22 6.47715 17.5229 2 12 2ZM0 12C0 5.3726 5.3726 0 12 0C18.6274 0 24 5.3726 24 12C24 18.6274 18.6274 24 12 24C5.3726 24 0 18.6274 0 12Z"
+ fill="rgba(0,0,0,0.7)"
+ stroke="none"
+ />
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M9.59162 22.7357C9.49492 22.6109 9.49492 21.4986 9.59162 19.399C8.55572 19.4347 7.90122 19.3628 7.62812 19.1833C7.21852 18.9139 6.80842 18.0833 6.44457 17.4979C6.08072 16.9125 5.27312 16.8199 4.94702 16.6891C4.62091 16.5582 4.53905 16.0247 5.84562 16.4282C7.15222 16.8316 7.21592 17.9303 7.62812 18.1872C8.04032 18.4441 9.02572 18.3317 9.47242 18.1259C9.91907 17.9201 9.88622 17.1538 9.96587 16.8503C10.0666 16.5669 9.71162 16.5041 9.70382 16.5018C9.26777 16.5018 6.97697 16.0036 6.34772 13.7852C5.71852 11.5669 6.52907 10.117 6.96147 9.49369C7.24972 9.07814 7.22422 8.19254 6.88497 6.83679C8.11677 6.67939 9.06732 7.06709 9.73672 7.99999C9.73737 8.00534 10.6143 7.47854 12.0001 7.47854C13.386 7.47854 13.8777 7.90764 14.2571 7.99999C14.6365 8.09234 14.94 6.36699 17.2834 6.83679C16.7942 7.79839 16.3844 8.99999 16.6972 9.49369C17.0099 9.98739 18.2372 11.5573 17.4833 13.7852C16.9807 15.2706 15.9927 16.1761 14.5192 16.5018C14.3502 16.5557 14.2658 16.6427 14.2658 16.7627C14.2658 16.9427 14.4942 16.9624 14.8233 17.8058C15.0426 18.368 15.0585 19.9739 14.8708 22.6234C14.3953 22.7445 14.0254 22.8257 13.7611 22.8673C13.2924 22.9409 12.7835 22.9822 12.2834 22.9982C11.7834 23.0141 11.6098 23.0123 10.9185 22.948C10.4577 22.9051 10.0154 22.8343 9.59162 22.7357Z"
+ fill="rgba(0,0,0,0.7)"
+ stroke="none"
+ />
+</svg>
\ No newline at end of file
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/+layout.svelte
Added
+<script>
+ import Header from './Header.svelte';
+ import './styles.css';
+</script>
+
+<div class="app">
+ <Header />
+
+ <main>
+ <slot />
+ </main>
+</div>
+
+<style>
+ .app {
+ display: flex;
+ flex-direction: column;
+ min-height: 100vh;
+ }
+
+ main {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ padding: 1rem;
+ width: 100%;
+ max-width: 64rem;
+ margin: 0 auto;
+ box-sizing: border-box;
+ }
+</style>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+</script>
+
+<svelte:head>
+ <title>OBS Background Removal</title>
+ <meta
+ name="description"
+ content="OBS Plugin: Background Removal / Virtual Green-screen and Low-Light Enhancement"
+ />
+</svelte:head>
+
+<section>
+ <header>
+ <h1>OBS Background Removal</h1>
+ <h2>
+ OBS Plugin: Background Removal / Virtual Green-screen and Low-Light Enhancement
+ </h2>
+ </header>
+
+ <p>See our <a href="{base}/usage">Usage</a> page for instructions on usage in OBS</p>
+
+ <h1>Download and Install (Official)</h1>
+ <a href="{base}/windows"><h2>Windows</h2></a>
+ <a href="{base}/macos"><h2>macOS</h2></a>
+ <a href="{base}/ubuntu"><h2>Ubuntu Linux</h2></a>
+ <a href="{base}/flatpak"><h2>FlatPak</h2></a>
+
+ <h1>Download and Install (Unofficial)</h1>
+ <a href="{base}/arch"><h2>Arch Linux</h2></a>
+ <a href="{base}/opensuse-tumbleweed"><h2>openSUSE Tumbleweed</h2></a>
+ <a href="{base}/fedora"><h2>Fedora</h2></a>
+</section>
+
+<style>
+ section {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex: 0.6;
+ }
+
+ h1 {
+ width: 100%;
+ }
+</style>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/+page.ts
Added
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/Header.svelte
Added
+<script>
+ import github from '$lib/images/github.svg';
+</script>
+
+<header>
+ <div class="corner" />
+
+ <nav />
+
+ <div class="corner">
+ <a href="https://github.com/obs-ai/obs-backgroundremoval">
+ <img src={github} alt="GitHub" />
+ </a>
+ </div>
+</header>
+
+<style>
+ header {
+ display: flex;
+ justify-content: space-between;
+ }
+
+ .corner {
+ width: 3em;
+ height: 3em;
+ }
+
+ .corner a {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ height: 100%;
+ }
+
+ .corner img {
+ width: 2em;
+ height: 2em;
+ object-fit: contain;
+ }
+
+ nav {
+ display: flex;
+ justify-content: center;
+ --background: rgba(255, 255, 255, 0.7);
+ }
+
+ a:hover {
+ color: var(--color-theme-1);
+ }
+</style>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/arch
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/arch/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal on Arch Linux</title>
+ <meta name="description" content="How to use OBS Background Removal on Arch Linux" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Download and install on Arch Linux</h1>
+
+ <p>
+ <a
+ href="https://github.com/obsproject/obs-studio/wiki/Unofficial-Linux-Builds#arch-linuxmanjaro"
+ >Install the latest OBS by following the guide of unofficial builds</a
+ >
+ </p>
+
+ <p>
+ <a href="https://aur.archlinux.org/packages/obs-backgroundremoval"
+ >Download PKGBUILD of obs-backgroundremoval from AUR</a
+ >
+ </p>
+
+ <p>Build your package by running:</p>
+
+ <pre>makepkg --syncdeps</pre>
+
+ <p>Install your package by running:</p>
+
+ <pre>makepkg --install</pre>
+
+ <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/arch/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/fedora
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/fedora/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal on Fedora</title>
+ <meta name="description" content="How to use OBS Background Removal on Fedora" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Download and install on Fedora</h1>
+
+ <p>You need to build the obs-backgroundremoval plugin by yourself</p>
+
+ <p>
+ <a href="https://github.com/obsproject/obs-studio/wiki/Unofficial-Linux-Builds#fedora"
+ >Install the latest OBS by following the guide of unofficial builds</a
+ >
+ </p>
+
+ <p>
+ <a href="https://github.com/obs-ai/obs-backgroundremoval/blob/main/docs/BUILDING-FEDORA.md"
+ >Build and install the obs-backgroundremoval plugin by following the guide on the repository</a
+ >
+ </p>
+
+ <p>Start your OBS</p>
+
+ <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/fedora/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/flatpak
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/flatpak/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal on FlatPak</title>
+ <meta name="description" content="How to use OBS Background Removal on FlatPak" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Download and install on FlatPak</h1>
+
+ <p>
+ <a href="https://flathub.org/apps/com.obsproject.Studio">Install the latest OBS from FlatHub</a>
+ </p>
+
+ <p>Install com.obsproject.Studio.Plugin.BackgroundRemoval from FlatHub:</p>
+
+ <pre>flatpak install flathub com.obsproject.Studio.Plugin.BackgroundRemoval</pre>
+
+ <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/flatpak/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos/+page.server.ts
Added
+import { getLatestReleaseMetadata } from '../../lib/github-release';
+
+/** @type {import('./$types').PageLoad} */
+export async function load() {
+ return { metadata: await getLatestReleaseMetadata() };
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+ /** @type {import('./$types').PageData} */
+ export let data;
+ const asset = data.metadata.assets.find((e) => /macos-universal\.pkg/.test(e.name));
+ if (!asset) throw new Error('Ubuntu asset not found!');
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal on macOS</title>
+ <meta name="description" content="How to use OBS Background Removal on macOS" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Download and install on macOS</h1>
+
+ <p>
+ <a href="https://obsproject.com/ja/download"
+ >Downlaod and install the latest OBS (Both of Intel and Apple Silicon are applicable)</a
+ >
+ </p>
+
+ <p><a href={asset.browser_download_url}>Download the pkg installer for macOS</a></p>
+
+ <p>Install {asset.name}</p>
+
+ <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/macos/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/opensuse-tumbleweed
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/opensuse-tumbleweed/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+ /** @type {import('./$types').PageData} */
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal on openSUSE Tumbleweed</title>
+ <meta name="description" content="How to use OBS Background Removal on openSUSE Tumbleweed" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Download and install on openSUSE Tumbleweed</h1>
+
+ <p>You need to build the obs-backgroundremoval plugin by yourself</p>
+
+ <p>
+ <a href="https://github.com/obsproject/obs-studio/wiki/Unofficial-Linux-Builds#opensuse"
+ >Install the latest OBS by following the guide of unofficial builds</a
+ >
+ </p>
+
+ <p>
+ <a href="https://github.com/obs-ai/obs-backgroundremoval/blob/main/docs/BUILDING-OPENSUSE.md"
+ >Build and install the obs-backgroundremoval plugin by following the guide on the repository</a
+ >
+ </p>
+
+ <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/opensuse-tumbleweed/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/styles.css
Added
+@import '@fontsource/fira-mono';
+
+:root {
+ --font-body: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
+ Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+ --font-mono: 'Fira Mono', monospace;
+ --color-bg-0: rgb(202, 216, 228);
+ --color-bg-1: hsl(209, 36%, 86%);
+ --color-bg-2: hsl(224, 44%, 95%);
+ --color-theme-1: #ff3e00;
+ --color-theme-2: #4075a6;
+ --color-text: rgba(0, 0, 0, 0.7);
+ --column-width: 42rem;
+ --column-margin-top: 4rem;
+ font-family: var(--font-body);
+ color: var(--color-text);
+}
+
+body {
+ min-height: 100vh;
+ margin: 0;
+ background-attachment: fixed;
+ background-color: var(--color-bg-1);
+ background-size: 100vw 100vh;
+ background-image: radial-gradient(
+ 50% 50% at 50% 50%,
+ rgba(255, 255, 255, 0.75) 0%,
+ rgba(255, 255, 255, 0) 100%
+ ),
+ linear-gradient(180deg, var(--color-bg-0) 0%, var(--color-bg-1) 15%, var(--color-bg-2) 50%);
+}
+
+h1,
+h2,
+p {
+ font-weight: 400;
+}
+
+p {
+ line-height: 1.5;
+}
+
+a {
+ color: var(--color-theme-1);
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+h1 {
+ font-size: 2rem;
+ text-align: center;
+}
+
+h2 {
+ font-size: 1rem;
+}
+
+pre {
+ font-size: 16px;
+ font-family: var(--font-mono);
+ background-color: rgba(255, 255, 255, 0.45);
+ border-radius: 3px;
+ box-shadow: 2px 2px 6px rgb(255 255 255 / 25%);
+ padding: 0.5em;
+ overflow-x: auto;
+ color: var(--color-text);
+}
+
+.text-column {
+ display: flex;
+ max-width: 48rem;
+ flex: 0.6;
+ flex-direction: column;
+ justify-content: center;
+ margin: 0 auto;
+}
+
+input,
+button {
+ font-size: inherit;
+ font-family: inherit;
+}
+
+button:focus:not(:focus-visible) {
+ outline: none;
+}
+
+@media (min-width: 720px) {
+ h1 {
+ font-size: 2.4rem;
+ }
+}
+
+.visually-hidden {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: auto;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+ white-space: nowrap;
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu/+page.server.ts
Added
+import { getLatestReleaseMetadata } from '../../lib/github-release';
+
+/** @type {import('./$types').PageLoad} */
+export async function load() {
+ return { metadata: await getLatestReleaseMetadata() };
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+ /** @type {import('./$types').PageData} */
+ export let data;
+ const asset = data.metadata.assets.find((e) => /x86_64-linux-gnu\.deb/.test(e.name));
+ if (!asset) throw new Error('Ubuntu asset not found!');
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal on Ubuntu Linux</title>
+ <meta name="description" content="How to use OBS Background Removal on Ubuntu Linux" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Download and install on Ubuntu Linux</h1>
+
+ <p><a href="https://obsproject.com/ja/download">Install the latest OBS from PPA</a></p>
+
+ <p><a href={asset.browser_download_url}>Download the deb package for Ubuntu Linux</a></p>
+
+ <p>Install {asset.name}</p>
+
+ <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/ubuntu/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/usage
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/usage/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+ import addAVideoCaptureSource from '$lib/images/addAVideoCaptureSource.png';
+ import addBackgroundRemoval from '$lib/images/addBackgroundRemoval.png';
+ import captureFilters from '$lib/images/captureFilters.png';
+ import filterSettings from '$lib/images/filterSettings.png';
+ import filterSettingsAdvanced from '$lib/images/filterSettingsAdvanced.png';
+ import installWizard from '$lib/images/installWizard.png';
+ import runUnkPublisher from '$lib/images/runUnkPublisher.png';
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal</title>
+ <meta name="description" content="How to use OBS Background Removal" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Using OBS Background Removal</h1>
+
+ <p>Start OBS</p>
+
+ <p>Optionally add a video capture source. The plugin works on any source that provides an image render: Video,
+ Image, Media, Browser, Screen Capture, etc.</p>
+
+ <p><img src={addAVideoCaptureSource} width="400" /></p>
+
+ <p>Open the filters dialog on that source</p>
+
+ <p><img src={captureFilters} width="400" /></p>
+
+ <p>Add the Background Removal filter on the Effects filter. If you can't see the filter then the installation
+ process failed, or there is incompatibility with your OBS.</p>
+
+ <p><img src={addBackgroundRemoval} width="400" /></p>
+
+ <p>View the BG Removal filter settings</p>
+
+ <p><img src={filterSettings} width="400" /></p>
+
+ <p>Optionally use the advanced settings to change the behavior of the filter</p>
+
+ <p><img src={filterSettingsAdvanced} width="400" /></p>
+
+ <p>
+ Advice on how to get the best results:
+ <ul>
+ <li>Use a good camera, and good lighting.</li>
+ <li>The Mediapipe model is the fastest, but may not be the highest accuracy. We recommend setting the thresold
+ very low, like 0.05, to capture the whole portrait.</li>
+ <li>The Robust Video Matting (RVM) model gives the highest accuracy and also least "flickering", but it's not
+ the fastest.</li>
+ <li>The TCMonoDepth is a depth estimation model, not a background segmentation model, and can be used both for
+ portrait segmentation as well as "Depth of Field" blur effect. See the <a
+ href="https://youtu.be/jC3EKSpNjQk" target="_blank">tutorial/preview</a>.</li>
+ <li>The RMBG model is a general background Removal model for any object, not just for humans. See the
+ <a href="https://youtu.be/N74VCDCToX8">tutorial/preview</a>.</li>
+ </ul>
+
+ <p>
+ View our tutorial videos <a href="https://youtu.be/veqNEsMqEE0">here</a>
+ </p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/usage/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows/+page.server.ts
Added
+import { getLatestReleaseMetadata } from '../../lib/github-release';
+
+/** @type {import('./$types').PageLoad} */
+export async function load() {
+ return { metadata: await getLatestReleaseMetadata() };
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows/+page.svelte
Added
+<script>
+ import { base } from '$app/paths';
+ /** @type {import('./$types').PageData} */
+ export let data;
+ const asset = data.metadata.assets.find((e) => /windows-x64-Installer\.exe/.test(e.name));
+ if (!asset) throw new Error('Windows asset not found!');
+ import addAVideoCaptureSource from '$lib/images/addAVideoCaptureSource.png';
+ import addBackgroundRemoval from '$lib/images/addBackgroundRemoval.png';
+ import captureFilters from '$lib/images/captureFilters.png';
+ import filterSettings from '$lib/images/filterSettings.png';
+ import filterSettingsAdvanced from '$lib/images/filterSettingsAdvanced.png';
+ import installWizard from '$lib/images/installWizard.png';
+ import runUnkPublisher from '$lib/images/runUnkPublisher.png';
+ import checkDll from '$lib/images/checkDll.png';
+</script>
+
+<svelte:head>
+ <title>How to use OBS Background Removal on Windows</title>
+ <meta name="description" content="How to use OBS Background Removal on Windows" />
+</svelte:head>
+
+<div class="text-column">
+ <h1>Download and install on Windows</h1>
+
+ <p>The plugin supports OBS v29.x+ and a 64bit Windows</p>
+
+ <p><a href="https://obsproject.com/ja/download">Downlaod and install the latest OBS for 64bit</a></p>
+
+ <p><a href={asset.browser_download_url}>Download the installer for Windows</a></p>
+
+ <p>Execute {asset.name}. Allow it to run even if the publisher is unknown.</p>
+
+ <p><img src={runUnkPublisher} width="400" /></p>
+
+ <p>Follow the install wizard</p>
+
+ <p><img src={installWizard} width="400" /></p>
+
+ <p>Optionally ensure that the obs-backgroundremoval.dll exists in the OBS plugins folder:</p>
+
+ <p><code>C:\Program Files\obs-studio\obs-plugins\64bit\obs-backgroundremoval.dll</code></p>
+
+ <p><img src="{checkDll}" width="400" /></p>
+
+ <p>If your OBS is installed in <code>C:\Program Files (x86)\obs-studio</code> then consider re-installing the latest version of OBS 64bit.</p>
+
+ <p>See the <a href="{base}/usage">usage page</a> for how to use the plugin</p>
+
+ <p>All set!</p>
+
+ <p><a href="{base}/">Back to the top page</a></p>
+</div>
obs-backgroundremoval-1.1.13.tar.gz/pages/src/routes/windows/+page.ts
Added
+import { dev } from '$app/environment';
+
+// we don't need any JS on this page, though we'll load
+// it in dev so that we get hot module replacement
+export const csr = dev;
+
+// since there's no dynamic data here, we can prerender
+// it so that it gets served as a static asset in production
+export const prerender = true;
obs-backgroundremoval-1.1.13.tar.gz/pages/static
Added
+(directory)
obs-backgroundremoval-1.1.13.tar.gz/pages/static/robots.txt
Added
+# https://www.robotstxt.org/robotstxt.html
+User-agent: *
+Disallow:
obs-backgroundremoval-1.1.13.tar.gz/pages/svelte.config.js
Added
+import adapter from '@sveltejs/adapter-static';
+import { vitePreprocess } from '@sveltejs/kit/vite';
+
+/** @type {import('@sveltejs/kit').Config} */
+const config = {
+ preprocess: vitePreprocess(),
+
+ kit: {
+ adapter: adapter(),
+
+ paths: {
+ base: '/obs-backgroundremoval'
+ }
+ }
+};
+
+export default config;
obs-backgroundremoval-1.1.13.tar.gz/pages/tsconfig.json
Added
+{
+ "extends": "./.svelte-kit/tsconfig.json",
+ "compilerOptions": {
+ "allowJs": true,
+ "checkJs": true,
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "resolveJsonModule": true,
+ "skipLibCheck": true,
+ "sourceMap": true,
+ "strict": true
+ }
+ // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
+ //
+ // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
+ // from the referenced tsconfig.json - TypeScript does not merge them in
+}
obs-backgroundremoval-1.1.13.tar.gz/pages/vite.config.ts
Added
+import { sveltekit } from '@sveltejs/kit/vite';
+import { defineConfig } from 'vite';
+
+export default defineConfig({
+ plugins: sveltekit()
+});
obs-backgroundremoval-1.1.13.tar.gz/patch_libobs.diff
Added
+diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt
+index d2e2671..a08d948 100644
+--- a/libobs/CMakeLists.txt
++++ b/libobs/CMakeLists.txt
+@@ -287,6 +287,7 @@ set(public_headers
+ util/base.h
+ util/bmem.h
+ util/c99defs.h
++ util/config-file.h
+ util/darray.h
+ util/profiler.h
+ util/sse-intrin.h
obs-backgroundremoval-1.1.6.tar.gz/src/FilterData.h -> obs-backgroundremoval-1.1.13.tar.gz/src/FilterData.h
Changed
std::mutex outputLock;
#if _WIN32
- const wchar_t *modelFilepath = nullptr;
+ std::wstring modelFilepath;
#else
- const char *modelFilepath = nullptr;
+ std::string modelFilepath;
#endif
};
obs-backgroundremoval-1.1.6.tar.gz/src/background-filter.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/background-filter.cpp
Changed
#include <fstream>
#include <new>
#include <mutex>
+#include <regex>
+#include <thread>
#include <plugin-support.h>
#include "models/ModelSINET.h"
#include "models/ModelRVM.h"
#include "models/ModelPPHumanSeg.h"
#include "models/ModelTCMonoDepth.h"
+#include "models/ModelRMBG.h"
#include "FilterData.h"
#include "ort-utils/ort-session-utils.h"
#include "obs-utils/obs-utils.h"
#include "consts.h"
+#include "update-checker/update-checker.h"
struct background_removal_filter : public filter_data {
bool enableThreshold = true;
float feather = 0.0f;
cv::Mat backgroundMask;
+ cv::Mat lastBackgroundMask;
+ cv::Mat lastImageBGRA;
+ float temporalSmoothFactor = 0.0f;
+ float imageSimilarityThreshold = 35.0f;
+ bool enableImageSimilarity = true;
int maskEveryXFrames = 1;
int maskEveryXFramesCount = 0;
int64_t blurBackground = 0;
- bool enableFocalBlur = true;
+ bool enableFocalBlur = false;
float blurFocusPoint = 0.1f;
float blurFocusDepth = 0.1f;
gs_effect_t *effect;
gs_effect_t *kawaseBlurEffect;
+
+ std::mutex modelMutex;
};
+void background_removal_thread(void *data); // Forward declaration
+
const char *background_filter_getname(void *unused)
{
UNUSED_PARAMETER(unused);
/** PROPERTIES */
+static bool visible_on_bool(obs_properties_t *ppts, obs_data_t *settings,
+ const char *bool_prop, const char *prop_name)
+{
+ const bool enabled = obs_data_get_bool(settings, bool_prop);
+ obs_property_t *p = obs_properties_get(ppts, prop_name);
+ obs_property_set_visible(p, enabled);
+ return true;
+}
+
static bool enable_threshold_modified(obs_properties_t *ppts, obs_property_t *p,
obs_data_t *settings)
{
- const bool enabled = obs_data_get_bool(settings, "enable_threshold");
- p = obs_properties_get(ppts, "threshold");
- obs_property_set_visible(p, enabled);
- p = obs_properties_get(ppts, "contour_filter");
- obs_property_set_visible(p, enabled);
- p = obs_properties_get(ppts, "smooth_contour");
- obs_property_set_visible(p, enabled);
- p = obs_properties_get(ppts, "feather");
- obs_property_set_visible(p, enabled);
+ UNUSED_PARAMETER(p);
+ return visible_on_bool(ppts, settings, "enable_threshold",
+ "threshold_group");
+}
+
+static bool enable_focal_blur(obs_properties_t *ppts, obs_property_t *p,
+ obs_data_t *settings)
+{
+ UNUSED_PARAMETER(p);
+ return visible_on_bool(ppts, settings, "enable_focal_blur",
+ "focal_blur_group");
+}
+
+static bool enable_image_similarity(obs_properties_t *ppts, obs_property_t *p,
+ obs_data_t *settings)
+{
+ UNUSED_PARAMETER(p);
+ return visible_on_bool(ppts, settings, "enable_image_similarity",
+ "image_similarity_threshold");
+}
+
+static bool enable_advanced_settings(obs_properties_t *ppts, obs_property_t *p,
+ obs_data_t *settings)
+{
+ const bool enabled = obs_data_get_bool(settings, "advanced");
+ p = obs_properties_get(ppts, "blur_background");
+ obs_property_set_visible(p, true);
+
+ for (const char *prop_name :
+ {"model_select", "useGPU", "mask_every_x_frames", "numThreads",
+ "enable_focal_blur", "enable_threshold", "threshold_group",
+ "focal_blur_group", "temporal_smooth_factor",
+ "image_similarity_threshold", "enable_image_similarity"}) {
+ p = obs_properties_get(ppts, prop_name);
+ obs_property_set_visible(p, enabled);
+ }
+
+ if (enabled) {
+ enable_threshold_modified(ppts, p, settings);
+ enable_focal_blur(ppts, p, settings);
+ enable_image_similarity(ppts, p, settings);
+ }
return true;
}
{
obs_properties_t *props = obs_properties_create();
+ obs_property_t *advanced = obs_properties_add_bool(
+ props, "advanced", obs_module_text("Advanced"));
+
+ // If advanced is selected show the advanced settings, otherwise hide them
+ obs_property_set_modified_callback(advanced, enable_advanced_settings);
+
/* Threshold props */
obs_property_t *p_enable_threshold = obs_properties_add_bool(
props, "enable_threshold", obs_module_text("EnableThreshold"));
obs_property_set_modified_callback(p_enable_threshold,
enable_threshold_modified);
- obs_properties_add_float_slider(props, "threshold",
+ // Threshold props group
+ obs_properties_t *threshold_props = obs_properties_create();
+
+ obs_properties_add_float_slider(threshold_props, "threshold",
obs_module_text("Threshold"), 0.0, 1.0,
0.025);
obs_properties_add_float_slider(
- props, "contour_filter",
+ threshold_props, "contour_filter",
obs_module_text("ContourFilterPercentOfImage"), 0.0, 1.0,
0.025);
- obs_properties_add_float_slider(props, "smooth_contour",
+ obs_properties_add_float_slider(threshold_props, "smooth_contour",
obs_module_text("SmoothSilhouette"),
0.0, 1.0, 0.05);
obs_properties_add_float_slider(
- props, "feather", obs_module_text("FeatherBlendSilhouette"),
- 0.0, 1.0, 0.05);
+ threshold_props, "feather",
+ obs_module_text("FeatherBlendSilhouette"), 0.0, 1.0, 0.05);
+
+ obs_properties_add_group(props, "threshold_group",
+ obs_module_text("ThresholdGroup"),
+ OBS_GROUP_NORMAL, threshold_props);
/* GPU, CPU and performance Props */
obs_property_t *p_use_gpu = obs_properties_add_list(
obs_property_list_add_string(p_model_select,
obs_module_text("TCMonoDepth"),
MODEL_DEPTH_TCMONODEPTH);
+ obs_property_list_add_string(p_model_select, obs_module_text("RMBG"),
+ MODEL_RMBG);
+
+ obs_properties_add_float_slider(props, "temporal_smooth_factor",
+ obs_module_text("TemporalSmoothFactor"),
+ 0.0, 1.0, 0.01);
+
+ obs_property_t *p_enable_image_similarity = obs_properties_add_bool(
+ props, "enable_image_similarity",
+ obs_module_text("EnableImageSimilarity"));
+ obs_property_set_modified_callback(p_enable_image_similarity,
+ enable_image_similarity);
+
+ obs_properties_add_float_slider(
+ props, "image_similarity_threshold",
+ obs_module_text("ImageSimilarityThreshold"), 0.0, 100.0, 1.0);
/* Background Blur Props */
obs_properties_add_int_slider(
obs_property_t *p_enable_focal_blur = obs_properties_add_bool(
props, "enable_focal_blur", obs_module_text("EnableFocalBlur"));
- obs_property_set_modified_callback(
- p_enable_focal_blur,
- (obs_properties_t *ppts, obs_property_t *p,
- obs_data_t *settings) {
- UNUSED_PARAMETER(p);
- const bool enabled = obs_data_get_bool(
- settings, "enable_focal_blur");
- obs_property_t *prop =
- obs_properties_get(ppts, "blur_focus_point");
- obs_property_set_visible(prop, enabled);
- prop = obs_properties_get(ppts, "blur_focus_depth");
- obs_property_set_visible(prop, enabled);
- return true;
- });
-
- obs_properties_add_float_slider(props, "blur_focus_point",
+ obs_property_set_modified_callback(p_enable_focal_blur,
+ enable_focal_blur);
+
+ obs_properties_t *focal_blur_props = obs_properties_create();
+
+ obs_properties_add_float_slider(focal_blur_props, "blur_focus_point",
obs_module_text("BlurFocusPoint"), 0.0,
1.0, 0.05);
- obs_properties_add_float_slider(props, "blur_focus_depth",
+ obs_properties_add_float_slider(focal_blur_props, "blur_focus_depth",
obs_module_text("BlurFocusDepth"), 0.0,
0.3, 0.02);
+ obs_properties_add_group(props, "focal_blur_group",
+ obs_module_text("FocalBlurGroup"),
+ OBS_GROUP_NORMAL, focal_blur_props);
+
+ // Add a informative text about the plugin
+ // replace the placeholder with the current version
+ // use std::regex_replace instead of QString::arg because the latter doesn't work on Linux
+ std::string basic_info = std::regex_replace(
+ PLUGIN_INFO_TEMPLATE, std::regex("%1"), PLUGIN_VERSION);
+ // Check for update
+ if (get_latest_version() != nullptr) {
+ basic_info += std::regex_replace(
+ PLUGIN_INFO_TEMPLATE_UPDATE_AVAILABLE, std::regex("%1"),
+ get_latest_version());
+ }
+ obs_properties_add_text(props, "info", basic_info.c_str(),
+ OBS_TEXT_INFO);
+
UNUSED_PARAMETER(data);
return props;
}
void background_filter_defaults(obs_data_t *settings)
{
+ obs_data_set_default_bool(settings, "advanced", false);
obs_data_set_default_bool(settings, "enable_threshold", true);
obs_data_set_default_double(settings, "threshold", 0.5);
obs_data_set_default_double(settings, "contour_filter", 0.05);
obs_data_set_default_int(settings, "mask_every_x_frames", 1);
obs_data_set_default_int(settings, "blur_background", 0);
obs_data_set_default_int(settings, "numThreads", 1);
- obs_data_set_default_bool(settings, "enable_focal_blur", true);
+ obs_data_set_default_bool(settings, "enable_focal_blur", false);
+ obs_data_set_default_double(settings, "temporal_smooth_factor", 0.85);
+ obs_data_set_default_double(settings, "image_similarity_threshold",
+ 35.0);
+ obs_data_set_default_bool(settings, "enable_image_similarity", true);
obs_data_set_default_double(settings, "blur_focus_point", 0.1);
obs_data_set_default_double(settings, "blur_focus_depth", 0.0);
}
void background_filter_update(void *data, obs_data_t *settings)
{
+ obs_log(LOG_INFO, "Background filter updated");
struct background_removal_filter *tf =
reinterpret_cast<background_removal_filter *>(data);
+
+ tf->isDisabled = true;
+
tf->enableThreshold =
(float)obs_data_get_bool(settings, "enable_threshold");
tf->threshold = (float)obs_data_get_double(settings, "threshold");
(float)obs_data_get_double(settings, "blur_focus_point");
tf->blurFocusDepth =
(float)obs_data_get_double(settings, "blur_focus_depth");
+ tf->temporalSmoothFactor =
+ (float)obs_data_get_double(settings, "temporal_smooth_factor");
+ tf->imageSimilarityThreshold = (float)obs_data_get_double(
+ settings, "image_similarity_threshold");
+ tf->enableImageSimilarity =
+ (float)obs_data_get_bool(settings, "enable_image_similarity");
const std::string newUseGpu = obs_data_get_string(settings, "useGPU");
const std::string newModel =
if (tf->modelSelection.empty() || tf->modelSelection != newModel ||
tf->useGPU != newUseGpu || tf->numThreads != newNumThreads) {
+ // lock modelMutex
+ std::unique_lock<std::mutex> lock(tf->modelMutex);
+
// Re-initialize model if it's not already the selected one or switching inference device
tf->modelSelection = newModel;
tf->useGPU = newUseGpu;
if (tf->modelSelection == MODEL_DEPTH_TCMONODEPTH) {
tf->model.reset(new ModelTCMonoDepth);
}
+ if (tf->modelSelection == MODEL_RMBG) {
+ tf->model.reset(new ModelRMBG);
+ }
- createOrtSession(tf);
+ int ortSessionResult = createOrtSession(tf);
+ if (ortSessionResult != OBS_BGREMOVAL_ORT_SESSION_SUCCESS) {
+ obs_log(LOG_ERROR,
+ "Failed to create ONNXRuntime session. Error code: %d",
+ ortSessionResult);
+ // disable filter
+ tf->isDisabled = true;
+ tf->model.reset();
+ return;
+ }
}
obs_enter_graphics();
bfree(kawaseBlurEffectPath);
obs_leave_graphics();
+
+ // Log the currently selected options
+ obs_log(LOG_INFO, "Background Removal Filter Options:");
+ // name of the source that the filter is attached to
+ obs_log(LOG_INFO, " Source: %s", obs_source_get_name(tf->source));
+ obs_log(LOG_INFO, " Model: %s", tf->modelSelection.c_str());
+ obs_log(LOG_INFO, " Inference Device: %s", tf->useGPU.c_str());
+ obs_log(LOG_INFO, " Num Threads: %d", tf->numThreads);
+ obs_log(LOG_INFO, " Enable Threshold: %s",
+ tf->enableThreshold ? "true" : "false");
+ obs_log(LOG_INFO, " Threshold: %f", tf->threshold);
+ obs_log(LOG_INFO, " Contour Filter: %f", tf->contourFilter);
+ obs_log(LOG_INFO, " Smooth Contour: %f", tf->smoothContour);
+ obs_log(LOG_INFO, " Feather: %f", tf->feather);
+ obs_log(LOG_INFO, " Mask Every X Frames: %d", tf->maskEveryXFrames);
+ obs_log(LOG_INFO, " Enable Image Similarity: %s",
+ tf->enableImageSimilarity ? "true" : "false");
+ obs_log(LOG_INFO, " Image Similarity Threshold: %f",
+ tf->imageSimilarityThreshold);
+ obs_log(LOG_INFO, " Blur Background: %d", tf->blurBackground);
+ obs_log(LOG_INFO, " Enable Focal Blur: %s",
+ tf->enableFocalBlur ? "true" : "false");
+ obs_log(LOG_INFO, " Blur Focus Point: %f", tf->blurFocusPoint);
+ obs_log(LOG_INFO, " Blur Focus Depth: %f", tf->blurFocusDepth);
+ obs_log(LOG_INFO, " Disabled: %s", tf->isDisabled ? "true" : "false");
+#ifdef _WIN32
+ obs_log(LOG_INFO, " Model file path: %S", tf->modelFilepath.c_str());
+#else
+ obs_log(LOG_INFO, " Model file path: %s", tf->modelFilepath.c_str());
+#endif
+
+ // enable
+ tf->isDisabled = false;
}
void background_filter_activate(void *data)
{
+ obs_log(LOG_INFO, "Background filter activated");
struct background_removal_filter *tf =
reinterpret_cast<background_removal_filter *>(data);
tf->isDisabled = false;
void background_filter_deactivate(void *data)
{
+ obs_log(LOG_INFO, "Background filter deactivated");
struct background_removal_filter *tf =
reinterpret_cast<background_removal_filter *>(data);
tf->isDisabled = true;
void *background_filter_create(obs_data_t *settings, obs_source_t *source)
{
+ obs_log(LOG_INFO, "Background filter created");
void *data = bmalloc(sizeof(struct background_removal_filter));
struct background_removal_filter *tf = new (data)
background_removal_filter();
void background_filter_destroy(void *data)
{
+ obs_log(LOG_INFO, "Background filter destroyed");
+
struct background_removal_filter *tf =
reinterpret_cast<background_removal_filter *>(data);
if (tf) {
+ tf->isDisabled = true;
+
obs_enter_graphics();
gs_texrender_destroy(tf->texrender);
if (tf->stagesurface) {
void background_filter_video_tick(void *data, float seconds)
{
+ UNUSED_PARAMETER(seconds);
+
struct background_removal_filter *tf =
reinterpret_cast<background_removal_filter *>(data);
return;
}
- if (tf->inputBGRA.empty()) {
+ if (!tf->model) {
+ obs_log(LOG_ERROR, "Model is not initialized");
return;
}
std::unique_lock<std::mutex> lock(tf->inputBGRALock,
std::try_to_lock);
if (!lock.owns_lock()) {
+ // No data to process
+ return;
+ }
+ if (tf->inputBGRA.empty()) {
+ // No data to process
return;
}
imageBGRA = tf->inputBGRA.clone();
}
+ if (tf->enableImageSimilarity) {
+ if (!tf->lastImageBGRA.empty() && !imageBGRA.empty() &&
+ tf->lastImageBGRA.size() == imageBGRA.size()) {
+ // calculate PSNR
+ double psnr = cv::PSNR(tf->lastImageBGRA, imageBGRA);
+
+ if (psnr > tf->imageSimilarityThreshold) {
+ // The image is almost the same as the previous one. Skip processing.
+ return;
+ }
+ }
+ tf->lastImageBGRA = imageBGRA.clone();
+ }
+
if (tf->backgroundMask.empty()) {
// First frame. Initialize the background mask.
tf->backgroundMask =
} else {
cv::Mat backgroundMask;
- // Process the image to find the mask.
- processImageForBackground(tf, imageBGRA,
- backgroundMask);
+ {
+ std::unique_lock<std::mutex> lock(
+ tf->modelMutex);
+ // Process the image to find the mask.
+ processImageForBackground(tf, imageBGRA,
+ backgroundMask);
+ }
+
+ if (backgroundMask.empty()) {
+ // Something went wrong. Just use the previous mask.
+ obs_log(LOG_WARNING,
+ "Background mask is empty. This shouldn't happen. Using previous mask.");
+ return;
+ }
+
+ // Temporal smoothing
+ if (tf->temporalSmoothFactor > 0.0 &&
+ tf->temporalSmoothFactor < 1.0 &&
+ !tf->lastBackgroundMask.empty() &&
+ tf->lastBackgroundMask.size() ==
+ backgroundMask.size()) {
+
+ float temporalSmoothFactor =
+ tf->temporalSmoothFactor;
+ if (tf->enableThreshold) {
+ // The temporal smooth factor can't be smaller than the threshold
+ temporalSmoothFactor =
+ std::max(temporalSmoothFactor,
+ tf->threshold);
+ }
+
+ cv::addWeighted(backgroundMask,
+ temporalSmoothFactor,
+ tf->lastBackgroundMask,
+ 1.0 - temporalSmoothFactor, 0.0,
+ backgroundMask);
+ }
+
+ tf->lastBackgroundMask = backgroundMask.clone();
// Contour processing
// Only applicable if we are thresholding (and get a binary image)
backgroundMask.copyTo(tf->backgroundMask);
}
} catch (const Ort::Exception &e) {
- blog(LOG_ERROR, "ONNXRuntime Exception: %s", e.what());
+ obs_log(LOG_ERROR, "ONNXRuntime Exception: %s", e.what());
// TODO: Fall back to CPU if it makes sense
} catch (const std::exception &e) {
- blog(LOG_ERROR, "%s", e.what());
+ obs_log(LOG_ERROR, "%s", e.what());
}
-
- UNUSED_PARAMETER(seconds);
}
static gs_texture_t *blur_background(struct background_removal_filter *tf,
for (int i = 0; i < (int)tf->blurBackground; i++) {
gs_texrender_reset(tf->texrender);
if (!gs_texrender_begin(tf->texrender, width, height)) {
- blog(LOG_INFO,
- "Could not open background blur texrender!");
+ obs_log(LOG_INFO,
+ "Could not open background blur texrender!");
return blurredTexture;
}
struct background_removal_filter *tf =
reinterpret_cast<background_removal_filter *>(data);
+ if (tf->isDisabled) {
+ if (tf->source) {
+ obs_source_skip_video_filter(tf->source);
+ }
+ return;
+ }
+
uint32_t width, height;
if (!getRGBAFromStageSurface(tf, width, height)) {
- obs_source_skip_video_filter(tf->source);
+ if (tf->source) {
+ obs_source_skip_video_filter(tf->source);
+ }
return;
}
if (!tf->effect) {
// Effect failed to load, skip rendering
- obs_source_skip_video_filter(tf->source);
+ if (tf->source) {
+ obs_source_skip_video_filter(tf->source);
+ }
return;
}
tf->backgroundMask.cols, tf->backgroundMask.rows, GS_R8,
1, (const uint8_t **)&tf->backgroundMask.data, 0);
if (!alphaTexture) {
- blog(LOG_ERROR, "Failed to create alpha texture");
- obs_source_skip_video_filter(tf->source);
+ obs_log(LOG_ERROR, "Failed to create alpha texture");
+ if (tf->source) {
+ obs_source_skip_video_filter(tf->source);
+ }
return;
}
}
if (!obs_source_process_filter_begin(tf->source, GS_RGBA,
OBS_ALLOW_DIRECT_RENDERING)) {
- obs_source_skip_video_filter(tf->source);
+ if (tf->source) {
+ obs_source_skip_video_filter(tf->source);
+ }
gs_texture_destroy(alphaTexture);
gs_texture_destroy(blurredTexture);
return;
obs-backgroundremoval-1.1.6.tar.gz/src/consts.h -> obs-backgroundremoval-1.1.13.tar.gz/src/consts.h
Changed
const char *const MODEL_ENHANCE_ZERODCE = "models/zero_dce_180x320.onnx";
const char *const MODEL_DEPTH_TCMONODEPTH =
"models/tcmonodepth_tcsmallnet_192x320.onnx";
+const char *const MODEL_RMBG = "models/bria_rmbg_1_4_qint8.onnx";
const char *const USEGPU_CPU = "cpu";
const char *const USEGPU_DML = "dml";
const char *const KAWASE_BLUR_EFFECT_PATH = "effects/kawase_blur.effect";
const char *const BLEND_EFFECT_PATH = "effects/blend_images.effect";
+const char *const PLUGIN_INFO_TEMPLATE =
+ "<a href=\"https://github.com/occ-ai/obs-backgroundremoval/\">Background Removal</a> (%1) by "
+ "<a href=\"https://github.com/occ-ai\">OCC AI</a> ❤️ "
+ "<a href=\"https://www.patreon.com/RoyShilkrot\">Support & Follow</a>";
+const char *const PLUGIN_INFO_TEMPLATE_UPDATE_AVAILABLE =
+ "<center><a href=\"https://github.com/occ-ai/obs-backgroundremoval/releases\">🚀 Update available! (%1)</a></center>";
+
#endif /* CONSTS_H */
obs-backgroundremoval-1.1.6.tar.gz/src/enhance-filter.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/enhance-filter.cpp
Changed
#include <fstream>
#include <new>
#include <mutex>
+#include <regex>
#include <plugin-support.h>
#include "consts.h"
#include "models/ModelTBEFN.h"
#include "models/ModelZeroDCE.h"
#include "models/ModelURetinex.h"
+#include "update-checker/update-checker.h"
struct enhance_filter : public filter_data {
cv::Mat outputBGRA;
obs_property_list_add_string(p_use_gpu, obs_module_text("CoreML"),
USEGPU_COREML);
#endif
+
+ // Add a informative text about the plugin
+ // replace the placeholder with the current version using std::regex_replace
+ std::string basic_info = std::regex_replace(
+ PLUGIN_INFO_TEMPLATE, std::regex("%1"), PLUGIN_VERSION);
+ // Check for update
+ if (get_latest_version() != nullptr) {
+ basic_info += std::regex_replace(
+ PLUGIN_INFO_TEMPLATE_UPDATE_AVAILABLE, std::regex("%1"),
+ get_latest_version());
+ }
+ obs_properties_add_text(props, "info", basic_info.c_str(),
+ OBS_TEXT_INFO);
+
return props;
}
return;
}
} catch (const std::exception &e) {
- blog(LOG_ERROR, "Exception caught: %s", e.what());
+ obs_log(LOG_ERROR, "Exception caught: %s", e.what());
return;
}
tf->outputBGRA.cols, tf->outputBGRA.rows, GS_BGRA, 1,
(const uint8_t **)&tf->outputBGRA.data, 0);
if (!outputTexture) {
- blog(LOG_ERROR, "Failed to create output texture");
+ obs_log(LOG_ERROR, "Failed to create output texture");
obs_source_skip_video_filter(tf->source);
return;
}
obs-backgroundremoval-1.1.6.tar.gz/src/models/Model.h -> obs-backgroundremoval-1.1.13.tar.gz/src/models/Model.h
Changed
#define MODEL_H
#include <onnxruntime_cxx_api.h>
+#include "plugin-support.h"
#ifdef _WIN32
#include <wchar.h>
obs_module_file(modelSelection.c_str());
if (modelFilepath_rawPtr == nullptr) {
- blog(LOG_ERROR,
- "Unable to get model filename %s from plugin.",
- modelSelection.c_str());
- return nullptr;
+ obs_log(LOG_ERROR,
+ "Unable to get model filename %s from plugin.",
+ modelSelection.c_str());
+#if _WIN32
+ return std::wstring();
+#else
+ return std::string();
+#endif
}
std::string modelFilepath_s(modelFilepath_rawPtr);
}
if (inputDims0.size() < 3 || outputDims0.size() < 3) {
- blog(LOG_ERROR,
- "Input or output tensor dims are < 3. input = %d, output = %d",
- (int)inputDims.size(), (int)outputDims.size());
+ obs_log(LOG_ERROR,
+ "Input or output tensor dims are < 3. input = %d, output = %d",
+ (int)inputDims.size(), (int)outputDims.size());
return false;
}
for (size_t i = 0; i < inputDims.size(); i++) {
inputTensorValues.push_back(std::vector<float>(
vectorProduct(inputDimsi), 0.0f));
- blog(LOG_INFO,
- "Allocated %d sized float-array for input %d",
- (int)inputTensorValuesi.size(), (int)i);
+ obs_log(LOG_INFO,
+ "Allocated %d sized float-array for input %d",
+ (int)inputTensorValuesi.size(), (int)i);
inputTensor.push_back(Ort::Value::CreateTensor<float>(
memoryInfo, inputTensorValuesi.data(),
inputTensorValuesi.size(),
for (size_t i = 0; i < outputDims.size(); i++) {
outputTensorValues.push_back(std::vector<float>(
vectorProduct(outputDimsi), 0.0f));
- blog(LOG_INFO,
- "Allocated %d sized float-array for output %d",
- (int)outputTensorValuesi.size(), (int)i);
+ obs_log(LOG_INFO,
+ "Allocated %d sized float-array for output %d",
+ (int)outputTensorValuesi.size(), (int)i);
outputTensor.push_back(Ort::Value::CreateTensor<float>(
memoryInfo, outputTensorValuesi.data(),
outputTensorValuesi.size(),
{
if (inputNames.size() == 0 || outputNames.size() == 0 ||
inputTensor.size() == 0 || outputTensor.size() == 0) {
- blog(LOG_INFO,
- "Skip network inference. Inputs or outputs are null.");
+ obs_log(LOG_INFO,
+ "Skip network inference. Inputs or outputs are null.");
return;
}
obs-backgroundremoval-1.1.13.tar.gz/src/models/ModelRMBG.h
Added
+#ifndef MODELRMBG_H
+#define MODELRMBG_H
+
+#include "Model.h"
+
+class ModelRMBG : public ModelBCHW {
+public:
+ ModelRMBG(/* args */) {}
+ ~ModelRMBG() {}
+
+ bool
+ populateInputOutputShapes(const std::unique_ptr<Ort::Session> &session,
+ std::vector<std::vector<int64_t>> &inputDims,
+ std::vector<std::vector<int64_t>> &outputDims)
+ {
+ ModelBCHW::populateInputOutputShapes(session, inputDims,
+ outputDims);
+
+ // fix the output width and height to the input width and height
+ outputDims0.at(2) = inputDims0.at(2);
+ outputDims0.at(3) = inputDims0.at(3);
+
+ return true;
+ }
+};
+
+#endif // MODELRMBG_H
obs-backgroundremoval-1.1.6.tar.gz/src/models/ModelRVM.h -> obs-backgroundremoval-1.1.13.tar.gz/src/models/ModelRVM.h
Changed
outputDims.push_back(outputTensorInfo.GetShape());
}
+ const int base_width = 320;
+ const int base_height = 192;
+
inputDims00 = 1;
- inputDims02 = 192;
- inputDims03 = 192;
+ inputDims02 = base_height;
+ inputDims03 = base_width;
for (size_t i = 1; i < 5; i++) {
inputDimsi0 = 1;
inputDimsi1 = (i == 1) ? 16
: (i == 2) ? 20
: (i == 3) ? 40
: 64;
- inputDimsi2 = 192 / (2 << (i - 1));
- inputDimsi3 = 192 / (2 << (i - 1));
+ inputDimsi2 = base_height / (2 << (i - 1));
+ inputDimsi3 = base_width / (2 << (i - 1));
}
outputDims00 = 1;
- outputDims02 = 192;
- outputDims03 = 192;
+ outputDims02 = base_height;
+ outputDims03 = base_width;
for (size_t i = 1; i < 5; i++) {
outputDimsi0 = 1;
- outputDimsi2 = 192 / (2 << (i - 1));
- outputDimsi3 = 192 / (2 << (i - 1));
+ outputDimsi2 = base_height / (2 << (i - 1));
+ outputDimsi3 = base_width / (2 << (i - 1));
}
return true;
}
obs-backgroundremoval-1.1.6.tar.gz/src/obs-utils/obs-config-utils.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/obs-utils/obs-config-utils.cpp
Changed
#include "obs-config-utils.h"
+#include "plugin-support.h"
#include <obs-module.h>
+#include <util/config-file.h>
+#include <filesystem>
-int getFlagFromConfig(const char *name, bool *returnValue)
+void create_config_folder()
{
- // Check configuration to see if update checks are disabled
- char *config_file = obs_module_file("config.json");
- if (!config_file) {
- blog(LOG_INFO, "Unable to find config file");
- return OBS_BGREMOVAL_CONFIG_FAIL;
+ char *config_folder_path = obs_module_config_path("");
+ if (config_folder_path == nullptr) {
+ obs_log(LOG_ERROR, "Failed to get config folder path");
+ return;
}
+ std::filesystem::path config_folder_std_path(config_folder_path);
+ bfree(config_folder_path);
- obs_data_t *data = obs_data_create_from_json_file(config_file);
- if (!data) {
- blog(LOG_INFO, "Failed to parse config file");
- return OBS_BGREMOVAL_CONFIG_FAIL;
+ // create the folder if it doesn't exist
+ if (!std::filesystem::exists(config_folder_std_path)) {
+#ifdef _WIN32
+ obs_log(LOG_INFO, "Config folder does not exist, creating: %S",
+ config_folder_std_path.c_str());
+#else
+ obs_log(LOG_INFO, "Config folder does not exist, creating: %s",
+ config_folder_std_path.c_str());
+#endif
+ // Create the config folder
+ std::filesystem::create_directories(config_folder_std_path);
}
+}
+
+int getConfig(config_t **config)
+{
+ create_config_folder(); // ensure the config folder exists
+
+ // Get the config file
+ char *config_file_path = obs_module_config_path("config.ini");
- *returnValue = obs_data_get_bool(data, name);
- obs_data_release(data);
+ int ret = config_open(config, config_file_path, CONFIG_OPEN_EXISTING);
+ if (ret != CONFIG_SUCCESS) {
+ obs_log(LOG_INFO, "Failed to open config file %s",
+ config_file_path);
+ return OBS_BGREMOVAL_CONFIG_FAIL;
+ }
return OBS_BGREMOVAL_CONFIG_SUCCESS;
}
-int setFlagFromConfig(const char *name, const bool value)
+int getFlagFromConfig(const char *name, bool *returnValue, bool defaultValue)
{
// Get the config file
- char *config_file = obs_module_file("config.json");
- if (!config_file) {
- blog(LOG_INFO, "Unable to find config file");
+ config_t *config;
+ if (getConfig(&config) != OBS_BGREMOVAL_CONFIG_SUCCESS) {
+ *returnValue = defaultValue;
return OBS_BGREMOVAL_CONFIG_FAIL;
}
- // Parse the config file
- obs_data_t *json_data = obs_data_create_from_json_file(config_file);
- if (!json_data) {
- blog(LOG_INFO, "Failed to parse config file");
+ *returnValue = config_get_bool(config, "config", name);
+ config_close(config);
+
+ return OBS_BGREMOVAL_CONFIG_SUCCESS;
+}
+
+int setFlagInConfig(const char *name, const bool value)
+{
+ // Get the config file
+ config_t *config;
+ if (getConfig(&config) != OBS_BGREMOVAL_CONFIG_SUCCESS) {
return OBS_BGREMOVAL_CONFIG_FAIL;
}
- // Update the config
- obs_data_set_bool(json_data, name, value);
- obs_data_save_json(json_data, config_file);
-
- obs_data_release(json_data);
+ config_set_bool(config, "config", name, value);
+ config_save(config);
+ config_close(config);
return OBS_BGREMOVAL_CONFIG_SUCCESS;
}
obs-backgroundremoval-1.1.6.tar.gz/src/obs-utils/obs-config-utils.h -> obs-backgroundremoval-1.1.13.tar.gz/src/obs-utils/obs-config-utils.h
Changed
*
* @param name The name of the config item.
* @param returnValue The value of the config item.
+ * @param defaultValue The default value of the config item.
* @return OBS_BGREMOVAL_CONFIG_SUCCESS if the config item was found,
* OBS_BGREMOVAL_CONFIG_FAIL otherwise.
*/
-int getFlagFromConfig(const char *name, bool *returnValue);
+int getFlagFromConfig(const char *name, bool *returnValue, bool defaultValue);
/**
* Set a boolean flag in the module configuration file.
* @return OBS_BGREMOVAL_CONFIG_SUCCESS if the config item was found,
* OBS_BGREMOVAL_CONFIG_FAIL otherwise.
*/
-int setFlagFromConfig(const char *name, const bool value);
+int setFlagInConfig(const char *name, const bool value);
#endif /* OBS_CONFIG_UTILS_H */
obs-backgroundremoval-1.1.6.tar.gz/src/ort-utils/ort-session-utils.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/ort-utils/ort-session-utils.cpp
Changed
#include <coreml_provider_factory.h>
#endif
-#if defined(__linux__) && defined(__x86_64__)
-#include <tensorrt_provider_factory.h>
-#endif
-
#ifdef _WIN32
#include <dml_provider_factory.h>
#include <wchar.h>
+#include <windows.h>
#endif // _WIN32
#include <obs-module.h>
#include "ort-session-utils.h"
#include "consts.h"
+#include "plugin-support.h"
-void createOrtSession(filter_data *tf)
+int createOrtSession(filter_data *tf)
{
if (tf->model.get() == nullptr) {
- blog(LOG_ERROR, "Model object is not initialized");
- return;
+ obs_log(LOG_ERROR, "Model object is not initialized");
+ return OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_MODEL;
}
Ort::SessionOptions sessionOptions;
obs_module_file(tf->modelSelection.c_str());
if (modelFilepath_rawPtr == nullptr) {
- blog(LOG_ERROR, "Unable to get model filename %s from plugin.",
- tf->modelSelection.c_str());
- return;
+ obs_log(LOG_ERROR,
+ "Unable to get model filename %s from plugin.",
+ tf->modelSelection.c_str());
+ return OBS_BGREMOVAL_ORT_SESSION_ERROR_FILE_NOT_FOUND;
}
std::string modelFilepath_s(modelFilepath_rawPtr);
- bfree(modelFilepath_rawPtr);
#if _WIN32
- std::wstring modelFilepath_ws(modelFilepath_s.size(), L' ');
- std::copy(modelFilepath_s.begin(), modelFilepath_s.end(),
- modelFilepath_ws.begin());
- tf->modelFilepath = modelFilepath_ws.c_str();
+ int outLength = MultiByteToWideChar(
+ CP_ACP, MB_PRECOMPOSED, modelFilepath_rawPtr, -1, nullptr, 0);
+ tf->modelFilepath = std::wstring(outLength, L'\0');
+ MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, modelFilepath_rawPtr, -1,
+ tf->modelFilepath.data(), outLength);
#else
- tf->modelFilepath = modelFilepath_s.c_str();
+ tf->modelFilepath = std::string(modelFilepath_rawPtr);
#endif
+ bfree(modelFilepath_rawPtr);
+
try {
-#if defined(__linux__) && defined(__x86_64__)
+#if defined(__linux__) && defined(__x86_64__) && \
+ !defined(DISABLE_ONNXRUNTIME_GPU)
if (tf->useGPU == USEGPU_TENSORRT) {
Ort::ThrowOnError(
OrtSessionOptionsAppendExecutionProvider_Tensorrt(
sessionOptions, coreml_flags));
}
#endif
- tf->session.reset(new Ort::Session(*tf->env, tf->modelFilepath,
- sessionOptions));
+ tf->session.reset(new Ort::Session(
+ *tf->env, tf->modelFilepath.c_str(), sessionOptions));
} catch (const std::exception &e) {
- blog(LOG_ERROR, "%s", e.what());
- return;
+ obs_log(LOG_ERROR, "%s", e.what());
+ return OBS_BGREMOVAL_ORT_SESSION_ERROR_STARTUP;
}
Ort::AllocatorWithDefaultOptions allocator;
if (!tf->model->populateInputOutputShapes(tf->session, tf->inputDims,
tf->outputDims)) {
- blog(LOG_ERROR, "Unable to get model input and output shapes");
- return;
+ obs_log(LOG_ERROR,
+ "Unable to get model input and output shapes");
+ return OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_INPUT_OUTPUT;
}
for (size_t i = 0; i < tf->inputNames.size(); i++) {
- blog(LOG_INFO,
- "Model %s input %d: name %s shape (%d dim) %d x %d x %d x %d",
- tf->modelSelection.c_str(), (int)i,
- tf->inputNamesi.get(), (int)tf->inputDimsi.size(),
- (int)tf->inputDimsi0,
- ((int)tf->inputDimsi.size() > 1)
- ? (int)tf->inputDimsi1
- : 0,
- ((int)tf->inputDimsi.size() > 2)
- ? (int)tf->inputDimsi2
- : 0,
- ((int)tf->inputDimsi.size() > 3)
- ? (int)tf->inputDimsi3
- : 0);
+ obs_log(LOG_INFO,
+ "Model %s input %d: name %s shape (%d dim) %d x %d x %d x %d",
+ tf->modelSelection.c_str(), (int)i,
+ tf->inputNamesi.get(), (int)tf->inputDimsi.size(),
+ (int)tf->inputDimsi0,
+ ((int)tf->inputDimsi.size() > 1)
+ ? (int)tf->inputDimsi1
+ : 0,
+ ((int)tf->inputDimsi.size() > 2)
+ ? (int)tf->inputDimsi2
+ : 0,
+ ((int)tf->inputDimsi.size() > 3)
+ ? (int)tf->inputDimsi3
+ : 0);
}
for (size_t i = 0; i < tf->outputNames.size(); i++) {
- blog(LOG_INFO,
- "Model %s output %d: name %s shape (%d dim) %d x %d x %d x %d",
- tf->modelSelection.c_str(), (int)i,
- tf->outputNamesi.get(), (int)tf->outputDimsi.size(),
- (int)tf->outputDimsi0,
- ((int)tf->outputDimsi.size() > 1)
- ? (int)tf->outputDimsi1
- : 0,
- ((int)tf->outputDimsi.size() > 2)
- ? (int)tf->outputDimsi2
- : 0,
- ((int)tf->outputDimsi.size() > 3)
- ? (int)tf->outputDimsi3
- : 0);
+ obs_log(LOG_INFO,
+ "Model %s output %d: name %s shape (%d dim) %d x %d x %d x %d",
+ tf->modelSelection.c_str(), (int)i,
+ tf->outputNamesi.get(), (int)tf->outputDimsi.size(),
+ (int)tf->outputDimsi0,
+ ((int)tf->outputDimsi.size() > 1)
+ ? (int)tf->outputDimsi1
+ : 0,
+ ((int)tf->outputDimsi.size() > 2)
+ ? (int)tf->outputDimsi2
+ : 0,
+ ((int)tf->outputDimsi.size() > 3)
+ ? (int)tf->outputDimsi3
+ : 0);
}
// Allocate buffers
tf->outputTensorValues,
tf->inputTensorValues, tf->inputTensor,
tf->outputTensor);
+
+ return OBS_BGREMOVAL_ORT_SESSION_SUCCESS;
}
bool runFilterModelInference(filter_data *tf, const cv::Mat &imageBGRA,
obs-backgroundremoval-1.1.6.tar.gz/src/ort-utils/ort-session-utils.h -> obs-backgroundremoval-1.1.13.tar.gz/src/ort-utils/ort-session-utils.h
Changed
#include "FilterData.h"
-void createOrtSession(filter_data *tf);
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_FILE_NOT_FOUND 1
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_MODEL 2
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_INVALID_INPUT_OUTPUT 3
+#define OBS_BGREMOVAL_ORT_SESSION_ERROR_STARTUP 5
+#define OBS_BGREMOVAL_ORT_SESSION_SUCCESS 0
+
+int createOrtSession(filter_data *tf);
bool runFilterModelInference(filter_data *tf, const cv::Mat &imageBGRA,
cv::Mat &output);
obs-backgroundremoval-1.1.6.tar.gz/src/plugin-support.c.in -> obs-backgroundremoval-1.1.13.tar.gz/src/plugin-support.c.in
Changed
#include <plugin-support.h>
+extern void blogva(int log_level, const char *format, va_list args);
+
const char *PLUGIN_NAME = "@CMAKE_PROJECT_NAME@";
const char *PLUGIN_VERSION = "@CMAKE_PROJECT_VERSION@";
obs-backgroundremoval-1.1.6.tar.gz/src/plugin-support.h -> obs-backgroundremoval-1.1.13.tar.gz/src/plugin-support.h
Changed
extern const char *PLUGIN_VERSION;
void obs_log(int log_level, const char *format, ...);
-extern void blogva(int log_level, const char *format, va_list args);
#ifdef __cplusplus
}
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/github-utils.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/github-utils.cpp
Changed
#include "Client.hpp"
#include "github-utils.h"
+#include "plugin-support.h"
static const std::string GITHUB_LATEST_RELEASE_URL =
- "https://api.github.com/repos/royshil/obs-backgroundremoval/releases/latest";
+ "https://api.github.com/repos/occ-ai/obs-backgroundremoval/releases/latest";
void github_utils_get_release_information(
std::function<void(github_utils_release_information)> callback)
obs_data_t *data =
obs_data_create_from_json(responseBody.c_str());
if (!data) {
- blog(LOG_INFO, "Failed to parse latest release info");
- callback(
- {OBS_BGREMOVAL_GITHUB_UTILS_ERROR, NULL, NULL});
+ obs_log(LOG_INFO,
+ "Failed to parse latest release info");
+ callback({OBS_BGREMOVAL_GITHUB_UTILS_ERROR, "", ""});
return;
}
// The version is in the "tag_name" property
- char *version = strdup(obs_data_get_string(data, "tag_name"));
- char *body = strdup(obs_data_get_string(data, "body"));
+ std::string version = obs_data_get_string(data, "tag_name");
+ std::string body = obs_data_get_string(data, "body");
obs_data_release(data);
// remove the "v" prefix in version, if it exists
if (version0 == 'v') {
- char *newVersion = (char *)malloc(strlen(version) - 1);
- strcpy(newVersion, version + 1);
- free(version);
- version = newVersion;
+ version = version.substr(1);
}
callback({OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS, body, version});
});
}
-
-void github_utils_release_information_free(
- struct github_utils_release_information info)
-{
- if (info.responseBody != NULL)
- free(info.responseBody);
- if (info.version != NULL)
- free(info.version);
- info.responseCode = OBS_BGREMOVAL_GITHUB_UTILS_ERROR;
-}
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/github-utils.h -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/github-utils.h
Changed
#pragma once
#include <functional>
+#include <string>
enum {
OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS = 0,
struct github_utils_release_information {
int responseCode;
- char *responseBody;
- char *version;
+ std::string responseBody;
+ std::string version;
};
void github_utils_get_release_information(
std::function<void(github_utils_release_information)> callback);
-
-void github_utils_release_information_free(
- struct github_utils_release_information info);
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/update-checker.cpp -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/update-checker.cpp
Changed
#include "update-checker.h"
-#include "UpdateDialog.hpp"
#include "github-utils.h"
#include "obs-utils/obs-config-utils.h"
#include <plugin-support.h>
-#include <QTimer>
-
-UpdateDialog *update_dialog;
-
extern "C" const char *PLUGIN_VERSION;
+static std::string latestVersionForUpdate;
+
void check_update(void)
{
- github_utils_get_release_information((github_utils_release_information
- info) {
- if (info.responseCode == OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS) {
- obs_log(LOG_INFO, "Latest release is %s", info.version);
- bool shouldCheckForUpdates = false;
- if (getFlagFromConfig("check_for_updates",
- &shouldCheckForUpdates) !=
- OBS_BGREMOVAL_CONFIG_SUCCESS) {
- // Failed to get the config value, assume it's enabled
- shouldCheckForUpdates = true;
- }
-
- if (!shouldCheckForUpdates) {
- // Update checks are disabled
- return;
- }
-
- if (strcmp(info.version, PLUGIN_VERSION) == 0) {
- // No update available, latest version is the same as the current version
- return;
- }
-
- update_dialog = new UpdateDialog(
- info,
- (QWidget *)obs_frontend_get_main_window());
- QTimer::singleShot(2000, update_dialog,
- &UpdateDialog::exec);
- } else {
+ bool shouldCheckForUpdates = false;
+ if (getFlagFromConfig("check_for_updates", &shouldCheckForUpdates,
+ true) != OBS_BGREMOVAL_CONFIG_SUCCESS) {
+ // Failed to get the config value, assume it's enabled
+ shouldCheckForUpdates = true;
+ // store the default value
+ setFlagInConfig("check_for_updates", shouldCheckForUpdates);
+ }
+
+ if (!shouldCheckForUpdates) {
+ // Update checks are disabled
+ return;
+ }
+
+ const auto callback = (github_utils_release_information info) {
+ if (info.responseCode != OBS_BGREMOVAL_GITHUB_UTILS_SUCCESS) {
obs_log(LOG_INFO,
"failed to get latest release information");
+ return;
+ }
+ obs_log(LOG_INFO, "Latest release is %s", info.version.c_str());
+
+ if (info.version == PLUGIN_VERSION) {
+ // No update available, latest version is the same as the current version
+ latestVersionForUpdate.clear();
+ return;
}
- github_utils_release_information_free(info);
- });
+
+ latestVersionForUpdate = info.version;
+ };
+
+ github_utils_get_release_information(callback);
+}
+
+const char *get_latest_version(void)
+{
+ obs_log(LOG_INFO, "get_latest_version: %s",
+ latestVersionForUpdate.c_str());
+ if (latestVersionForUpdate.empty()) {
+ return nullptr;
+ }
+ return latestVersionForUpdate.c_str();
}
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/update-checker.h -> obs-backgroundremoval-1.1.13.tar.gz/src/update-checker/update-checker.h
Changed
#endif
void check_update(void);
+const char *get_latest_version(void);
#ifdef __cplusplus
}
obs-backgroundremoval-1.1.6.tar.gz/cmake/BuildMyCurl.cmake
Deleted
-if(OS_MACOS)
- set(CURL_USE_OPENSSL OFF)
- set(CURL_USE_SECTRANSP ON)
-elseif(OS_WINDOWS)
- set(CURL_USE_OPENSSL OFF)
- set(CURL_USE_SCHANNEL ON)
-elseif(OS_LINUX)
- add_compile_options(-fPIC)
- set(CURL_USE_OPENSSL ON)
-endif()
-set(BUILD_CURL_EXE OFF)
-set(BUILD_SHARED_LIBS OFF)
-set(HTTP_ONLY OFF)
-set(CURL_USE_LIBSSH2 OFF)
-add_subdirectory(vendor/curl EXCLUDE_FROM_ALL)
-if(OS_MACOS)
- target_compile_options(
- libcurl PRIVATE -Wno-error=ambiguous-macro -Wno-error=deprecated-declarations -Wno-error=unreachable-code
- -Wno-error=unused-parameter -Wno-error=unused-variable)
-endif()
-include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/vendor/curl/include)
obs-backgroundremoval-1.1.6.tar.gz/cmake/macos/resources/Distribution.xml
Deleted
-<?xml version="1.0" encoding="utf-8"?>
-<installer-gui-script minSpecVersion="1">
- <pkg-ref id="com.royshilkrot.obs-backgroundremoval"/>
- <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/>
- <choices-outline>
- <line choice="default">
- <line choice="com.royshilkrot.obs-backgroundremoval"/>
- </line>
- </choices-outline>
- <choice id="default"/>
- <choice id="com.royshilkrot.obs-backgroundremoval" visible="false">
- <pkg-ref id="com.royshilkrot.obs-backgroundremoval"/>
- </choice>
- <pkg-ref id="com.royshilkrot.obs-backgroundremoval" version="1.0.0" onConclusion="none">obs-backgroundremoval-flat.pkg</pkg-ref>
- <domains enable_anywhere="false" enable_currentUserHome="true" enable_localSystem="false"/>
-</installer-gui-script>
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/UpdateDialog.cpp
Deleted
-#include "UpdateDialog.hpp"
-#include "obs-utils/obs-config-utils.h"
-
-#include <obs.h>
-#include <obs-module.h>
-
-#include <QLabel>
-#include <QVBoxLayout>
-#include <QString>
-
-static QString dialogContent =
- "<h1>Background Removal - Update available! 🚀</h1>"
- "<p>A new version of the Background Removal plugin (<a "
- "href=\"https://github.com/royshil/obs-backgroundremoval/releases\">v{version}</a>) is "
- "now available for download. We've made some exciting updates and improvements that we think "
- "you'll love. To get the latest features and enhancements, please follow the link below:</p>"
- "<p>Download the latest version from GitHub: <a "
- "href=\"https://github.com/royshil/obs-backgroundremoval/releases\">v{version}</a></p>"
- "<p>Once you've downloaded the new version, install the update as usual, there's no need to "
- "uninstall the previous version.</p>"
- "<p>If you have any questions or need assistance during the update process, feel free to reach out"
- " to our <a href=\"https://github.com/royshil/obs-backgroundremoval/issues\">support team</a>.</p>"
- "<p>Thank you for using our plugin and we hope you enjoy the latest release! 🙏</p>"
- "<h2>Changelog</h2>";
-
-UpdateDialog::UpdateDialog(
- struct github_utils_release_information latestVersion, QWidget *parent)
- : QDialog(parent), layout(new QVBoxLayout)
-{
- setWindowTitle("Background Removal - Update available! 🚀");
- setLayout(layout);
- QLabel *label = new QLabel(dialogContent.replace(
- QString("{version}"), QString(latestVersion.version)));
- label->setOpenExternalLinks(true);
- label->setTextInteractionFlags(Qt::TextBrowserInteraction);
- label->setTextFormat(Qt::RichText);
- label->setWordWrap(true);
- layout->addWidget(label);
-
- QScrollArea *scrollArea = new QScrollArea;
- QLabel *scrollAreaLabel =
- new QLabel(QString(latestVersion.responseBody));
- scrollAreaLabel->setOpenExternalLinks(true);
- scrollAreaLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
- scrollAreaLabel->setTextFormat(Qt::MarkdownText);
- scrollAreaLabel->setWordWrap(true);
- scrollArea->setWidget(scrollAreaLabel);
- scrollArea->setWidgetResizable(true);
- layout->addWidget(scrollArea);
-
- // Add a checkbox to disable update checks
- QCheckBox *disableCheckbox = new QCheckBox("Disable update checks");
- layout->addWidget(disableCheckbox);
- connect(disableCheckbox, &QCheckBox::stateChanged, this, (int state) {
- setFlagFromConfig("check_for_updates", state == Qt::Unchecked);
- });
-
- // Add a button to close the dialog
- QPushButton *closeButton = new QPushButton("Close");
- layout->addWidget(closeButton);
- connect(closeButton, &QPushButton::clicked, this, &QDialog::close);
-}
obs-backgroundremoval-1.1.6.tar.gz/src/update-checker/UpdateDialog.hpp
Deleted
-#include <QtWidgets>
-
-#include "github-utils.h"
-
-class UpdateDialog : public QDialog {
- Q_OBJECT
-public:
- UpdateDialog(struct github_utils_release_information latestVersion,
- QWidget *parent = nullptr);
-
-private:
- QVBoxLayout *layout;
-};
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/tensorrt_provider_factory.h
Deleted
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-#include "onnxruntime_c_api.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Tensorrt, _In_ OrtSessionOptions* options, int device_id);
-
-#ifdef __cplusplus
-}
-#endif
onnxruntime-linux-x64-gpu-1.15.1.tgz/GIT_COMMIT_ID -> onnxruntime-linux-x64-gpu-1.17.1.tgz/GIT_COMMIT_ID
Changed
-baeece44ba075009c6bfe95891a8c1b3d4571cb3
+8f5c79cb63f09ef1302e85081093a3fe4da1bc7d
onnxruntime-linux-x64-gpu-1.15.1.tgz/README.md -> onnxruntime-linux-x64-gpu-1.17.1.tgz/README.md
Changed
**ONNX Runtime training** can accelerate the model training time on multi-node NVIDIA GPUs for transformer models with a one-line addition for existing PyTorch training scripts. Learn more →(https://www.onnxruntime.ai/docs/#onnx-runtime-for-training)
-
## Get Started & Resources
* **General Information**: onnxruntime.ai(https://onnxruntime.ai)
-* **Usage documention and tutorials**: onnxruntime.ai/docs(https://onnxruntime.ai/docs)
+* **Usage documentation and tutorials**: onnxruntime.ai/docs(https://onnxruntime.ai/docs)
* **YouTube video tutorials**: youtube.com/@ONNXRuntime(https://www.youtube.com/@ONNXRuntime)
* **Upcoming Release Roadmap**(https://github.com/microsoft/onnxruntime/wiki/Upcoming-Release-Roadmap)
-* **Companion sample repositories**:
+* **Companion sample repositories**:
- ONNX Runtime Inferencing: microsoft/onnxruntime-inference-examples(https://github.com/microsoft/onnxruntime-inference-examples)
- ONNX Runtime Training: microsoft/onnxruntime-training-examples(https://github.com/microsoft/onnxruntime-training-examples)
+## Builtin Pipeline Status
-## Build Pipeline Status
|System|Inference|Training|
|---|---|---|
|Windows|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20CPU%20CI%20Pipeline?label=Windows+CPU)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=9)<br>!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20GPU%20CI%20Pipeline?label=Windows+GPU)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=10)<br>!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20GPU%20TensorRT%20CI%20Pipeline?label=Windows+GPU+TensorRT)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=47)||
|Android|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Android%20CI%20Pipeline?label=Android)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=53)||
|iOS|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/iOS%20CI%20Pipeline?label=iOS)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=134)||
|Web|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/ONNX%20Runtime%20Web%20CI%20Pipeline?label=Web)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=161)||
-|Other|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/onnxruntime-binary-size-checks-ci-pipeline?repoName=microsoft%2Fonnxruntime&label=Binary+Size+Check)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=187&repoName=microsoft%2Fonnxruntime)<br>!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/onnxruntime-python-checks-ci-pipeline?label=Python+Checks)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=164)||
+|Other|!Build Status(https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/onnxruntime-binary-size-checks-ci-pipeline?repoName=microsoft%2Fonnxruntime&label=Binary+Size+Check)(https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=187&repoName=microsoft%2Fonnxruntime)||
+
+## Third-party Pipeline Status
+|System|Inference|Training|
+|---|---|---|
+|Linux|!Build Status(https://github.com/Ascend/onnxruntime/actions/workflows/build-and-test.yaml/badge.svg)(https://github.com/Ascend/onnxruntime/actions/workflows/build-and-test.yaml)||
## Data/Telemetry
onnxruntime-linux-x64-gpu-1.15.1.tgz/ThirdPartyNotices.txt -> onnxruntime-linux-x64-gpu-1.17.1.tgz/ThirdPartyNotices.txt
Changed
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization of the copyright holder.
\ No newline at end of file
+in this Software without prior written authorization of the copyright holder.
+
+_____
+
+Intel neural-compressor
+
+https://github.com/intel/neural-compressor
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ ============================================================================
+
+ Copyright 2016-2019 Intel Corporation
+ Copyright 2018 YANDEX LLC
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ This distribution includes third party software ("third party programs").
+ This third party software, even if included with the distribution of
+ the Intel software, may be governed by separate license terms, including
+ without limitation, third party license terms, other Intel software license
+ terms, and open source software license terms. These separate license terms
+ govern your use of the third party programs as set forth in the
+ "THIRD-PARTY-PROGRAMS" file.
+
+_____
+
+FlashAttention, https://github.com/Dao-AILab/flash-attention
+
+BSD 3-Clause License
+
+Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+_____
+
+composable_kernel
+
+https://github.com/ROCmSoftwarePlatform/composable_kernel
+
+Copyright (c) 2018- , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang)
+Copyright (c) 2019- , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang)
+Copyright (c) 2022- , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan)
+Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang)
+Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah)
+Copyright (c) 2020 , Advanced Micro Devices, Inc. (Xiaoyan Zhou)
+Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan)
+
+SPDX-License-Identifier: MIT
+Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+_____
+
+neural-speed
+
+https://github.com/intel/neural-speed
+
+ Apache License
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ ============================================================================
+
+ Copyright 2016-2019 Intel Corporation
+ Copyright 2018 YANDEX LLC
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ This distribution includes third party software ("third party programs").
+ This third party software, even if included with the distribution of
+ the Intel software, may be governed by separate license terms, including
+ without limitation, third party license terms, other Intel software license
+ terms, and open source software license terms. These separate license terms
+ govern your use of the third party programs as set forth in the
+ "THIRD-PARTY-PROGRAMS" file.
onnxruntime-linux-x64-gpu-1.15.1.tgz/VERSION_NUMBER -> onnxruntime-linux-x64-gpu-1.17.1.tgz/VERSION_NUMBER
Changed
-1.15.1
+1.17.1
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core
Added
+(directory)
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers
Added
+(directory)
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/cuda
Added
+(directory)
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/cuda/cuda_context.h
Added
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+// This header is to expose a context for cuda custom ops.
+// By the context, a custom cuda operator could fetch existing resources,
+// such as cuda stream and cudnn handle, for reusing.
+
+// For concrete usage, pls find page here:
+// https://onnxruntime.ai/docs/reference/operators/add-custom-op.html#custom-ops-for-cuda-and-rocm
+
+#pragma once
+
+#define ORT_CUDA_CTX
+
+#include "cuda_resource.h"
+#include "core/providers/custom_op_context.h"
+#include <cuda.h>
+#include <cuda_runtime.h>
+#include <cublas_v2.h>
+#include <cudnn.h>
+
+namespace Ort {
+
+namespace Custom {
+
+struct CudaContext : public CustomOpContext {
+ cudaStream_t cuda_stream = {};
+ cudnnHandle_t cudnn_handle = {};
+ cublasHandle_t cublas_handle = {};
+ OrtAllocator* deferred_cpu_allocator = {};
+ // below are cuda ep options
+ int16_t device_id = 0;
+ int32_t arena_extend_strategy = 0;
+ int32_t cudnn_conv_algo_search = 0;
+ bool cudnn_conv_use_max_workspace = true;
+ bool cudnn_conv1d_pad_to_nc1d = false;
+ bool enable_skip_layer_norm_strict_mode = false;
+ bool prefer_nhwc = false;
+
+ void Init(const OrtKernelContext& kernel_ctx) {
+ cuda_stream = FetchResource<cudaStream_t>(kernel_ctx, CudaResource::cuda_stream_t);
+ cudnn_handle = FetchResource<cudnnHandle_t>(kernel_ctx, CudaResource::cudnn_handle_t);
+ cublas_handle = FetchResource<cublasHandle_t>(kernel_ctx, CudaResource::cublas_handle_t);
+ deferred_cpu_allocator = FetchResource<OrtAllocator*>(kernel_ctx, CudaResource::deferred_cpu_allocator_t);
+
+ device_id = FetchResource<int16_t>(kernel_ctx, CudaResource::device_id_t);
+ arena_extend_strategy = FetchResource<int32_t>(kernel_ctx, CudaResource::arena_extend_strategy_t);
+ cudnn_conv_algo_search = FetchResource<int32_t>(kernel_ctx, CudaResource::cudnn_conv_algo_search_t);
+ cudnn_conv_use_max_workspace = FetchResource<bool>(kernel_ctx, CudaResource::cudnn_conv_use_max_workspace_t);
+
+ cudnn_conv1d_pad_to_nc1d = FetchResource<bool>(kernel_ctx, CudaResource::cudnn_conv1d_pad_to_nc1d_t);
+ enable_skip_layer_norm_strict_mode = FetchResource<bool>(kernel_ctx, CudaResource::enable_skip_layer_norm_strict_mode_t);
+ prefer_nhwc = FetchResource<bool>(kernel_ctx, CudaResource::prefer_nhwc_t);
+ }
+
+ template <typename T>
+ T FetchResource(const OrtKernelContext& kernel_ctx, CudaResource resource_type) {
+ if (sizeof(T) > sizeof(void*)) {
+ ORT_CXX_API_THROW("void* is not large enough to hold resource type: " + std::to_string(resource_type), OrtErrorCode::ORT_INVALID_ARGUMENT);
+ }
+ const auto& ort_api = Ort::GetApi();
+ void* resource = {};
+ OrtStatus* status = ort_api.KernelContext_GetResource(&kernel_ctx, ORT_CUDA_RESOUCE_VERSION, resource_type, &resource);
+ if (status) {
+ ORT_CXX_API_THROW("Failed to fetch cuda ep resource, resouce type: " + std::to_string(resource_type), OrtErrorCode::ORT_RUNTIME_EXCEPTION);
+ }
+ T t = {};
+ memcpy(&t, &resource, sizeof(T));
+ return t;
+ }
+
+ void* AllocDeferredCpuMem(size_t size) const {
+ if (0 == size) {
+ return {};
+ }
+ const auto& ort_api = Ort::GetApi();
+ void* mem = {};
+ auto status = ort_api.AllocatorAlloc(deferred_cpu_allocator, size, &mem);
+ if (status) {
+ ORT_CXX_API_THROW("failed to allocate deferred cpu memory", OrtErrorCode::ORT_RUNTIME_EXCEPTION);
+ }
+ return mem;
+ }
+
+ void FreeDeferredCpuMem(void* mem) const {
+ if (mem) {
+ const auto& ort_api = Ort::GetApi();
+ auto status = ort_api.AllocatorFree(deferred_cpu_allocator, mem);
+ if (status) {
+ ORT_CXX_API_THROW("failed to free deferred cpu memory", OrtErrorCode::ORT_RUNTIME_EXCEPTION);
+ }
+ }
+ }
+};
+
+} // namespace Custom
+} // namespace Ort
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/cuda/cuda_resource.h
Added
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#include "core/providers/resource.h"
+
+#define ORT_CUDA_RESOUCE_VERSION 3
+
+enum CudaResource : int {
+ cuda_stream_t = cuda_resource_offset, // 10000
+ cudnn_handle_t,
+ cublas_handle_t,
+ deferred_cpu_allocator_t,
+ // below are cuda ep options
+ device_id_t, // 10004
+ arena_extend_strategy_t,
+ cudnn_conv_algo_search_t,
+ cudnn_conv_use_max_workspace_t,
+ cudnn_conv1d_pad_to_nc1d_t,
+ enable_skip_layer_norm_strict_mode_t,
+ prefer_nhwc_t,
+};
\ No newline at end of file
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/custom_op_context.h
Added
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#pragma once
+
+// CustomOpContext defines an interface allowing a custom op to access ep-specific resources.
+struct CustomOpContext {
+ CustomOpContext() = default;
+ virtual ~CustomOpContext(){};
+};
\ No newline at end of file
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/core/providers/resource.h
Added
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#pragma once
+
+enum ResourceOffset {
+ cpu_resource_offset = 0,
+ cuda_resource_offset = 10000,
+ dml_resource_offset = 20000,
+ rocm_resource_offset = 30000,
+ // offsets for other ort eps
+ custom_ep_resource_offset = 10000000,
+ // offsets for customized eps
+};
\ No newline at end of file
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_c_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_c_api.h
Changed
/** \mainpage ONNX Runtime
*
- * ONNX Runtime is a high-performance inference and training graph execution engine for deeplearning models.
+ * ONNX Runtime is a high-performance inference and training graph execution engine for deep learning models.
*
* ONNX Runtime's C, C++ APIs offer an easy to use interface to onboard and execute onnx models.
* - \subpage c_cpp_api "Core C, C++ APIs"
- * - \subpage training_c_cpp_api "Training C, C++ APIs for learning on the edge"
+ * - \subpage training_c_cpp_api "Training C, C++ APIs for on-device training"
*
* \page c_cpp_api Core C, C++ APIs
* <h1>C</h1>
*/
#pragma once
-#include <stdlib.h>
+#include <stdbool.h>
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
/** \brief The API version defined in this header
*
* This value is used by some API functions to behave as this version of the header expects.
*/
-#define ORT_API_VERSION 15
+#define ORT_API_VERSION 17
#ifdef __cplusplus
extern "C" {
#define _Check_return_
#define _Outptr_result_maybenull_
#define _In_reads_(X)
+#define _Inout_updates_(X)
+#define _Out_writes_(X)
#define _Inout_updates_all_(X)
#define _Out_writes_bytes_all_(X)
#define _Out_writes_all_(X)
ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64, // maps to c type uint64_t
ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64, // complex with float32 real and imaginary components
ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128, // complex with float64 real and imaginary components
- ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16 // Non-IEEE floating-point format based on IEEE754 single-precision
+ ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16, // Non-IEEE floating-point format based on IEEE754 single-precision
+ // float 8 types were introduced in onnx 1.14, see https://onnx.ai/onnx/technical/float8.html
+ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN, // Non-IEEE floating-point format based on IEEE754 single-precision
+ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ, // Non-IEEE floating-point format based on IEEE754 single-precision
+ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2, // Non-IEEE floating-point format based on IEEE754 single-precision
+ ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ // Non-IEEE floating-point format based on IEEE754 single-precision
} ONNXTensorElementDataType;
// Synced with onnx TypeProto oneof
ORT_RUNTIME_CLASS(Op);
ORT_RUNTIME_CLASS(OpAttr);
ORT_RUNTIME_CLASS(Logger);
+ORT_RUNTIME_CLASS(ShapeInferContext);
#ifdef _WIN32
typedef _Return_type_success_(return == 0) OrtStatus* OrtStatusPtr;
user_compute_stream{},
default_memory_arena_cfg{},
tunable_op_enable{false},
- tunable_op_tuning_enable{false} {}
+ tunable_op_tuning_enable{false},
+ tunable_op_max_tuning_duration_ms{} {}
#endif
/** \brief CUDA device Id
*/
int tunable_op_tuning_enable;
+ /** \brief Max tuning duration time limit for each instance of TunableOp.
+ * Defaults to 0 to disable the limit.
+ */
+ int tunable_op_max_tuning_duration_ms;
+
} OrtCUDAProviderOptions;
/** \brief ROCM Provider Options
user_compute_stream{},
default_memory_arena_cfg{},
tunable_op_enable{false},
- tunable_op_tuning_enable{false} {}
+ tunable_op_tuning_enable{false},
+ tunable_op_max_tuning_duration_ms{} {}
#endif
/** \brief ROCM device Id
*/
int tunable_op_tuning_enable;
+ /** \brief Max tuning duration time limit for each instance of TunableOp.
+ * Defaults to 0 to disable the limit.
+ */
+ int tunable_op_max_tuning_duration_ms;
+
} OrtROCMProviderOptions;
/** \brief TensorRT Provider Options
* \see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX
*/
typedef struct OrtMIGraphXProviderOptions {
- int device_id; // hip device id.
- int migraphx_fp16_enable; // enable MIGraphX FP16 precision. Default 0 = false, nonzero = true
- int migraphx_int8_enable; // enable MIGraphX INT8 precision. Default 0 = false, nonzero = true
+ int device_id; // hip device id.
+ int migraphx_fp16_enable; // MIGraphX FP16 precision. Default 0 = false, nonzero = true
+ int migraphx_int8_enable; // MIGraphX INT8 precision. Default 0 = false, nonzero = true
+ int migraphx_use_native_calibration_table; // MIGraphx INT8 cal table. Default 0 = false, noznero = true
+ const char* migraphx_int8_calibration_table_name; // MIGraphx INT8 calibration table name
} OrtMIGraphXProviderOptions;
/** \brief OpenVINO Provider Options
typedef struct OrtOpenVINOProviderOptions {
#ifdef __cplusplus
OrtOpenVINOProviderOptions() : device_type{},
- enable_vpu_fast_compile{},
+ enable_npu_fast_compile{},
device_id{},
num_of_threads{},
cache_dir{},
* Valid settings are one of: "CPU_FP32", "CPU_FP16", "GPU_FP32", "GPU_FP16"
*/
const char* device_type;
- unsigned char enable_vpu_fast_compile; ///< 0 = disabled, nonzero = enabled
+ unsigned char enable_npu_fast_compile; ///< 0 = disabled, nonzero = enabled
const char* device_id;
size_t num_of_threads; ///< 0 = Use default number of threads
const char* cache_dir; // path is set to empty by default
typedef OrtStatus*(ORT_API_CALL* RegisterCustomOpsFn)(OrtSessionOptions* options, const OrtApiBase* api);
+/** \brief Callback function for RunAsync
+ *
+ * \paramin user_data User specific data that passed back to the callback
+ * \paramout outputs On succeed, outputs host inference results, on error, the value will be nullptr
+ * \paramout num_outputs Number of outputs, on error, the value will be zero
+ * \paramout status On error, status will provide details
+ */
+typedef void (*RunAsyncCallbackFn)(void* user_data, OrtValue** outputs, size_t num_outputs, OrtStatusPtr status);
+
/** \brief The C API
*
* All C API functions are defined inside this structure as pointers to functions.
/** \brief Create an OrtEnv
*
+ * \note Invoking this function will return the same instance of the environment as that returned by a previous call
+ * to another env creation function; all arguments to this function will be ignored.
* \paramin log_severity_level The log severity level.
* \paramin logid The log identifier.
* \paramout out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv
/** \brief Create an OrtEnv
*
+ * \note Invoking this function will return the same instance of the environment as that returned by a previous call
+ * to another env creation function; all arguments to this function will be ignored. If you want to provide your
+ * own logging function, consider setting it using the SetUserLoggingFunction API instead.
* \paramin logging_function A pointer to a logging function.
* \paramin logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to
- * `logging_function`.
+ * `logging_function`. This parameter is optional.
* \paramin log_severity_level The log severity level.
* \paramin logid The log identifier.
* \paramout out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv
*
* \snippet{doc} snippets.dox OrtStatus Return Value
*/
- ORT_API2_STATUS(CreateEnvWithCustomLogger, OrtLoggingFunction logging_function, _In_opt_ void* logger_param,
- OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out);
+ ORT_API2_STATUS(CreateEnvWithCustomLogger, _In_ OrtLoggingFunction logging_function, _In_opt_ void* logger_param,
+ _In_ OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out);
/** \brief Enable Telemetry
*
/** \brief Set the optimization level to apply when loading a graph
*
- * Please see https://onnxruntime.ai/docs/performance/graph-optimizations.html for an in-depth explanation
+ * Please see https://onnxruntime.ai/docs/performance/model-optimizations/graph-optimizations.html for an in-depth explanation
* \paramin,out options The session options object
* \paramin graph_optimization_level The optimization level
*
* crossing which the current chunk is chunked into 2.
* "initial_growth_chunk_size_bytes": (Possible) Size of the second allocation in the arena.
* Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default.
+ * "max_power_of_two_extend_bytes": The maximum enxtend size if arena strategy is `kNextPowerOfTwo`.
+ * It is not an allocation limit, it is only a limit for extention when requested byte is less than the limit.
+ * When requested bytes is more than the limit, allocator will still return as requested.
+ * Use -1 to allow ORT to choose the default 1GB for max_power_of_two_extend_bytes.
* Ultimately, the allocation size is determined by the allocation memory request.
* Further allocation sizes are governed by the arena extend strategy.
*
*
* QNN supported keys:
* "backend_path": file path to QNN backend library.
- * "profiling_level": QNN profiling level, options: "basic", "detailed".
+ * "profiling_level": QNN profiling level, options: "off", "basic", "detailed". Default to off.
* "rpc_control_latency": QNN RPC control latency.
+ * "vtcm_mb": QNN VTCM size in MB. default to 0(not set).
+ * "htp_performance_mode": QNN performance mode, options: "burst", "balanced", "default", "high_performance",
+ * "high_power_saver", "low_balanced", "extreme_power_saver", "low_power_saver", "power_saver", "sustained_high_performance". Default to "default".
+ * "qnn_saver_path": File path to the QNN Saver backend library. If specified, QNN Saver will be enabled and will
+ * dump QNN API calls to disk for replay/debugging. QNN Saver produces incorrect model inference results and
+ * may alter model/EP partitioning. Use only for debugging.
+ * "qnn_context_priority": QNN context priority, options: "low", "normal", "normal_high", "high". Default to "normal".
+ * "htp_graph_finalization_optimization_mode": Set the optimization mode for graph finalization on the HTP backend. Available options:
+ * - "0": Default.
+ * - "1": Faster preparation time, less optimal graph.
+ * - "2": Longer preparation time, more optimal graph.
+ * - "3": Longest preparation time, most likely even more optimal graph. See QNN SDK documentation for specific details.
+ * "soc_model": The SoC model number. Refer to the QNN SDK documentation for valid values. Defaults to "0" (unknown).
+ * "htp_arch": The minimum HTP architecture the driver will use to select compatible QNN operators. Available options:
+ * - "0": Default (none).
+ * - "68"
+ * - "69"
+ * - "73"
+ * - "75"
+ * "device_id": The ID of the device to use when setting 'htp_arch'. Defaults to "0" (for single device).
*
* SNPE supported keys:
* "runtime": SNPE runtime engine, options: "CPU", "CPU_FLOAT32", "GPU", "GPU_FLOAT32_16_HYBRID", "GPU_FLOAT16",
* "buffer_type": ITensor or user buffers, options: "ITENSOR", user buffer with different types - "TF8", "TF16", "UINT8", "FLOAT".
* "ITENSOR" -- default, ITensor which is float only.
* "TF8" -- quantized model required, "FLOAT" -- for both quantized or non-quantized model
+ * "enable_init_cache": enable SNPE init caching feature, set to 1 to enabled it. Disabled by default.
* If SNPE is not available (due to a non Snpe enabled build or its dependencies not being installed), this function will fail.
*
* XNNPACK supported keys:
*/
ORT_API2_STATUS(GetResizedStringTensorElementBuffer, _Inout_ OrtValue* value, _In_ size_t index, _In_ size_t length_in_bytes, _Inout_ char** buffer);
- /** \brief Get Allocator from KernelContext for a specific memoryInfo.
+ /** \brief Get Allocator from KernelContext for a specific memoryInfo. Please use C API ReleaseAllocator to release out object
*
* \paramin context OrtKernelContext instance
* \paramin mem_info OrtMemoryInfo instance
* \since Version 1.15.
*/
const char*(ORT_API_CALL* GetBuildInfoString)(void);
+
+ /// \name OrtROCMProviderOptions
+ /// @{
+
+ /** \brief Create an OrtROCMProviderOptions
+ *
+ * \paramout out Newly created ::OrtROCMProviderOptions. Must be released with OrtApi::ReleaseROCMProviderOptions
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(CreateROCMProviderOptions, _Outptr_ OrtROCMProviderOptions** out);
+
+ /** \brief Set options in a ROCm Execution Provider.
+ *
+ * Please refer to https://onnxruntime.ai/docs/execution-providers/ROCm-ExecutionProvider.html
+ * to know the available keys and values. Key should be in null terminated string format of the member of
+ * ::OrtROCMProviderOptions and value should be its related range.
+ *
+ * For example, key="device_id" and value="0"
+ *
+ * \paramin rocm_options
+ * \paramin provider_options_keys Array of UTF-8 null-terminated string for provider options keys
+ * \paramin provider_options_values Array of UTF-8 null-terminated string for provider options values
+ * \paramin num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(UpdateROCMProviderOptions, _Inout_ OrtROCMProviderOptions* rocm_options,
+ _In_reads_(num_keys) const char* const* provider_options_keys,
+ _In_reads_(num_keys) const char* const* provider_options_values,
+ _In_ size_t num_keys);
+
+ /**
+ * Get serialized ROCm provider options string.
+ *
+ * For example, "device_id=0;arena_extend_strategy=0;......"
+ *
+ * \param rocm_options - OrtROCMProviderOptions instance
+ * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions()
+ * the specified allocator will be used to allocate continuous buffers for output strings and lengths.
+ * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it.
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(GetROCMProviderOptionsAsString, _In_ const OrtROCMProviderOptions* rocm_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr);
+
+ /** \brief Release an ::OrtROCMProviderOptions
+ *
+ * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does
+ *
+ * \since Version 1.16.
+ */
+ void(ORT_API_CALL* ReleaseROCMProviderOptions)(_Frees_ptr_opt_ OrtROCMProviderOptions* input);
+
+ /** \brief Create an allocator with specific type and register it with the ::OrtEnv
+ * This API enhance CreateAndRegisterAllocator that it can create an allocator with specific type, not just CPU allocator
+ * Enables sharing the allocator between multiple sessions that use the same env instance.
+ * Lifetime of the created allocator will be valid for the duration of the environment.
+ * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered.
+ * \paramin env OrtEnv instance
+ * \paramin provider_type ExecutionProvider type
+ * \paramin mem_info OrtMemoryInfo instance
+ * \paramin arena_cfg Arena configuration
+ * \paramin provider_options_keys key of the provider options map
+ * \paramin provider_options_values value of the provider options map
+ * \paramin num_keys Length of the provider options map
+ */
+ ORT_API2_STATUS(CreateAndRegisterAllocatorV2, _Inout_ OrtEnv* env, _In_ const char* provider_type, _In_ const OrtMemoryInfo* mem_info, _In_ const OrtArenaCfg* arena_cfg,
+ _In_reads_(num_keys) const char* const* provider_options_keys, _In_reads_(num_keys) const char* const* provider_options_values, _In_ size_t num_keys);
+
+ /** \brief Run the model asynchronously in a thread owned by intra op thread pool
+ *
+ * \paramin session
+ * \paramin run_options If nullptr, will use a default ::OrtRunOptions
+ * \paramin input_names Array of null terminated UTF8 encoded strings of the input names
+ * \paramin input Array of ::OrtValue%s of the input values
+ * \paramin input_len Number of elements in the input_names and inputs arrays
+ * \paramin output_names Array of null terminated UTF8 encoded strings of the output names
+ * \paramin output_names_len Number of elements in the output_names and outputs array
+ * \paramout output OrtValue* array of size output_names_len.
+ * On calling RunAsync, outputi could either be a null or a pointer to a preallocated OrtValue.
+ * Later, the output array will be passed to run_async_callback with all null(s) filled with valid
+ * OrtValue pointer(s) allocated by onnxruntime.
+ * NOTE: it is customer's duty to finally release the output array and each of its member,
+ * regardless of whether the member (OrtValue*) is allocated by onnxruntime or preallocated by the customer.
+ * \paramin run_async_callback Callback function on model run completion
+ * \paramin user_data User data that pass back to run_async_callback
+ */
+ ORT_API2_STATUS(RunAsync, _Inout_ OrtSession* session, _In_opt_ const OrtRunOptions* run_options,
+ _In_reads_(input_len) const char* const* input_names,
+ _In_reads_(input_len) const OrtValue* const* input, size_t input_len,
+ _In_reads_(output_names_len) const char* const* output_names, size_t output_names_len,
+ _Inout_updates_all_(output_names_len) OrtValue** output,
+ _In_ RunAsyncCallbackFn run_async_callback, _In_opt_ void* user_data);
+
+ /**
+ * Update TensorRT EP provider option where its data type is pointer, for example 'user_compute_stream'.
+ * If the data type of the provider option can be represented by string please use UpdateTensorRTProviderOptions.
+ *
+ * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer.
+ *
+ * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance
+ * \param key - Name of the provider option
+ * \param value - A pointer to the instance that will be assigned to this provider option
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(UpdateTensorRTProviderOptionsWithValue, _Inout_ OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _In_ void* value);
+
+ /**
+ * Get TensorRT EP provider option where its data type is pointer.
+ * If the data type of the provider option can be represented by string please use GetTensorRTProviderOptionsAsString.
+ *
+ * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance
+ * \param key - Name of the provider option
+ * \param ptr - A pointer to the instance that is kept by the provider option
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(GetTensorRTProviderOptionsByName, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _Outptr_ void** ptr);
+
+ /**
+ * Update CUDA EP provider option where its data type is pointer, for example 'user_compute_stream'.
+ * If the data type of the provider option can be represented by string please use UpdateCUDAProviderOptions.
+ *
+ * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer.
+ *
+ * \param cuda_options - OrtCUDAProviderOptionsV2 instance
+ * \param key - Name of the provider option
+ * \param value - A pointer to the instance that will be assigned to this provider option
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(UpdateCUDAProviderOptionsWithValue, _Inout_ OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _In_ void* value);
+
+ /**
+ * Get CUDA EP provider option where its data type is pointer.
+ * If the data type of the provider option can be represented by string please use GetCUDAProviderOptionsAsString.
+ *
+ * \param cuda_options - OrtCUDAProviderOptionsV2 instance
+ * \param key - Name of the provider option
+ * \param ptr - A pointer to the instance that is kept by the provider option
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(GetCUDAProviderOptionsByName, _In_ const OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _Outptr_ void** ptr);
+
+ /**
+ * Get a EP resource.
+ * E.g. a cuda stream or a cublas handle
+ *
+ * \param context - Kernel context
+ * \param resouce_version - Version of the resource
+ * \param resource_id - Type of resource
+ * \param resource - A pointer to returned resource
+ *
+ * \since Version 1.16.
+ */
+ ORT_API2_STATUS(KernelContext_GetResource, _In_ const OrtKernelContext* context, _In_ int resouce_version, _In_ int resource_id, _Outptr_ void** resource);
+
+ /** \brief Set user logging function
+ *
+ * By default the logger created by the CreateEnv* functions is used to create the session logger as well.
+ * This function allows a user to override this default session logger with a logger of their own choosing. This way
+ * the user doesn't have to create a separate environment with a custom logger. This addresses the problem when
+ * the user already created an env but now wants to use a different logger for a specific session (for debugging or
+ * other reasons).
+ *
+ * \paramin options
+ * \paramin user_logging_function A pointer to a logging function.
+ * \paramin user_logging_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to
+ * `user_logging_function`. This parameter is optional.
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(SetUserLoggingFunction, _Inout_ OrtSessionOptions* options,
+ _In_ OrtLoggingFunction user_logging_function, _In_opt_ void* user_logging_param);
+
+ /**
+ * Get number of input from OrtShapeInferContext
+ *
+ * \paramin context
+ * \paramout out The number of inputs
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(ShapeInferContext_GetInputCount, _In_ const OrtShapeInferContext* context, _Out_ size_t* out);
+
+ /**
+ * Get type and shape info of an input
+ *
+ * \paramin context
+ * \paramin index The index of the input
+ * \paramout info Type shape info of the input
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(ShapeInferContext_GetInputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _Outptr_ OrtTensorTypeAndShapeInfo** info);
+
+ /**
+ * Get attribute from OrtShapeInferContext. Note that OrtShapeInferContext is a per-node context, one could only read attribute from current node.
+ *
+ * \paramin context
+ * \paramin attr_name Name of the attribute
+ * \paramout attr Handle of the attribute fetched
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(ShapeInferContext_GetAttribute, _In_ const OrtShapeInferContext* context, _In_ const char* attr_name, _Outptr_ const OrtOpAttr** attr);
+
+ /**
+ * Set type and shape info of an ouput
+ *
+ * \paramin context
+ * \paramin index The index of the ouput
+ * \paramout info Type shape info of the output
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(ShapeInferContext_SetOutputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _In_ const OrtTensorTypeAndShapeInfo* info);
+
+ /**
+ * Set symbolic shape to type shape info
+ *
+ * \paramin info Type shape info
+ * \paramin dim_params Symbolic strings
+ * \paramin dim_params_length Number of strings
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(SetSymbolicDimensions, _In_ OrtTensorTypeAndShapeInfo* info, _In_ const char* dim_params, _In_ size_t dim_params_length);
+
+ /**
+ * Read contents of an attribute to data
+ *
+ * \paramin op_attr
+ * \paramin type Attribute type
+ * \paramout data Memory address to save raw content of the attribute
+ * \paramin len Number of bytes allowed to store in data
+ * \paramout out Number of bytes required to save the data when the call failed, or the real number of bytes saved to data on success
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(ReadOpAttr, _In_ const OrtOpAttr* op_attr, _In_ OrtOpAttrType type, _Inout_ void* data, _In_ size_t len, _Out_ size_t* out);
+
+ /** \brief Set whether to use deterministic compute.
+ *
+ * Default is false. If set to true, this will enable deterministic compute for GPU kernels where possible.
+ * Note that this most likely will have a performance cost.
+ *
+ * \paramin options
+ * \paramin value
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(SetDeterministicCompute, _Inout_ OrtSessionOptions* options, bool value);
+
+ /**
+ * Run fn in parallel
+ *
+ * \paramin context
+ * \paramin fn Function accepting usr_data and an integer as iterator
+ * \paramin total The number of times fn is to be invoked
+ * \paramin num_batch Number of batches by which the "total" is to be divided in maximum. When zero, there is no limit
+ * \paramin usr_data User data to be passed back to fn
+ *
+ * \since Version 1.17.
+ */
+ ORT_API2_STATUS(KernelContext_ParallelFor, _In_ const OrtKernelContext* context, _In_ void (*fn)(void*, size_t), _In_ size_t total, _In_ size_t num_batch, _In_ void* usr_data);
+
+ /** \brief Append OpenVINO execution provider to the session options
+ *
+ * If OpenVINO is not available (due to a non OpenVINO enabled build, or if OpenVINO is not installed on the system), this function will fail.
+ *
+ * \paramin options
+ * \paramin provider_options_keys
+ * \paramin provider_options_values
+ * \paramin num_keys
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ */
+ ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_OpenVINO_V2,
+ _In_ OrtSessionOptions* options,
+ _In_reads_(num_keys) const char* const* provider_options_keys,
+ _In_reads_(num_keys) const char* const* provider_options_values,
+ _In_ size_t num_keys);
};
/*
struct OrtCustomOp {
uint32_t version; // Must be initialized to ORT_API_VERSION
- // This callback creates the kernel, which is a user defined parameter that is passed to the Kernel* callbacks below.
+ // This callback creates the kernel, which is a user defined
+ // parameter that is passed to the Kernel* callbacks below. It is
+ // recommended to use CreateKernelV2 which allows for a safe error
+ // propagation by returning an OrtStatusPtr.
void*(ORT_API_CALL* CreateKernel)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api,
_In_ const OrtKernelInfo* info);
ONNXTensorElementDataType(ORT_API_CALL* GetOutputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index);
size_t(ORT_API_CALL* GetOutputTypeCount)(_In_ const struct OrtCustomOp* op);
- // Op kernel callbacks
+ // Perform a computation step. It is recommended to use
+ // KernelComputeV2 which allows for a safe error propagation by
+ // returning an OrtStatusPtr.
void(ORT_API_CALL* KernelCompute)(_In_ void* op_kernel, _In_ OrtKernelContext* context);
void(ORT_API_CALL* KernelDestroy)(_In_ void* op_kernel);
// and false (zero) otherwise.
// Applicable only for custom ops that have a variadic output.
int(ORT_API_CALL* GetVariadicOutputHomogeneity)(_In_ const struct OrtCustomOp* op);
+
+ // Create the kernel state which is passed to each compute call.
+ OrtStatusPtr(ORT_API_CALL* CreateKernelV2)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api,
+ _In_ const OrtKernelInfo* info,
+ _Out_ void** kernel);
+
+ // Perform the computation step.
+ OrtStatusPtr(ORT_API_CALL* KernelComputeV2)(_In_ void* op_kernel, _In_ OrtKernelContext* context);
+
+ OrtStatusPtr(ORT_API_CALL* InferOutputShapeFn)(_In_ const struct OrtCustomOp* op, _In_ OrtShapeInferContext*);
+
+ // Get start range
+ int(ORT_API_CALL* GetStartVersion)(_In_ const struct OrtCustomOp* op);
+ int(ORT_API_CALL* GetEndVersion)(_In_ const struct OrtCustomOp* op);
};
/*
ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CUDA, _In_ OrtSessionOptions* options, int device_id);
/*
+ * This is the old way to add the ROCm provider to the session, please use
+ * SessionOptionsAppendExecutionProvider_ROCM above to access the latest functionality
+ * This function always exists, but will only succeed if Onnxruntime was built with
+ * HIP support and the ROCm provider shared library exists
+ *
+ * \param device_id HIP device id, starts from zero.
+ */
+ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_ROCM, _In_ OrtSessionOptions* options, int device_id);
+
+/*
* This is the old way to add the MIGraphX provider to the session, please use
* SessionOptionsAppendExecutionProvider_MIGraphX above to access the latest functionality
* This function always exists, but will only succeed if Onnxruntime was built with
*/
ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Dnnl, _In_ OrtSessionOptions* options, int use_arena);
+/*
+ * This is the old way to add the TensorRT provider to the session, please use SessionOptionsAppendExecutionProvider_TensorRT_V2 above to access the latest functionality
+ * This function always exists, but will only succeed if Onnxruntime was built with TensorRT support and the TensorRT provider shared library exists
+ *
+ * \param device_id CUDA device id, starts from zero.
+ */
+ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Tensorrt, _In_ OrtSessionOptions* options, int device_id);
+
#ifdef __cplusplus
}
#endif
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_cxx_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_cxx_api.h
Changed
#pragma once
#include "onnxruntime_c_api.h"
+#include "onnxruntime_float16.h"
+
#include <cstddef>
#include <cstdio>
#include <array>
std::vector<std::string> GetAvailableProviders();
/** \brief IEEE 754 half-precision floating point data type
- * \details It is necessary for type dispatching to make use of C++ API
- * The type is implicitly convertible to/from uint16_t.
+ *
+ * \details This struct is used for converting float to float16 and back
+ * so the user could feed inputs and fetch outputs using these type.
+ *
* The size of the structure should align with uint16_t and one can freely cast
* uint16_t buffers to/from Ort::Float16_t to feed and retrieve data.
*
- * Generally, you can feed any of your types as float16/blfoat16 data to create a tensor
- * on top of it, providing it can form a continuous buffer with 16-bit elements with no padding.
- * And you can also feed a array of uint16_t elements directly. For example,
- *
* \code{.unparsed}
- * uint16_t values = { 15360, 16384, 16896, 17408, 17664};
- * constexpr size_t values_length = sizeof(values) / sizeof(values0);
- * std::vector<int64_t> dims = {values_length}; // one dimensional example
- * Ort::MemoryInfo info("Cpu", OrtDeviceAllocator, 0, OrtMemTypeDefault);
- * // Note we are passing bytes count in this api, not number of elements -> sizeof(values)
- * auto float16_tensor = Ort::Value::CreateTensor(info, values, sizeof(values),
- * dims.data(), dims.size(), ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16);
- * \endcode
+ * // This example demonstrates converion from float to float16
+ * constexpr float values = {1.f, 2.f, 3.f, 4.f, 5.f};
+ * std::vector<Ort::Float16_t> fp16_values;
+ * fp16_values.reserve(std::size(values));
+ * std::transform(std::begin(values), std::end(values), std::back_inserter(fp16_values),
+ * (float value) { return Ort::Float16_t(value); });
*
- * Here is another example, a little bit more elaborate. Let's assume that you use your own float16 type and you want to use
- * a templated version of the API above so the type is automatically set based on your type. You will need to supply an extra
- * template specialization.
- *
- * \code{.unparsed}
- * namespace yours { struct half {}; } // assume this is your type, define this:
- * namespace Ort {
- * template<>
- * struct TypeToTensorType<yours::half> { static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16; };
- * } //namespace Ort
- *
- * std::vector<yours::half> values;
- * std::vector<int64_t> dims = {values.size()}; // one dimensional example
- * Ort::MemoryInfo info("Cpu", OrtDeviceAllocator, 0, OrtMemTypeDefault);
- * // Here we are passing element count -> values.size()
- * auto float16_tensor = Ort::Value::CreateTensor<yours::half>(info, values.data(), values.size(), dims.data(), dims.size());
- *
- * \endcode
- */
-struct Float16_t {
- uint16_t value;
- constexpr Float16_t() noexcept : value(0) {}
- constexpr Float16_t(uint16_t v) noexcept : value(v) {}
- constexpr operator uint16_t() const noexcept { return value; }
- constexpr bool operator==(const Float16_t& rhs) const noexcept { return value == rhs.value; };
- constexpr bool operator!=(const Float16_t& rhs) const noexcept { return value != rhs.value; };
+ * \endcode
+ */
+struct Float16_t : onnxruntime_float16::Float16Impl<Float16_t> {
+ private:
+ /// <summary>
+ /// Constructor from a 16-bit representation of a float16 value
+ /// No conversion is done here.
+ /// </summary>
+ /// <param name="v">16-bit representation</param>
+ constexpr explicit Float16_t(uint16_t v) noexcept { val = v; }
+
+ public:
+ using Base = onnxruntime_float16::Float16Impl<Float16_t>;
+
+ /// <summary>
+ /// Default constructor
+ /// </summary>
+ Float16_t() = default;
+
+ /// <summary>
+ /// Explicit conversion to uint16_t representation of float16.
+ /// </summary>
+ /// <param name="v">uint16_t bit representation of float16</param>
+ /// <returns>new instance of Float16_t</returns>
+ constexpr static Float16_t FromBits(uint16_t v) noexcept { return Float16_t(v); }
+
+ /// <summary>
+ /// __ctor from float. Float is converted into float16 16-bit representation.
+ /// </summary>
+ /// <param name="v">float value</param>
+ explicit Float16_t(float v) noexcept { val = Base::ToUint16Impl(v); }
+
+ /// <summary>
+ /// Converts float16 to float
+ /// </summary>
+ /// <returns>float representation of float16 value</returns>
+ float ToFloat() const noexcept { return Base::ToFloatImpl(); }
+
+ /// <summary>
+ /// Checks if the value is negative
+ /// </summary>
+ /// <returns>true if negative</returns>
+ using Base::IsNegative;
+
+ /// <summary>
+ /// Tests if the value is NaN
+ /// </summary>
+ /// <returns>true if NaN</returns>
+ using Base::IsNaN;
+
+ /// <summary>
+ /// Tests if the value is finite
+ /// </summary>
+ /// <returns>true if finite</returns>
+ using Base::IsFinite;
+
+ /// <summary>
+ /// Tests if the value represents positive infinity.
+ /// </summary>
+ /// <returns>true if positive infinity</returns>
+ using Base::IsPositiveInfinity;
+
+ /// <summary>
+ /// Tests if the value represents negative infinity
+ /// </summary>
+ /// <returns>true if negative infinity</returns>
+ using Base::IsNegativeInfinity;
+
+ /// <summary>
+ /// Tests if the value is either positive or negative infinity.
+ /// </summary>
+ /// <returns>True if absolute value is infinity</returns>
+ using Base::IsInfinity;
+
+ /// <summary>
+ /// Tests if the value is NaN or zero. Useful for comparisons.
+ /// </summary>
+ /// <returns>True if NaN or zero.</returns>
+ using Base::IsNaNOrZero;
+
+ /// <summary>
+ /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
+ /// </summary>
+ /// <returns>True if so</returns>
+ using Base::IsNormal;
+
+ /// <summary>
+ /// Tests if the value is subnormal (denormal).
+ /// </summary>
+ /// <returns>True if so</returns>
+ using Base::IsSubnormal;
+
+ /// <summary>
+ /// Creates an instance that represents absolute value.
+ /// </summary>
+ /// <returns>Absolute value</returns>
+ using Base::Abs;
+
+ /// <summary>
+ /// Creates a new instance with the sign flipped.
+ /// </summary>
+ /// <returns>Flipped sign instance</returns>
+ using Base::Negate;
+
+ /// <summary>
+ /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
+ /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
+ /// and therefore equivalent, if the resulting value is still zero.
+ /// </summary>
+ /// <param name="lhs">first value</param>
+ /// <param name="rhs">second value</param>
+ /// <returns>True if both arguments represent zero</returns>
+ using Base::AreZero;
+
+ /// <summary>
+ /// User defined conversion operator. Converts Float16_t to float.
+ /// </summary>
+ explicit operator float() const noexcept { return ToFloat(); }
+
+ using Base::operator==;
+ using Base::operator!=;
+ using Base::operator<;
};
static_assert(sizeof(Float16_t) == sizeof(uint16_t), "Sizes must match");
/** \brief bfloat16 (Brain Floating Point) data type
- * \details It is necessary for type dispatching to make use of C++ API
- * The type is implicitly convertible to/from uint16_t.
+ *
+ * \details This struct is used for converting float to bfloat16 and back
+ * so the user could feed inputs and fetch outputs using these type.
+ *
* The size of the structure should align with uint16_t and one can freely cast
* uint16_t buffers to/from Ort::BFloat16_t to feed and retrieve data.
*
- * See also code examples for Float16_t above.
+ * \code{.unparsed}
+ * // This example demonstrates converion from float to float16
+ * constexpr float values = {1.f, 2.f, 3.f, 4.f, 5.f};
+ * std::vector<Ort::BFloat16_t> bfp16_values;
+ * bfp16_values.reserve(std::size(values));
+ * std::transform(std::begin(values), std::end(values), std::back_inserter(bfp16_values),
+ * (float value) { return Ort::BFloat16_t(value); });
+ *
+ * \endcode
*/
-struct BFloat16_t {
- uint16_t value;
- constexpr BFloat16_t() noexcept : value(0) {}
- constexpr BFloat16_t(uint16_t v) noexcept : value(v) {}
- constexpr operator uint16_t() const noexcept { return value; }
- constexpr bool operator==(const BFloat16_t& rhs) const noexcept { return value == rhs.value; };
- constexpr bool operator!=(const BFloat16_t& rhs) const noexcept { return value != rhs.value; };
+struct BFloat16_t : onnxruntime_float16::BFloat16Impl<BFloat16_t> {
+ private:
+ /// <summary>
+ /// Constructor from a uint16_t representation of bfloat16
+ /// used in FromBits() to escape overload resolution issue with
+ /// constructor from float.
+ /// No conversion is done.
+ /// </summary>
+ /// <param name="v">16-bit bfloat16 value</param>
+ constexpr explicit BFloat16_t(uint16_t v) noexcept { val = v; }
+
+ public:
+ using Base = onnxruntime_float16::BFloat16Impl<BFloat16_t>;
+
+ BFloat16_t() = default;
+
+ /// <summary>
+ /// Explicit conversion to uint16_t representation of bfloat16.
+ /// </summary>
+ /// <param name="v">uint16_t bit representation of bfloat16</param>
+ /// <returns>new instance of BFloat16_t</returns>
+ static constexpr BFloat16_t FromBits(uint16_t v) noexcept { return BFloat16_t(v); }
+
+ /// <summary>
+ /// __ctor from float. Float is converted into bfloat16 16-bit representation.
+ /// </summary>
+ /// <param name="v">float value</param>
+ explicit BFloat16_t(float v) noexcept { val = Base::ToUint16Impl(v); }
+
+ /// <summary>
+ /// Converts bfloat16 to float
+ /// </summary>
+ /// <returns>float representation of bfloat16 value</returns>
+ float ToFloat() const noexcept { return Base::ToFloatImpl(); }
+
+ /// <summary>
+ /// Checks if the value is negative
+ /// </summary>
+ /// <returns>true if negative</returns>
+ using Base::IsNegative;
+
+ /// <summary>
+ /// Tests if the value is NaN
+ /// </summary>
+ /// <returns>true if NaN</returns>
+ using Base::IsNaN;
+
+ /// <summary>
+ /// Tests if the value is finite
+ /// </summary>
+ /// <returns>true if finite</returns>
+ using Base::IsFinite;
+
+ /// <summary>
+ /// Tests if the value represents positive infinity.
+ /// </summary>
+ /// <returns>true if positive infinity</returns>
+ using Base::IsPositiveInfinity;
+
+ /// <summary>
+ /// Tests if the value represents negative infinity
+ /// </summary>
+ /// <returns>true if negative infinity</returns>
+ using Base::IsNegativeInfinity;
+
+ /// <summary>
+ /// Tests if the value is either positive or negative infinity.
+ /// </summary>
+ /// <returns>True if absolute value is infinity</returns>
+ using Base::IsInfinity;
+
+ /// <summary>
+ /// Tests if the value is NaN or zero. Useful for comparisons.
+ /// </summary>
+ /// <returns>True if NaN or zero.</returns>
+ using Base::IsNaNOrZero;
+
+ /// <summary>
+ /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
+ /// </summary>
+ /// <returns>True if so</returns>
+ using Base::IsNormal;
+
+ /// <summary>
+ /// Tests if the value is subnormal (denormal).
+ /// </summary>
+ /// <returns>True if so</returns>
+ using Base::IsSubnormal;
+
+ /// <summary>
+ /// Creates an instance that represents absolute value.
+ /// </summary>
+ /// <returns>Absolute value</returns>
+ using Base::Abs;
+
+ /// <summary>
+ /// Creates a new instance with the sign flipped.
+ /// </summary>
+ /// <returns>Flipped sign instance</returns>
+ using Base::Negate;
+
+ /// <summary>
+ /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
+ /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
+ /// and therefore equivalent, if the resulting value is still zero.
+ /// </summary>
+ /// <param name="lhs">first value</param>
+ /// <param name="rhs">second value</param>
+ /// <returns>True if both arguments represent zero</returns>
+ using Base::AreZero;
+
+ /// <summary>
+ /// User defined conversion operator. Converts BFloat16_t to float.
+ /// </summary>
+ explicit operator float() const noexcept { return ToFloat(); }
+
+ // We do not have an inherited impl for the below operators
+ // as the internal class implements them a little differently
+ bool operator==(const BFloat16_t& rhs) const noexcept;
+ bool operator!=(const BFloat16_t& rhs) const noexcept { return !(*this == rhs); }
+ bool operator<(const BFloat16_t& rhs) const noexcept;
};
static_assert(sizeof(BFloat16_t) == sizeof(uint16_t), "Sizes must match");
+/** \brief float8e4m3fn (Float8 Floating Point) data type
+ * \details It is necessary for type dispatching to make use of C++ API
+ * The type is implicitly convertible to/from uint8_t.
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
+ */
+struct Float8E4M3FN_t {
+ uint8_t value;
+ constexpr Float8E4M3FN_t() noexcept : value(0) {}
+ constexpr Float8E4M3FN_t(uint8_t v) noexcept : value(v) {}
+ constexpr operator uint8_t() const noexcept { return value; }
+ // nan values are treated like any other value for operator ==, !=
+ constexpr bool operator==(const Float8E4M3FN_t& rhs) const noexcept { return value == rhs.value; };
+ constexpr bool operator!=(const Float8E4M3FN_t& rhs) const noexcept { return value != rhs.value; };
+};
+
+static_assert(sizeof(Float8E4M3FN_t) == sizeof(uint8_t), "Sizes must match");
+
+/** \brief float8e4m3fnuz (Float8 Floating Point) data type
+ * \details It is necessary for type dispatching to make use of C++ API
+ * The type is implicitly convertible to/from uint8_t.
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
+ */
+struct Float8E4M3FNUZ_t {
+ uint8_t value;
+ constexpr Float8E4M3FNUZ_t() noexcept : value(0) {}
+ constexpr Float8E4M3FNUZ_t(uint8_t v) noexcept : value(v) {}
+ constexpr operator uint8_t() const noexcept { return value; }
+ // nan values are treated like any other value for operator ==, !=
+ constexpr bool operator==(const Float8E4M3FNUZ_t& rhs) const noexcept { return value == rhs.value; };
+ constexpr bool operator!=(const Float8E4M3FNUZ_t& rhs) const noexcept { return value != rhs.value; };
+};
+
+static_assert(sizeof(Float8E4M3FNUZ_t) == sizeof(uint8_t), "Sizes must match");
+
+/** \brief float8e5m2 (Float8 Floating Point) data type
+ * \details It is necessary for type dispatching to make use of C++ API
+ * The type is implicitly convertible to/from uint8_t.
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
+ */
+struct Float8E5M2_t {
+ uint8_t value;
+ constexpr Float8E5M2_t() noexcept : value(0) {}
+ constexpr Float8E5M2_t(uint8_t v) noexcept : value(v) {}
+ constexpr operator uint8_t() const noexcept { return value; }
+ // nan values are treated like any other value for operator ==, !=
+ constexpr bool operator==(const Float8E5M2_t& rhs) const noexcept { return value == rhs.value; };
+ constexpr bool operator!=(const Float8E5M2_t& rhs) const noexcept { return value != rhs.value; };
+};
+
+static_assert(sizeof(Float8E5M2_t) == sizeof(uint8_t), "Sizes must match");
+
+/** \brief float8e5m2fnuz (Float8 Floating Point) data type
+ * \details It is necessary for type dispatching to make use of C++ API
+ * The type is implicitly convertible to/from uint8_t.
+ * See https://onnx.ai/onnx/technical/float8.html for further details.
+ */
+struct Float8E5M2FNUZ_t {
+ uint8_t value;
+ constexpr Float8E5M2FNUZ_t() noexcept : value(0) {}
+ constexpr Float8E5M2FNUZ_t(uint8_t v) noexcept : value(v) {}
+ constexpr operator uint8_t() const noexcept { return value; }
+ // nan values are treated like any other value for operator ==, !=
+ constexpr bool operator==(const Float8E5M2FNUZ_t& rhs) const noexcept { return value == rhs.value; };
+ constexpr bool operator!=(const Float8E5M2FNUZ_t& rhs) const noexcept { return value != rhs.value; };
+};
+
+static_assert(sizeof(Float8E5M2FNUZ_t) == sizeof(uint8_t), "Sizes must match");
+
namespace detail {
// This is used internally by the C++ API. This macro is to make it easy to generate overloaded methods for all of the various OrtRelease* functions for every Ort* type
// This can't be done in the C API since C doesn't have function overloading.
Env& UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level); ///< Wraps OrtApi::UpdateEnvWithCustomLogLevel
Env& CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg); ///< Wraps OrtApi::CreateAndRegisterAllocator
+
+ Env& CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map<std::string, std::string>& options, const OrtArenaCfg* arena_cfg); ///< Wraps OrtApi::CreateAndRegisterAllocatorV2
};
/** \brief Custom Op Domain
SessionOptionsImpl& SetIntraOpNumThreads(int intra_op_num_threads); ///< Wraps OrtApi::SetIntraOpNumThreads
SessionOptionsImpl& SetInterOpNumThreads(int inter_op_num_threads); ///< Wraps OrtApi::SetInterOpNumThreads
SessionOptionsImpl& SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level); ///< Wraps OrtApi::SetSessionGraphOptimizationLevel
+ SessionOptionsImpl& SetDeterministicCompute(bool value); ///< Wraps OrtApi::SetDeterministicCompute
SessionOptionsImpl& EnableCpuMemArena(); ///< Wraps OrtApi::EnableCpuMemArena
SessionOptionsImpl& DisableCpuMemArena(); ///< Wraps OrtApi::DisableCpuMemArena
SessionOptionsImpl& AddInitializer(const char* name, const OrtValue* ort_val); ///< Wraps OrtApi::AddInitializer
SessionOptionsImpl& AddExternalInitializers(const std::vector<std::string>& names, const std::vector<Value>& ort_values); ///< Wraps OrtApi::AddExternalInitializers
- SessionOptionsImpl& AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA
- SessionOptionsImpl& AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2
- SessionOptionsImpl& AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM
- SessionOptionsImpl& AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO
+ SessionOptionsImpl& AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA
+ SessionOptionsImpl& AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2
+ SessionOptionsImpl& AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM
+ SessionOptionsImpl& AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO
+ ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO_V2
+ SessionOptionsImpl& AppendExecutionProvider_OpenVINO_V2(const std::unordered_map<std::string, std::string>& provider_options = {});
SessionOptionsImpl& AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT
SessionOptionsImpl& AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT
SessionOptionsImpl& AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX
void Run(const RunOptions& run_options, const IoBinding&); ///< Wraps OrtApi::RunWithBinding
+ /** \brief Run the model asynchronously in a thread owned by intra op thread pool
+ *
+ * Wraps OrtApi::RunAsync
+ *
+ * \paramin run_options
+ * \paramin input_names Array of null terminated UTF8 encoded strings of the input names
+ * \paramin input_values Array of Value objects of length input_count
+ * \paramin input_count Number of elements in the input_names and inputs arrays
+ * \paramin output_names Array of null terminated UTF8 encoded strings of the output names
+ * \paramout output_values Array of provided Values to be filled with outputs.
+ * On calling RunAsync, output_valuesi could either be initialized by a null pointer or a preallocated OrtValue*.
+ * Later, on invoking the callback, each output_valuesi of null will be filled with an OrtValue* allocated by onnxruntime.
+ * Then, an OrtValue** pointer will be casted from output_values, and pass to the callback.
+ * NOTE: it is customer's duty to finally release output_values and each of its member,
+ * regardless of whether the member (Ort::Value) is allocated by onnxruntime or preallocated by the customer.
+ * \paramin output_count Number of elements in the output_names and outputs array
+ * \paramin callback Callback function on model run completion
+ * \paramin user_data User data that pass back to the callback
+ */
+ void RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count,
+ const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data);
+
/** \brief End profiling and return a copy of the profiling file name.
*
* \param allocator to allocate memory for the copy of the string returned
static Value CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len);
/** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue.
+ *
* \param info Memory description of where the p_data buffer resides (CPU vs GPU etc).
* \param p_data Pointer to the data buffer.
* \param p_data_byte_count The number of bytes in the data buffer.
static Value CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len,
ONNXTensorElementDataType type);
- /** \brief Creates a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue.
+ /** \brief Creates an OrtValue with a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue.
+ * This overload will allocate the buffer for the tensor according to the supplied shape and data type.
+ * The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released.
+ * The input data would need to be copied into the allocated buffer.
+ * This API is not suitable for strings.
+ *
* \tparam T The numeric datatype. This API is not suitable for strings.
* \param allocator The allocator to use.
* \param shape Pointer to the tensor shape dimensions.
template <typename T>
static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len);
- /** \brief Creates a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue.
+ /** \brief Creates an OrtValue with a tensor using the supplied OrtAllocator.
+ * Wraps OrtApi::CreateTensorAsOrtValue.
+ * The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released.
+ * The input data would need to be copied into the allocated buffer.
+ * This API is not suitable for strings.
+ *
* \param allocator The allocator to use.
* \param shape Pointer to the tensor shape dimensions.
* \param shape_len The number of tensor shape dimensions.
*/
static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type);
- static Value CreateMap(Value& keys, Value& values); ///< Wraps OrtApi::CreateValue
- static Value CreateSequence(std::vector<Value>& values); ///< Wraps OrtApi::CreateValue
+ /** \brief Creates an OrtValue with a Map Onnx type representation.
+ * The API would ref-count the supplied OrtValues and they will be released
+ * when the returned OrtValue is released. The caller may release keys and values after the call
+ * returns.
+ *
+ * \param keys an OrtValue containing a tensor with primitive data type keys.
+ * \param values an OrtValue that may contain a tensor. Ort currently supports only primitive data type values.
+ */
+ static Value CreateMap(const Value& keys, const Value& values); ///< Wraps OrtApi::CreateValue
+
+ /** \brief Creates an OrtValue with a Sequence Onnx type representation.
+ * The API would ref-count the supplied OrtValues and they will be released
+ * when the returned OrtValue is released. The caller may release the values after the call
+ * returns.
+ *
+ * \param values a vector of OrtValues that must have the same Onnx value type.
+ */
+ static Value CreateSequence(const std::vector<Value>& values); ///< Wraps OrtApi::CreateValue
+ /** \brief Creates an OrtValue wrapping an Opaque type.
+ * This is used for experimental support of non-tensor types.
+ *
+ * \tparam T - the type of the value.
+ * \param domain - zero terminated utf-8 string. Domain of the type.
+ * \param type_name - zero terminated utf-8 string. Name of the type.
+ * \param value - the value to be wrapped.
+ */
template <typename T>
- static Value CreateOpaque(const char* domain, const char* type_name, const T&); ///< Wraps OrtApi::CreateOpaqueValue
+ static Value CreateOpaque(const char* domain, const char* type_name, const T& value); ///< Wraps OrtApi::CreateOpaqueValue
#if !defined(DISABLE_SPARSE_TENSORS)
/// <summary>
void* GetGPUComputeStream() const;
Logger GetLogger() const;
OrtAllocator* GetAllocator(const OrtMemoryInfo& memory_info) const;
+ OrtKernelContext* GetOrtKernelContext() const { return ctx_; }
+ void ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const;
private:
OrtKernelContext* ctx_;
};
/// <summary>
-/// This entire structure is deprecated, but we not marking
-/// it as a whole yet since we want to preserve for the next release.
+/// Provide access to per-node attributes and input shapes, so one could compute and set output shapes.
/// </summary>
-struct CustomOpApi {
- CustomOpApi(const OrtApi& api) : api_(api) {}
-
- /** \deprecated use Ort::Value::GetTensorTypeAndShape()
- * deprecated
- * This interface produces a pointer that must be released. Not exception safe.
- */
- deprecated("use Ort::Value::GetTensorTypeAndShape()") OrtTensorTypeAndShapeInfo* GetTensorTypeAndShape(_In_ const OrtValue* value);
-
- /** \deprecated use Ort::TensorTypeAndShapeInfo::GetElementCount()
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::TensorTypeAndShapeInfo::GetElementCount()") size_t GetTensorShapeElementCount(_In_ const OrtTensorTypeAndShapeInfo* info);
-
- /** \deprecated use Ort::TensorTypeAndShapeInfo::GetElementType()
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::TensorTypeAndShapeInfo::GetElementType()") ONNXTensorElementDataType GetTensorElementType(const OrtTensorTypeAndShapeInfo* info);
-
- /** \deprecated use Ort::TensorTypeAndShapeInfo::GetDimensionsCount()
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::TensorTypeAndShapeInfo::GetDimensionsCount()") size_t GetDimensionsCount(_In_ const OrtTensorTypeAndShapeInfo* info);
+struct ShapeInferContext {
+ struct SymbolicInteger {
+ SymbolicInteger(int64_t i) : i_(i), is_int_(true){};
+ SymbolicInteger(const char* s) : s_(s), is_int_(false){};
+ SymbolicInteger(const SymbolicInteger&) = default;
+ SymbolicInteger(SymbolicInteger&&) = default;
- /** \deprecated use Ort::TensorTypeAndShapeInfo::GetShape()
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::TensorTypeAndShapeInfo::GetShape()") void GetDimensions(_In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, size_t dim_values_length);
+ SymbolicInteger& operator=(const SymbolicInteger&) = default;
+ SymbolicInteger& operator=(SymbolicInteger&&) = default;
- /** \deprecated
- * deprecated
- * This interface sets dimensions to TensorTypeAndShapeInfo, but has no effect on the OrtValue.
- */
- deprecated("Do not use") void SetDimensions(OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count);
+ bool operator==(const SymbolicInteger& dim) const {
+ if (is_int_ == dim.is_int_) {
+ if (is_int_) {
+ return i_ == dim.i_;
+ } else {
+ return std::string{s_} == std::string{dim.s_};
+ }
+ }
+ return false;
+ }
- /** \deprecated use Ort::Value::GetTensorMutableData()
- * deprecated
- * This interface is redundant.
- */
- template <typename T>
- deprecated("use Ort::Value::GetTensorMutableData()") T* GetTensorMutableData(_Inout_ OrtValue* value);
+ bool IsInt() const { return is_int_; }
+ int64_t AsInt() const { return i_; }
+ const char* AsSym() const { return s_; }
- /** \deprecated use Ort::Value::GetTensorData()
- * deprecated
- * This interface is redundant.
- */
- template <typename T>
- deprecated("use Ort::Value::GetTensorData()") const T* GetTensorData(_Inout_ const OrtValue* value);
+ static constexpr int INVALID_INT_DIM = -2;
- /** \deprecated use Ort::Value::GetTensorMemoryInfo()
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::Value::GetTensorMemoryInfo()") const OrtMemoryInfo* GetTensorMemoryInfo(_In_ const OrtValue* value);
-
- /** \deprecated use Ort::TensorTypeAndShapeInfo::GetShape()
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::TensorTypeAndShapeInfo::GetShape()") std::vector<int64_t> GetTensorShape(const OrtTensorTypeAndShapeInfo* info);
+ private:
+ union {
+ int64_t i_;
+ const char* s_;
+ };
+ bool is_int_;
+ };
- /** \deprecated use TensorTypeAndShapeInfo instances for automatic ownership.
- * deprecated
- * This interface is not exception safe.
- */
- deprecated("use TensorTypeAndShapeInfo") void ReleaseTensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* input);
-
- /** \deprecated use Ort::KernelContext::GetInputCount
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::KernelContext::GetInputCount") size_t KernelContext_GetInputCount(const OrtKernelContext* context);
-
- /** \deprecated use Ort::KernelContext::GetInput
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::KernelContext::GetInput") const OrtValue* KernelContext_GetInput(const OrtKernelContext* context, _In_ size_t index);
-
- /** \deprecated use Ort::KernelContext::GetOutputCount
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::KernelContext::GetOutputCount") size_t KernelContext_GetOutputCount(const OrtKernelContext* context);
-
- /** \deprecated use Ort::KernelContext::GetOutput
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::KernelContext::GetOutput") OrtValue* KernelContext_GetOutput(OrtKernelContext* context, _In_ size_t index, _In_ const int64_t* dim_values, size_t dim_count);
+ using Shape = std::vector<SymbolicInteger>;
- /** \deprecated use Ort::KernelContext::GetGPUComputeStream
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::KernelContext::GetGPUComputeStream") void* KernelContext_GetGPUComputeStream(const OrtKernelContext* context);
+ ShapeInferContext(const OrtApi* ort_api, OrtShapeInferContext* ctx);
- /** \deprecated use Ort::ThrowOnError()
- * deprecated
- * This interface is redundant.
- */
- deprecated("use Ort::ThrowOnError()") void ThrowOnError(OrtStatus* result);
+ const Shape& GetInputShape(size_t indice) const { return input_shapes_.at(indice); }
- /** \deprecated use Ort::OpAttr
- * deprecated
- * This interface is not exception safe.
- */
- deprecated("use Ort::OpAttr") OrtOpAttr* CreateOpAttr(_In_ const char* name,
- _In_ const void* data,
- _In_ int len,
- _In_ OrtOpAttrType type);
+ size_t GetInputCount() const { return input_shapes_.size(); }
- /** \deprecated use Ort::OpAttr
- * deprecated
- * This interface is not exception safe.
- */
- deprecated("use Ort::OpAttr") void ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr);
+ Status SetOutputShape(size_t indice, const Shape& shape);
- /** \deprecated use Ort::Op
- * deprecated
- * This interface is not exception safe.
- */
- deprecated("use Ort::Op") OrtOp* CreateOp(_In_ const OrtKernelInfo* info,
- _In_z_ const char* op_name,
- _In_z_ const char* domain,
- int version,
- _In_reads_(type_constraint_count) const char** type_constraint_names,
- _In_reads_(type_constraint_count) const ONNXTensorElementDataType* type_constraint_values,
- int type_constraint_count,
- _In_reads_(attr_count) const OrtOpAttr* const* attr_values,
- int attr_count,
- int input_count,
- int output_count);
+ int64_t GetAttrInt(const char* attr_name);
- /** \deprecated use Ort::Op::Invoke
- * deprecated
- * This interface is redundant
- */
- deprecated("use Ort::Op::Invoke") void InvokeOp(_In_ const OrtKernelContext* context,
- _In_ const OrtOp* ort_op,
- _In_ const OrtValue* const* input_values,
- _In_ int input_count,
- _Inout_ OrtValue* const* output_values,
- _In_ int output_count);
+ using Ints = std::vector<int64_t>;
+ Ints GetAttrInts(const char* attr_name);
- /** \deprecated use Ort::Op for automatic lifespan management.
- * deprecated
- * This interface is not exception safe.
- */
- deprecated("use Ort::Op") void ReleaseOp(_Frees_ptr_opt_ OrtOp* ort_op);
+ float GetAttrFloat(const char* attr_name);
- /** \deprecated use Ort::KernelInfo for automatic lifespan management or for
- * querying attributes
- * deprecated
- * This interface is redundant
- */
- template <typename T> // T is only implemented for std::vector<float>, std::vector<int64_t>, float, int64_t, and string
- deprecated("use Ort::KernelInfo::GetAttribute") T KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name);
+ using Floats = std::vector<float>;
+ Floats GetAttrFloats(const char* attr_name);
- /** \deprecated use Ort::KernelInfo::Copy
- * querying attributes
- * deprecated
- * This interface is not exception safe
- */
- deprecated("use Ort::KernelInfo::Copy") OrtKernelInfo* CopyKernelInfo(_In_ const OrtKernelInfo* info);
+ std::string GetAttrString(const char* attr_name);
- /** \deprecated use Ort::KernelInfo for lifespan management
- * querying attributes
- * deprecated
- * This interface is not exception safe
- */
- deprecated("use Ort::KernelInfo") void ReleaseKernelInfo(_Frees_ptr_opt_ OrtKernelInfo* info_copy);
+ using Strings = std::vector<std::string>;
+ Strings GetAttrStrings(const char* attr_name);
private:
- const OrtApi& api_;
+ const OrtOpAttr* GetAttrHdl(const char* attr_name) const;
+ const OrtApi* ort_api_;
+ OrtShapeInferContext* ctx_;
+ std::vector<Shape> input_shapes_;
};
-template <typename TOp, typename TKernel>
+using ShapeInferFn = Ort::Status (*)(Ort::ShapeInferContext&);
+
+#define MAX_CUSTOM_OP_END_VER (1UL << 31) - 1
+
+template <typename TOp, typename TKernel, bool WithStatus = false>
struct CustomOpBase : OrtCustomOp {
CustomOpBase() {
OrtCustomOp::version = ORT_API_VERSION;
- OrtCustomOp::CreateKernel = (const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info) { return static_cast<const TOp*>(this_)->CreateKernel(*api, info); };
OrtCustomOp::GetName = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetName(); };
OrtCustomOp::GetExecutionProviderType = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetExecutionProviderType(); };
OrtCustomOp::GetOutputTypeCount = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetOutputTypeCount(); };
OrtCustomOp::GetOutputType = (const OrtCustomOp* this_, size_t index) { return static_cast<const TOp*>(this_)->GetOutputType(index); };
- OrtCustomOp::KernelCompute = (void* op_kernel, OrtKernelContext* context) { static_cast<TKernel*>(op_kernel)->Compute(context); };
#if defined(_MSC_VER) && !defined(__clang__)
#pragma warning(push)
#pragma warning(disable : 26409)
OrtCustomOp::GetVariadicInputHomogeneity = (const OrtCustomOp* this_) { return static_cast<int>(static_cast<const TOp*>(this_)->GetVariadicInputHomogeneity()); };
OrtCustomOp::GetVariadicOutputMinArity = (const OrtCustomOp* this_) { return static_cast<const TOp*>(this_)->GetVariadicOutputMinArity(); };
OrtCustomOp::GetVariadicOutputHomogeneity = (const OrtCustomOp* this_) { return static_cast<int>(static_cast<const TOp*>(this_)->GetVariadicOutputHomogeneity()); };
+#ifdef __cpp_if_constexpr
+ if constexpr (WithStatus) {
+#else
+ if (WithStatus) {
+#endif
+ OrtCustomOp::CreateKernelV2 = (const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info, void** op_kernel) -> OrtStatusPtr {
+ return static_cast<const TOp*>(this_)->CreateKernelV2(*api, info, op_kernel);
+ };
+ OrtCustomOp::KernelComputeV2 = (void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr {
+ return static_cast<TKernel*>(op_kernel)->ComputeV2(context);
+ };
+ } else {
+ OrtCustomOp::CreateKernelV2 = nullptr;
+ OrtCustomOp::KernelComputeV2 = nullptr;
+
+ OrtCustomOp::CreateKernel = (const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info) { return static_cast<const TOp*>(this_)->CreateKernel(*api, info); };
+ OrtCustomOp::KernelCompute = (void* op_kernel, OrtKernelContext* context) {
+ static_cast<TKernel*>(op_kernel)->Compute(context);
+ };
+ }
+
+ SetShapeInferFn<TOp>(0);
+
+ OrtCustomOp::GetStartVersion = (const OrtCustomOp* this_) {
+ return static_cast<const TOp*>(this_)->start_ver_;
+ };
+
+ OrtCustomOp::GetEndVersion = (const OrtCustomOp* this_) {
+ return static_cast<const TOp*>(this_)->end_ver_;
+ };
}
// Default implementation of GetExecutionProviderType that returns nullptr to default to the CPU provider
return std::vector<std::string>{};
}
+ template <typename C>
+ decltype(&C::InferOutputShape) SetShapeInferFn(decltype(&C::InferOutputShape)) {
+ OrtCustomOp::InferOutputShapeFn = (const OrtCustomOp*, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr {
+ ShapeInferContext ctx(&GetApi(), ort_ctx);
+ return C::InferOutputShape(ctx);
+ };
+ return {};
+ }
+
+ template <typename C>
+ void SetShapeInferFn(...) {
+ OrtCustomOp::InferOutputShapeFn = {};
+ }
+
protected:
// Helper function that returns a map of session config entries specified by CustomOpBase::GetSessionConfigKeys.
void GetSessionConfigs(std::unordered_map<std::string, std::string>& out, ConstSessionOptions options) const;
+
+ int start_ver_ = 1;
+ int end_ver_ = MAX_CUSTOM_OP_END_VER;
};
} // namespace Ort
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_cxx_inline.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_cxx_inline.h
Changed
// These are the inline implementations of the C++ header APIs. They're in this separate file as to not clutter
// the main C++ file with implementation details.
+#include <cstring>
+#include <functional>
+
+#define RETURN_ON_API_FAIL(expression) \
+ { \
+ auto err = (expression); \
+ if (err) { \
+ return Status(err); \
+ } \
+ }
+
namespace Ort {
namespace detail {
static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL;
};
+template <>
+struct TypeToTensorType<Float8E4M3FN_t> {
+ static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN;
+};
+template <>
+struct TypeToTensorType<Float8E4M3FNUZ_t> {
+ static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ;
+};
+template <>
+struct TypeToTensorType<Float8E5M2_t> {
+ static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2;
+};
+template <>
+struct TypeToTensorType<Float8E5M2FNUZ_t> {
+ static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ;
+};
+
+inline bool BFloat16_t::operator==(const BFloat16_t& rhs) const noexcept {
+ if (IsNaN() || rhs.IsNaN()) {
+ // IEEE defines that NaN is not equal to anything, including itself.
+ return false;
+ }
+ return val == rhs.val;
+}
+
+inline bool BFloat16_t::operator<(const BFloat16_t& rhs) const noexcept {
+ if (IsNaN() || rhs.IsNaN()) {
+ // IEEE defines that NaN is unordered with respect to everything, including itself.
+ return false;
+ }
+
+ const bool left_is_negative = IsNegative();
+ if (left_is_negative != rhs.IsNegative()) {
+ // When the signs of left and right differ, we know that left is less than right if it is
+ // the negative value. The exception to this is if both values are zero, in which case IEEE
+ // says they should be equal, even if the signs differ.
+ return left_is_negative && !AreZero(*this, rhs);
+ }
+ return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative);
+}
+
inline MemoryAllocation::MemoryAllocation(OrtAllocator* allocator, void* p, size_t size)
: allocator_(allocator), p_(p), size_(size) {
}
return *this;
}
+inline Env& Env::CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map<std::string, std::string>& options, const OrtArenaCfg* arena_cfg) {
+ std::vector<const char*> keys, values;
+ auto num_entries = options.size();
+ if (num_entries > 0) {
+ keys.reserve(num_entries);
+ values.reserve(num_entries);
+ for (const auto& entry : options) {
+ keys.push_back(entry.first.c_str());
+ values.push_back(entry.second.c_str());
+ }
+ }
+ ThrowOnError(GetApi().CreateAndRegisterAllocatorV2(p_, provider_type.c_str(), mem_info, arena_cfg, keys.data(), values.data(), num_entries));
+ return *this;
+}
+
inline CustomOpDomain::CustomOpDomain(const char* domain) {
ThrowOnError(GetApi().CreateCustomOpDomain(domain, &p_));
}
}
template <typename T>
+inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::SetDeterministicCompute(bool value) {
+ ThrowOnError(GetApi().SetDeterministicCompute(this->p_, value));
+ return *this;
+}
+
+template <typename T>
inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_filepath) {
ThrowOnError(GetApi().SetOptimizedModelFilePath(this->p_, optimized_model_filepath));
return *this;
}
template <typename T>
+inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::AppendExecutionProvider_OpenVINO_V2(const std::unordered_map<std::string, std::string>& provider_options) {
+ auto num_entries = provider_options.size();
+ std::vector<const char*> keys, values;
+ if (num_entries > 0) {
+ keys.reserve(num_entries);
+ values.reserve(num_entries);
+
+ for (const auto& entry : provider_options) {
+ keys.push_back(entry.first.c_str());
+ values.push_back(entry.second.c_str());
+ }
+ }
+
+ ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_OpenVINO_V2(this->p_,
+ keys.data(), values.data(), num_entries));
+
+ return *this;
+}
+
+template <typename T>
inline SessionOptionsImpl<T>& SessionOptionsImpl<T>::RegisterCustomOpsLibrary(const ORTCHAR_T* library_name,
const CustomOpConfigs& custom_op_configs) {
// Add custom op config entries before registering the custom op library. Otherwise, the config entries _may_ be ignored by
}
template <typename T>
+inline void SessionImpl<T>::RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count,
+ const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data) {
+ auto ort_input_values = reinterpret_cast<const OrtValue* const*>(input_values);
+ auto ort_output_values = reinterpret_cast<OrtValue**>(output_values);
+ ThrowOnError(GetApi().RunAsync(this->p_, run_options, input_names,
+ ort_input_values, input_count, output_names, output_count,
+ ort_output_values, callback, user_data));
+}
+
+template <typename T>
inline AllocatedStringPtr SessionImpl<T>::EndProfilingAllocated(OrtAllocator* allocator) {
char* out = nullptr;
ThrowOnError(GetApi().SessionEndProfiling(this->p_, allocator, &out));
}
#endif // !defined(DISABLE_SPARSE_TENSORS)
-inline Value Value::CreateMap(Value& keys, Value& values) {
+inline Value Value::CreateMap(const Value& keys, const Value& values) {
OrtValue* out;
- OrtValue* inputs2 = {keys, values};
+ const OrtValue* inputs2 = {keys, values};
ThrowOnError(GetApi().CreateValue(inputs, 2, ONNX_TYPE_MAP, &out));
return Value{out};
}
-inline Value Value::CreateSequence(std::vector<Value>& values) {
+inline Value Value::CreateSequence(const std::vector<Value>& values) {
OrtValue* out;
- std::vector<OrtValue*> values_ort{values.data(), values.data() + values.size()};
+ std::vector<const OrtValue*> values_ort{values.data(), values.data() + values.size()};
ThrowOnError(GetApi().CreateValue(values_ort.data(), values_ort.size(), ONNX_TYPE_SEQUENCE, &out));
return Value{out};
}
return Logger{out};
}
+inline void KernelContext::ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const {
+ ThrowOnError(GetApi().KernelContext_ParallelFor(ctx_, fn, total, num_batch, usr_data));
+}
+
inline OpAttr::OpAttr(const char* name, const void* data, int len, OrtOpAttrType type) {
Ort::ThrowOnError(GetApi().CreateOpAttr(name, data, len, type, &p_));
}
output_values, static_cast<int>(output_count)));
}
-inline void CustomOpApi::ThrowOnError(OrtStatus* status) {
- Ort::ThrowOnError(status);
-}
-
-template <>
-inline float CustomOpApi::KernelInfoGetAttribute<float>(_In_ const OrtKernelInfo* info, _In_ const char* name) {
- float out;
- Ort::ThrowOnError(api_.KernelInfoGetAttribute_float(info, name, &out));
- return out;
-}
-
-template <>
-inline int64_t CustomOpApi::KernelInfoGetAttribute<int64_t>(_In_ const OrtKernelInfo* info, _In_ const char* name) {
- int64_t out;
- Ort::ThrowOnError(api_.KernelInfoGetAttribute_int64(info, name, &out));
- return out;
-}
-
-template <>
-inline std::string CustomOpApi::KernelInfoGetAttribute<std::string>(_In_ const OrtKernelInfo* info, _In_ const char* name) {
- size_t size = 0;
- std::string out;
-
- // Feed nullptr for the data buffer to query the true size of the string attribute
- OrtStatus* status = api_.KernelInfoGetAttribute_string(info, name, nullptr, &size);
-
- if (status == nullptr) {
- out.resize(size);
- Ort::ThrowOnError(api_.KernelInfoGetAttribute_string(info, name, &out0, &size));
- out.resize(size - 1); // remove the terminating character '\0'
- } else {
- Ort::ThrowOnError(status);
- }
- return out;
-}
-
-template <>
-inline std::vector<float> CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) {
- size_t size = 0;
- std::vector<float> out;
-
- // Feed nullptr for the data buffer to query the true size of the attribute
- OrtStatus* status = api_.KernelInfoGetAttributeArray_float(info, name, nullptr, &size);
-
- if (status == nullptr) {
- out.resize(size);
- Ort::ThrowOnError(api_.KernelInfoGetAttributeArray_float(info, name, out.data(), &size));
- } else {
- Ort::ThrowOnError(status);
- }
- return out;
-}
-
-template <>
-inline std::vector<int64_t> CustomOpApi::KernelInfoGetAttribute(_In_ const OrtKernelInfo* info, _In_ const char* name) {
- size_t size = 0;
- std::vector<int64_t> out;
-
- // Feed nullptr for the data buffer to query the true size of the attribute
- OrtStatus* status = api_.KernelInfoGetAttributeArray_int64(info, name, nullptr, &size);
-
- if (status == nullptr) {
- out.resize(size);
- Ort::ThrowOnError(api_.KernelInfoGetAttributeArray_int64(info, name, out.data(), &size));
- } else {
- Ort::ThrowOnError(status);
- }
- return out;
-}
-inline OrtTensorTypeAndShapeInfo* CustomOpApi::GetTensorTypeAndShape(_In_ const OrtValue* value) {
- OrtTensorTypeAndShapeInfo* out;
- Ort::ThrowOnError(api_.GetTensorTypeAndShape(value, &out));
- return out;
-}
-
-inline size_t CustomOpApi::GetTensorShapeElementCount(_In_ const OrtTensorTypeAndShapeInfo* info) {
- size_t out;
- Ort::ThrowOnError(api_.GetTensorShapeElementCount(info, &out));
- return out;
-}
-
-inline ONNXTensorElementDataType CustomOpApi::GetTensorElementType(const OrtTensorTypeAndShapeInfo* info) {
- ONNXTensorElementDataType out;
- Ort::ThrowOnError(api_.GetTensorElementType(info, &out));
- return out;
-}
-
-inline size_t CustomOpApi::GetDimensionsCount(_In_ const OrtTensorTypeAndShapeInfo* info) {
- size_t out;
- Ort::ThrowOnError(api_.GetDimensionsCount(info, &out));
- return out;
-}
-
-inline void CustomOpApi::GetDimensions(_In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, size_t dim_values_length) {
- Ort::ThrowOnError(api_.GetDimensions(info, dim_values, dim_values_length));
-}
-
-inline void CustomOpApi::SetDimensions(OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count) {
- Ort::ThrowOnError(api_.SetDimensions(info, dim_values, dim_count));
-}
-
-template <typename T>
-inline T* CustomOpApi::GetTensorMutableData(_Inout_ OrtValue* value) {
- T* data;
- Ort::ThrowOnError(api_.GetTensorMutableData(value, reinterpret_cast<void**>(&data)));
- return data;
-}
-
-inline const OrtMemoryInfo* CustomOpApi::GetTensorMemoryInfo(_In_ const OrtValue* value) {
- const OrtMemoryInfo* mem_info;
- Ort::ThrowOnError(api_.GetTensorMemoryInfo(value, &mem_info));
- return mem_info;
-}
-
-template <typename T>
-inline const T* CustomOpApi::GetTensorData(_Inout_ const OrtValue* value) {
- T* data = nullptr;
- Ort::ThrowOnError(api_.GetTensorMutableData(const_cast<OrtValue*>(value), reinterpret_cast<void**>(&data)));
- return data;
-}
-
-inline std::vector<int64_t> CustomOpApi::GetTensorShape(const OrtTensorTypeAndShapeInfo* info) {
- size_t out;
- Ort::ThrowOnError(api_.GetDimensionsCount(info, &out));
- std::vector<int64_t> output(out);
- Ort::ThrowOnError(api_.GetDimensions(info, output.data(), out));
- return output;
-}
-
-inline void CustomOpApi::ReleaseTensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* input) {
- api_.ReleaseTensorTypeAndShapeInfo(input);
-}
-
-inline size_t CustomOpApi::KernelContext_GetInputCount(const OrtKernelContext* context) {
- size_t out;
- Ort::ThrowOnError(api_.KernelContext_GetInputCount(context, &out));
- return out;
-}
-
-inline const OrtValue* CustomOpApi::KernelContext_GetInput(const OrtKernelContext* context, _In_ size_t index) {
- const OrtValue* out;
- Ort::ThrowOnError(api_.KernelContext_GetInput(context, index, &out));
- return out;
-}
-
-inline size_t CustomOpApi::KernelContext_GetOutputCount(const OrtKernelContext* context) {
- size_t out;
- Ort::ThrowOnError(api_.KernelContext_GetOutputCount(context, &out));
- return out;
-}
-
-inline OrtValue* CustomOpApi::KernelContext_GetOutput(OrtKernelContext* context, _In_ size_t index,
- _In_ const int64_t* dim_values, size_t dim_count) {
- OrtValue* out;
- Ort::ThrowOnError(api_.KernelContext_GetOutput(context, index, dim_values, dim_count, &out));
- return out;
-}
-
-inline void* CustomOpApi::KernelContext_GetGPUComputeStream(const OrtKernelContext* context) {
- void* out;
- Ort::ThrowOnError(api_.KernelContext_GetGPUComputeStream(context, &out));
- return out;
-}
-
-inline OrtOpAttr* CustomOpApi::CreateOpAttr(_In_ const char* name,
- _In_ const void* data,
- _In_ int len,
- _In_ OrtOpAttrType type) {
- OrtOpAttr* op_attr{};
- Ort::ThrowOnError(api_.CreateOpAttr(name, data, len, type, &op_attr));
- return op_attr;
-}
-
-inline void CustomOpApi::ReleaseOpAttr(_Frees_ptr_opt_ OrtOpAttr* op_attr) {
- api_.ReleaseOpAttr(op_attr);
-}
-
-inline OrtOp* CustomOpApi::CreateOp(_In_ const OrtKernelInfo* info,
- _In_z_ const char* op_name,
- _In_z_ const char* domain,
- int version,
- _In_reads_(type_constraint_count) const char** type_constraint_names,
- _In_reads_(type_constraint_count) const ONNXTensorElementDataType* type_constraint_values,
- int type_constraint_count,
- _In_reads_(attr_count) const OrtOpAttr* const* attr_values,
- int attr_count,
- int input_count,
- int output_count) {
- OrtOp* ort_op{};
- Ort::ThrowOnError(api_.CreateOp(info, op_name, domain, version, type_constraint_names, type_constraint_values,
- type_constraint_count, attr_values, attr_count, input_count, output_count, &ort_op));
- return ort_op;
-}
-
-inline void CustomOpApi::InvokeOp(_In_ const OrtKernelContext* context,
- _In_ const OrtOp* ort_op,
- _In_ const OrtValue* const* input_values,
- _In_ int input_count,
- _Inout_ OrtValue* const* output_values,
- _In_ int output_count) {
- Ort::ThrowOnError(api_.InvokeOp(context, ort_op, input_values, input_count, output_values, output_count));
-}
-
-inline void CustomOpApi::ReleaseOp(_Frees_ptr_opt_ OrtOp* ort_op) {
- api_.ReleaseOp(ort_op);
-}
-
-inline OrtKernelInfo* CustomOpApi::CopyKernelInfo(_In_ const OrtKernelInfo* info) {
- OrtKernelInfo* info_copy{};
- Ort::ThrowOnError(api_.CopyKernelInfo(info, &info_copy));
- return info_copy;
-}
-
-inline void CustomOpApi::ReleaseKernelInfo(_Frees_ptr_opt_ OrtKernelInfo* info_copy) {
- api_.ReleaseKernelInfo(info_copy);
-}
-
inline std::string GetVersionString() {
return OrtGetApiBase()->GetVersionString();
}
return available_providers;
}
-template <typename TOp, typename TKernel>
-void CustomOpBase<TOp, TKernel>::GetSessionConfigs(std::unordered_map<std::string, std::string>& out,
- ConstSessionOptions options) const {
+template <typename TOp, typename TKernel, bool WithStatus>
+void CustomOpBase<TOp, TKernel, WithStatus>::GetSessionConfigs(std::unordered_map<std::string, std::string>& out,
+ ConstSessionOptions options) const {
const TOp* derived = static_cast<const TOp*>(this);
std::vector<std::string> keys = derived->GetSessionConfigKeys();
}
}
+inline ShapeInferContext::ShapeInferContext(const OrtApi* ort_api,
+ OrtShapeInferContext* ctx) : ort_api_(ort_api), ctx_(ctx) {
+ size_t input_count = 0;
+ Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputCount(ctx_, &input_count));
+ for (size_t ith_input = 0; ith_input < input_count; ++ith_input) {
+ OrtTensorTypeAndShapeInfo* info{};
+ Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputTypeShape(ctx, ith_input, &info));
+ TensorTypeAndShapeInfo type_shape_info(info);
+ auto integer_shape = type_shape_info.GetShape();
+ std::vector<const char*> symbolic_shape(integer_shape.size(), {});
+ type_shape_info.GetSymbolicDimensions(&symbolic_shape0, integer_shape.size());
+ Shape shape;
+ for (size_t ith = 0; ith < integer_shape.size(); ++ith) {
+ if (symbolic_shapeith && std::string{symbolic_shapeith}.size() > 0) {
+ shape.emplace_back(symbolic_shapeith);
+ } else {
+ shape.emplace_back(integer_shapeith);
+ }
+ }
+ input_shapes_.push_back(std::move(shape));
+ type_shape_info.release();
+ }
+}
+
+inline Status ShapeInferContext::SetOutputShape(size_t indice, const Shape& shape) {
+ OrtTensorTypeAndShapeInfo* info = {};
+ RETURN_ON_API_FAIL(ort_api_->CreateTensorTypeAndShapeInfo(&info));
+
+ using InfoPtr = std::unique_ptr<OrtTensorTypeAndShapeInfo, std::function<void(OrtTensorTypeAndShapeInfo*)>>;
+
+ InfoPtr info_ptr(info, this(OrtTensorTypeAndShapeInfo* obj) {
+ ort_api_->ReleaseTensorTypeAndShapeInfo(obj);
+ });
+
+ std::vector<int64_t> integer_dims;
+ std::vector<const char*> symbolic_dims;
+
+ for (const auto dim : shape) {
+ if (dim.IsInt()) {
+ integer_dims.push_back(dim.IsInt());
+ symbolic_dims.push_back("");
+ } else {
+ if (!dim.AsSym() || std::string{dim.AsSym()}.empty()) {
+ ORT_CXX_API_THROW("Symbolic dim must not be an empty string", ORT_INVALID_ARGUMENT);
+ }
+ integer_dims.push_back(SymbolicInteger::INVALID_INT_DIM);
+ symbolic_dims.push_back(dim.AsSym());
+ }
+ }
+
+ RETURN_ON_API_FAIL(ort_api_->SetDimensions(info, integer_dims.data(), integer_dims.size()));
+ RETURN_ON_API_FAIL(ort_api_->SetSymbolicDimensions(info, symbolic_dims.data(), symbolic_dims.size()));
+ RETURN_ON_API_FAIL(ort_api_->ShapeInferContext_SetOutputTypeShape(ctx_, indice, info));
+ return Status{nullptr};
+}
+
+inline int64_t ShapeInferContext::GetAttrInt(const char* attr_name) {
+ const auto* attr = GetAttrHdl(attr_name);
+ int64_t i = {};
+ size_t out = {};
+ Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INT, &i, sizeof(i), &out));
+ return i;
+}
+
+inline ShapeInferContext::Ints ShapeInferContext::GetAttrInts(const char* attr_name) {
+ const auto* attr = GetAttrHdl(attr_name);
+ int64_t i = {};
+ size_t out = {};
+ // first call to get the bytes needed
+ auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, &i, sizeof(i), &out);
+ if (status) {
+ size_t num_i = out / sizeof(int64_t);
+ ShapeInferContext::Ints ints(num_i, 0);
+ Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, ints.data(), out, &out));
+ return ints;
+ } else {
+ return {i};
+ }
+}
+
+inline float ShapeInferContext::GetAttrFloat(const char* attr_name) {
+ const auto* attr = GetAttrHdl(attr_name);
+ float f = {};
+ size_t out = {};
+ Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOAT, &f, sizeof(f), &out));
+ return f;
+}
+
+inline ShapeInferContext::Floats ShapeInferContext::GetAttrFloats(const char* attr_name) {
+ const auto* attr = GetAttrHdl(attr_name);
+ float f = {};
+ size_t out = {};
+ // first call to get the bytes needed
+ auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, &f, sizeof(f), &out);
+ if (status) {
+ size_t num_f = out / sizeof(float);
+ ShapeInferContext::Floats floats(num_f, 0);
+ Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, floats.data(), out, &out));
+ return floats;
+ } else {
+ return {f};
+ }
+}
+
+inline std::string ShapeInferContext::GetAttrString(const char* attr_name) {
+ const auto* attr = GetAttrHdl(attr_name);
+ char c = {};
+ size_t out = {};
+ // first call to get the bytes needed
+ auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, &c, sizeof(char), &out);
+ if (status) {
+ std::vector<char> chars(out, '\0');
+ Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, chars.data(), out, &out));
+ return {chars.data()};
+ } else {
+ return {c};
+ }
+}
+
+inline ShapeInferContext::Strings ShapeInferContext::GetAttrStrings(const char* attr_name) {
+ const auto* attr = GetAttrHdl(attr_name);
+ char c = {};
+ size_t out = {};
+ // first call to get the bytes needed
+ auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, &c, sizeof(char), &out);
+ if (status) {
+ std::vector<char> chars(out, '\0');
+ Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, chars.data(), out, &out));
+ ShapeInferContext::Strings strings;
+ char* char_st = chars.data();
+ char* char_ed = char_st + out;
+ while (char_st < char_ed) {
+ strings.emplace_back(char_st);
+ while (*char_st != '\0') {
+ char_st++;
+ }
+ char_st++;
+ }
+ return strings;
+ } else {
+ return {std::string{c}};
+ }
+}
+
+inline const OrtOpAttr* ShapeInferContext::GetAttrHdl(const char* attr_name) const {
+ const OrtOpAttr* attr_hdl = {};
+ Ort::ThrowOnError(ort_api_->ShapeInferContext_GetAttribute(ctx_, attr_name, &attr_hdl));
+ return attr_hdl;
+}
+
} // namespace Ort
onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_float16.h
Added
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#pragma once
+
+#include <stdint.h>
+#include <cmath>
+#include <cstring>
+#include <limits>
+
+namespace onnxruntime_float16 {
+
+namespace detail {
+
+enum class endian {
+#if defined(_WIN32)
+ little = 0,
+ big = 1,
+ native = little,
+#elif defined(__GNUC__) || defined(__clang__)
+ little = __ORDER_LITTLE_ENDIAN__,
+ big = __ORDER_BIG_ENDIAN__,
+ native = __BYTE_ORDER__,
+#else
+#error onnxruntime_float16::detail::endian is not implemented in this environment.
+#endif
+};
+
+static_assert(
+ endian::native == endian::little || endian::native == endian::big,
+ "Only little-endian or big-endian native byte orders are supported.");
+
+} // namespace detail
+
+/// <summary>
+/// Shared implementation between public and internal classes. CRTP pattern.
+/// </summary>
+template <class Derived>
+struct Float16Impl {
+ protected:
+ /// <summary>
+ /// Converts from float to uint16_t float16 representation
+ /// </summary>
+ /// <param name="v"></param>
+ /// <returns></returns>
+ constexpr static uint16_t ToUint16Impl(float v) noexcept;
+
+ /// <summary>
+ /// Converts float16 to float
+ /// </summary>
+ /// <returns>float representation of float16 value</returns>
+ float ToFloatImpl() const noexcept;
+
+ /// <summary>
+ /// Creates an instance that represents absolute value.
+ /// </summary>
+ /// <returns>Absolute value</returns>
+ uint16_t AbsImpl() const noexcept {
+ return static_cast<uint16_t>(val & ~kSignMask);
+ }
+
+ /// <summary>
+ /// Creates a new instance with the sign flipped.
+ /// </summary>
+ /// <returns>Flipped sign instance</returns>
+ uint16_t NegateImpl() const noexcept {
+ return IsNaN() ? val : static_cast<uint16_t>(val ^ kSignMask);
+ }
+
+ public:
+ // uint16_t special values
+ static constexpr uint16_t kSignMask = 0x8000U;
+ static constexpr uint16_t kBiasedExponentMask = 0x7C00U;
+ static constexpr uint16_t kPositiveInfinityBits = 0x7C00U;
+ static constexpr uint16_t kNegativeInfinityBits = 0xFC00U;
+ static constexpr uint16_t kPositiveQNaNBits = 0x7E00U;
+ static constexpr uint16_t kNegativeQNaNBits = 0xFE00U;
+ static constexpr uint16_t kEpsilonBits = 0x4170U;
+ static constexpr uint16_t kMinValueBits = 0xFBFFU; // Minimum normal number
+ static constexpr uint16_t kMaxValueBits = 0x7BFFU; // Largest normal number
+ static constexpr uint16_t kOneBits = 0x3C00U;
+ static constexpr uint16_t kMinusOneBits = 0xBC00U;
+
+ uint16_t val{0};
+
+ Float16Impl() = default;
+
+ /// <summary>
+ /// Checks if the value is negative
+ /// </summary>
+ /// <returns>true if negative</returns>
+ bool IsNegative() const noexcept {
+ return static_cast<int16_t>(val) < 0;
+ }
+
+ /// <summary>
+ /// Tests if the value is NaN
+ /// </summary>
+ /// <returns>true if NaN</returns>
+ bool IsNaN() const noexcept {
+ return AbsImpl() > kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value is finite
+ /// </summary>
+ /// <returns>true if finite</returns>
+ bool IsFinite() const noexcept {
+ return AbsImpl() < kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value represents positive infinity.
+ /// </summary>
+ /// <returns>true if positive infinity</returns>
+ bool IsPositiveInfinity() const noexcept {
+ return val == kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value represents negative infinity
+ /// </summary>
+ /// <returns>true if negative infinity</returns>
+ bool IsNegativeInfinity() const noexcept {
+ return val == kNegativeInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value is either positive or negative infinity.
+ /// </summary>
+ /// <returns>True if absolute value is infinity</returns>
+ bool IsInfinity() const noexcept {
+ return AbsImpl() == kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value is NaN or zero. Useful for comparisons.
+ /// </summary>
+ /// <returns>True if NaN or zero.</returns>
+ bool IsNaNOrZero() const noexcept {
+ auto abs = AbsImpl();
+ return (abs == 0 || abs > kPositiveInfinityBits);
+ }
+
+ /// <summary>
+ /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
+ /// </summary>
+ /// <returns>True if so</returns>
+ bool IsNormal() const noexcept {
+ auto abs = AbsImpl();
+ return (abs < kPositiveInfinityBits) // is finite
+ && (abs != 0) // is not zero
+ && ((abs & kBiasedExponentMask) != 0); // is not subnormal (has a non-zero exponent)
+ }
+
+ /// <summary>
+ /// Tests if the value is subnormal (denormal).
+ /// </summary>
+ /// <returns>True if so</returns>
+ bool IsSubnormal() const noexcept {
+ auto abs = AbsImpl();
+ return (abs < kPositiveInfinityBits) // is finite
+ && (abs != 0) // is not zero
+ && ((abs & kBiasedExponentMask) == 0); // is subnormal (has a zero exponent)
+ }
+
+ /// <summary>
+ /// Creates an instance that represents absolute value.
+ /// </summary>
+ /// <returns>Absolute value</returns>
+ Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); }
+
+ /// <summary>
+ /// Creates a new instance with the sign flipped.
+ /// </summary>
+ /// <returns>Flipped sign instance</returns>
+ Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); }
+
+ /// <summary>
+ /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
+ /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
+ /// and therefore equivalent, if the resulting value is still zero.
+ /// </summary>
+ /// <param name="lhs">first value</param>
+ /// <param name="rhs">second value</param>
+ /// <returns>True if both arguments represent zero</returns>
+ static bool AreZero(const Float16Impl& lhs, const Float16Impl& rhs) noexcept {
+ return static_cast<uint16_t>((lhs.val | rhs.val) & ~kSignMask) == 0;
+ }
+
+ bool operator==(const Float16Impl& rhs) const noexcept {
+ if (IsNaN() || rhs.IsNaN()) {
+ // IEEE defines that NaN is not equal to anything, including itself.
+ return false;
+ }
+ return val == rhs.val;
+ }
+
+ bool operator!=(const Float16Impl& rhs) const noexcept { return !(*this == rhs); }
+
+ bool operator<(const Float16Impl& rhs) const noexcept {
+ if (IsNaN() || rhs.IsNaN()) {
+ // IEEE defines that NaN is unordered with respect to everything, including itself.
+ return false;
+ }
+
+ const bool left_is_negative = IsNegative();
+ if (left_is_negative != rhs.IsNegative()) {
+ // When the signs of left and right differ, we know that left is less than right if it is
+ // the negative value. The exception to this is if both values are zero, in which case IEEE
+ // says they should be equal, even if the signs differ.
+ return left_is_negative && !AreZero(*this, rhs);
+ }
+ return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative);
+ }
+};
+
+// The following Float16_t conversions are based on the code from
+// Eigen library.
+
+// The conversion routines are Copyright (c) Fabian Giesen, 2016.
+// The original license follows:
+//
+// Copyright (c) Fabian Giesen, 2016
+// All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted.
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+namespace detail {
+union float32_bits {
+ unsigned int u;
+ float f;
+};
+} // namespace detail
+
+template <class Derived>
+inline constexpr uint16_t Float16Impl<Derived>::ToUint16Impl(float v) noexcept {
+ detail::float32_bits f{};
+ f.f = v;
+
+ constexpr detail::float32_bits f32infty = {255 << 23};
+ constexpr detail::float32_bits f16max = {(127 + 16) << 23};
+ constexpr detail::float32_bits denorm_magic = {((127 - 15) + (23 - 10) + 1) << 23};
+ constexpr unsigned int sign_mask = 0x80000000u;
+ uint16_t val = static_cast<uint16_t>(0x0u);
+
+ unsigned int sign = f.u & sign_mask;
+ f.u ^= sign;
+
+ // NOTE all the integer compares in this function can be safely
+ // compiled into signed compares since all operands are below
+ // 0x80000000. Important if you want fast straight SSE2 code
+ // (since there's no unsigned PCMPGTD).
+
+ if (f.u >= f16max.u) { // result is Inf or NaN (all exponent bits set)
+ val = (f.u > f32infty.u) ? 0x7e00 : 0x7c00; // NaN->qNaN and Inf->Inf
+ } else { // (De)normalized number or zero
+ if (f.u < (113 << 23)) { // resulting FP16 is subnormal or zero
+ // use a magic value to align our 10 mantissa bits at the bottom of
+ // the float. as long as FP addition is round-to-nearest-even this
+ // just works.
+ f.f += denorm_magic.f;
+
+ // and one integer subtract of the bias later, we have our final float!
+ val = static_cast<uint16_t>(f.u - denorm_magic.u);
+ } else {
+ unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd
+
+ // update exponent, rounding bias part 1
+ // Equivalent to `f.u += ((unsigned int)(15 - 127) << 23) + 0xfff`, but
+ // without arithmetic overflow.
+ f.u += 0xc8000fffU;
+ // rounding bias part 2
+ f.u += mant_odd;
+ // take the bits!
+ val = static_cast<uint16_t>(f.u >> 13);
+ }
+ }
+
+ val |= static_cast<uint16_t>(sign >> 16);
+ return val;
+}
+
+template <class Derived>
+inline float Float16Impl<Derived>::ToFloatImpl() const noexcept {
+ constexpr detail::float32_bits magic = {113 << 23};
+ constexpr unsigned int shifted_exp = 0x7c00 << 13; // exponent mask after shift
+ detail::float32_bits o{};
+
+ o.u = (val & 0x7fff) << 13; // exponent/mantissa bits
+ unsigned int exp = shifted_exp & o.u; // just the exponent
+ o.u += (127 - 15) << 23; // exponent adjust
+
+ // handle exponent special cases
+ if (exp == shifted_exp) { // Inf/NaN?
+ o.u += (128 - 16) << 23; // extra exp adjust
+ } else if (exp == 0) { // Zero/Denormal?
+ o.u += 1 << 23; // extra exp adjust
+ o.f -= magic.f; // re-normalize
+ }
+
+ // Attempt to workaround the Internal Compiler Error on ARM64
+ // for bitwise | operator, including std::bitset
+#if (defined _MSC_VER) && (defined _M_ARM || defined _M_ARM64 || defined _M_ARM64EC)
+ if (IsNegative()) {
+ return -o.f;
+ }
+#else
+ // original code:
+ o.u |= (val & 0x8000U) << 16U; // sign bit
+#endif
+ return o.f;
+}
+
+/// Shared implementation between public and internal classes. CRTP pattern.
+template <class Derived>
+struct BFloat16Impl {
+ protected:
+ /// <summary>
+ /// Converts from float to uint16_t float16 representation
+ /// </summary>
+ /// <param name="v"></param>
+ /// <returns></returns>
+ static uint16_t ToUint16Impl(float v) noexcept;
+
+ /// <summary>
+ /// Converts bfloat16 to float
+ /// </summary>
+ /// <returns>float representation of bfloat16 value</returns>
+ float ToFloatImpl() const noexcept;
+
+ /// <summary>
+ /// Creates an instance that represents absolute value.
+ /// </summary>
+ /// <returns>Absolute value</returns>
+ uint16_t AbsImpl() const noexcept {
+ return static_cast<uint16_t>(val & ~kSignMask);
+ }
+
+ /// <summary>
+ /// Creates a new instance with the sign flipped.
+ /// </summary>
+ /// <returns>Flipped sign instance</returns>
+ uint16_t NegateImpl() const noexcept {
+ return IsNaN() ? val : static_cast<uint16_t>(val ^ kSignMask);
+ }
+
+ public:
+ // uint16_t special values
+ static constexpr uint16_t kSignMask = 0x8000U;
+ static constexpr uint16_t kBiasedExponentMask = 0x7F80U;
+ static constexpr uint16_t kPositiveInfinityBits = 0x7F80U;
+ static constexpr uint16_t kNegativeInfinityBits = 0xFF80U;
+ static constexpr uint16_t kPositiveQNaNBits = 0x7FC1U;
+ static constexpr uint16_t kNegativeQNaNBits = 0xFFC1U;
+ static constexpr uint16_t kSignaling_NaNBits = 0x7F80U;
+ static constexpr uint16_t kEpsilonBits = 0x0080U;
+ static constexpr uint16_t kMinValueBits = 0xFF7FU;
+ static constexpr uint16_t kMaxValueBits = 0x7F7FU;
+ static constexpr uint16_t kRoundToNearest = 0x7FFFU;
+ static constexpr uint16_t kOneBits = 0x3F80U;
+ static constexpr uint16_t kMinusOneBits = 0xBF80U;
+
+ uint16_t val{0};
+
+ BFloat16Impl() = default;
+
+ /// <summary>
+ /// Checks if the value is negative
+ /// </summary>
+ /// <returns>true if negative</returns>
+ bool IsNegative() const noexcept {
+ return static_cast<int16_t>(val) < 0;
+ }
+
+ /// <summary>
+ /// Tests if the value is NaN
+ /// </summary>
+ /// <returns>true if NaN</returns>
+ bool IsNaN() const noexcept {
+ return AbsImpl() > kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value is finite
+ /// </summary>
+ /// <returns>true if finite</returns>
+ bool IsFinite() const noexcept {
+ return AbsImpl() < kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value represents positive infinity.
+ /// </summary>
+ /// <returns>true if positive infinity</returns>
+ bool IsPositiveInfinity() const noexcept {
+ return val == kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value represents negative infinity
+ /// </summary>
+ /// <returns>true if negative infinity</returns>
+ bool IsNegativeInfinity() const noexcept {
+ return val == kNegativeInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value is either positive or negative infinity.
+ /// </summary>
+ /// <returns>True if absolute value is infinity</returns>
+ bool IsInfinity() const noexcept {
+ return AbsImpl() == kPositiveInfinityBits;
+ }
+
+ /// <summary>
+ /// Tests if the value is NaN or zero. Useful for comparisons.
+ /// </summary>
+ /// <returns>True if NaN or zero.</returns>
+ bool IsNaNOrZero() const noexcept {
+ auto abs = AbsImpl();
+ return (abs == 0 || abs > kPositiveInfinityBits);
+ }
+
+ /// <summary>
+ /// Tests if the value is normal (not zero, subnormal, infinite, or NaN).
+ /// </summary>
+ /// <returns>True if so</returns>
+ bool IsNormal() const noexcept {
+ auto abs = AbsImpl();
+ return (abs < kPositiveInfinityBits) // is finite
+ && (abs != 0) // is not zero
+ && ((abs & kBiasedExponentMask) != 0); // is not subnormal (has a non-zero exponent)
+ }
+
+ /// <summary>
+ /// Tests if the value is subnormal (denormal).
+ /// </summary>
+ /// <returns>True if so</returns>
+ bool IsSubnormal() const noexcept {
+ auto abs = AbsImpl();
+ return (abs < kPositiveInfinityBits) // is finite
+ && (abs != 0) // is not zero
+ && ((abs & kBiasedExponentMask) == 0); // is subnormal (has a zero exponent)
+ }
+
+ /// <summary>
+ /// Creates an instance that represents absolute value.
+ /// </summary>
+ /// <returns>Absolute value</returns>
+ Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); }
+
+ /// <summary>
+ /// Creates a new instance with the sign flipped.
+ /// </summary>
+ /// <returns>Flipped sign instance</returns>
+ Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); }
+
+ /// <summary>
+ /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check
+ /// for two values by or'ing the private bits together and stripping the sign. They are both zero,
+ /// and therefore equivalent, if the resulting value is still zero.
+ /// </summary>
+ /// <param name="lhs">first value</param>
+ /// <param name="rhs">second value</param>
+ /// <returns>True if both arguments represent zero</returns>
+ static bool AreZero(const BFloat16Impl& lhs, const BFloat16Impl& rhs) noexcept {
+ // IEEE defines that positive and negative zero are equal, this gives us a quick equality check
+ // for two values by or'ing the private bits together and stripping the sign. They are both zero,
+ // and therefore equivalent, if the resulting value is still zero.
+ return static_cast<uint16_t>((lhs.val | rhs.val) & ~kSignMask) == 0;
+ }
+};
+
+template <class Derived>
+inline uint16_t BFloat16Impl<Derived>::ToUint16Impl(float v) noexcept {
+ uint16_t result;
+ if (std::isnan(v)) {
+ result = kPositiveQNaNBits;
+ } else {
+ auto get_msb_half = (float fl) {
+ uint16_t result;
+#ifdef __cpp_if_constexpr
+ if constexpr (detail::endian::native == detail::endian::little) {
+#else
+ if (detail::endian::native == detail::endian::little) {
+#endif
+ std::memcpy(&result, reinterpret_cast<char*>(&fl) + sizeof(uint16_t), sizeof(uint16_t));
+ } else {
+ std::memcpy(&result, &fl, sizeof(uint16_t));
+ }
+ return result;
+ };
+
+ uint16_t upper_bits = get_msb_half(v);
+ union {
+ uint32_t U32;
+ float F32;
+ };
+ F32 = v;
+ U32 += (upper_bits & 1) + kRoundToNearest;
+ result = get_msb_half(F32);
+ }
+ return result;
+}
+
+template <class Derived>
+inline float BFloat16Impl<Derived>::ToFloatImpl() const noexcept {
+ if (IsNaN()) {
+ return std::numeric_limits<float>::quiet_NaN();
+ }
+ float result;
+ char* const first = reinterpret_cast<char*>(&result);
+ char* const second = first + sizeof(uint16_t);
+#ifdef __cpp_if_constexpr
+ if constexpr (detail::endian::native == detail::endian::little) {
+#else
+ if (detail::endian::native == detail::endian::little) {
+#endif
+ std::memset(first, 0, sizeof(uint16_t));
+ std::memcpy(second, &val, sizeof(uint16_t));
+ } else {
+ std::memcpy(first, &val, sizeof(uint16_t));
+ std::memset(second, 0, sizeof(uint16_t));
+ }
+ return result;
+}
+
+} // namespace onnxruntime_float16
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_session_options_config_keys.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_session_options_config_keys.h
Changed
// GeluApproximation has side effects which may change the inference results. It is disabled by default due to this.
static const char* const kOrtSessionOptionsEnableGeluApproximation = "optimization.enable_gelu_approximation";
+// This setting controls whether to enable AheadOfTime function inlining.
+// AOT function inlining examines the graph and attempts to inline as many locally defined functions in the model
+// as possible with the help of enabled execution providers.
+// This can reduce the number of function calls and improve performance because it is done before
+// Level1 optimizers and constant folding. However, under some circumstances, when the EPs are not available,
+// one can disable the AOT inlining, produce an optimized model and postpone AOT until run time.
+// "0": enable; "1": disable.
+// Its default value is "0".
+static const char* const kOrtSessionOptionsDisableAheadOfTimeFunctionInlining = "session.disable_aot_function_inlining";
+
#ifdef ENABLE_TRAINING
// Specifies a list of op types for memory footprint reduction.
// The value should be a ","-delimited list of pair of
-// <subgraph string : optimization strategy : number of subgraph to apply>.
+// <subgraph string: optimization strategy: number of subgraph to apply>.
// For example, "Gelu+Cast+:1:0,Dropout+:1:1".
// A valid "subgraph string" should be one subgraph representation output by ORT graph transformations.
// "optimization strategy" currently has valid values: 0 - disabled, 1 - recompute.
// "number of subgraph to apply" is used to control how many subgraphs to apply optimization, to avoid "oversaving"
// the memory.
-static const char* const kOrtSessionOptionsMemoryOptimizerEnabler = "optimization.enable_memory_optimizer";
+static const char* const kOrtSessionOptionsMemoryOptimizerEnabler = "optimization.memory_optimizer_config";
-// Specifies the level for detecting subgraphs for memory footprint reduction.
-// The value should be an integer. The default value is 0.
-static const char* const kOrtSessionOptionsMemoryOptimizerProbeLevel = "optimization.enable_memory_probe_recompute_level";
+// Specifies the config for detecting subgraphs for memory footprint reduction.
+// The value should be a string contains int separated using commas. The default value is "0:0".
+static const char* const kOrtSessionOptionsMemoryOptimizerProbeConfig = "optimization.enable_memory_probe_recompute_config";
#endif
// Enable or disable using device allocator for allocating initialized tensor memory. "1": enable; "0": disable. The default is "0".
// May be useful to expose bugs in models.
static const char* const kOrtSessionOptionsConfigStrictShapeTypeInference = "session.strict_shape_type_inference";
+// "1": every model using a more recent opset than the latest released one will fail
+// "0": the model may or may not work if onnxruntime cannot find an implementation, this option
+// is used for development purpose.
+static const char* const kOrtSessionOptionsConfigStrictAllowReleasedOpsetsOnly = "session.allow_released_opsets_only";
+
// The file saves configuration for partitioning node among logic streams
static const char* const kNodePartitionConfigFile = "session.node_partition_config_file";
// 3) after the L1 transformers are applied to the updated graph.
// The model will be saved to filename post_layout_transform_step_<step_number>.onnx.
static const char* const kDebugLayoutTransformation = "session.debug_layout_transformation";
+
+// Graph nodes that are not supported by the execution providers (EPs) explicitly added to the session are
+// assigned (i.e., "fallback") to the CPU EP by default.
+//
+// This option allows the user to disable the fallback of unsupported graph nodes to the CPU EP.
+// If this option is set to "1", session creation will fail if the execution providers other than the CPU EP cannot
+// fully support all of the nodes in the graph.
+//
+// It is invalid to set this option and explicitly add the CPU EP to the session. In this case, session creation
+// will also fail with an error.
+//
+// Option values:
+// - "0": CPU EP fallback is not disabled. DEFAULT
+// - "1": CPU EP fallback is disabled.
+static const char* const kOrtSessionOptionsDisableCPUEPFallback = "session.disable_cpu_ep_fallback";
+
+// Use this config when serializing a large model after optimization to specify an external initializers file
+static const char* const kOrtSessionOptionsOptimizedModelExternalInitializersFileName =
+ "session.optimized_model_external_initializers_file_name";
+
+// Use this config to control the minimum size of the initializer when externalizing it during serialization
+static const char* const kOrtSessionOptionsOptimizedModelExternalInitializersMinSizeInBytes =
+ "session.optimized_model_external_initializers_min_size_in_bytes";
+
+// Enable EP context feature to dump the partitioned graph which includes the EP context into Onnx file.
+// The dumped Onnx model with EP context can be used for future inference to avoid the EP graph partitioning/compile overhead.
+// "0": disable. (default)
+// "1": enable.
+static const char* const kOrtSessionOptionEpContextEnable = "ep.context_enable";
+
+// Specify the file path for the Onnx model which has EP context.
+// Default to original_file_name_ctx.onnx if not specified
+static const char* const kOrtSessionOptionEpContextFilePath = "ep.context_file_path";
+
+// Flag to specify whether to dump the EP context into the Onnx model.
+// "0": dump the EP context into separate file, keep the file name in the Onnx model.
+// "1": dump the EP context into the Onnx model. (default).
+static const char* const kOrtSessionOptionEpContextEmbedMode = "ep.context_embed_mode";
+
+// Gemm fastmath mode provides fp32 gemm acceleration with bfloat16 based matmul.
+// Option values:
+// - "0": Gemm FastMath mode is not enabled. DEFAULT
+// - "1": Gemm FastMath mode is enabled.
+static const char* const kOrtSessionOptionsMlasGemmFastMathArm64Bfloat16 = "mlas.enable_gemm_fastmath_arm64_bfloat16";
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_training_c_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_training_c_api.h
Changed
*
* In order to train a model with onnxruntime, the following training artifacts must be generated:
* - The training onnx model
- * - The checkpoint directory
+ * - The checkpoint file
* - The optimizer onnx model
* - The eval onnx model model (optional)
*
/// \name Accessing The Training Session State
/// @{
- /** \brief Load a checkpoint state from directory on disk into checkpoint_state.
+ /** \brief Load a checkpoint state from a file on disk into checkpoint_state.
*
- * This function will parse a checkpoint directory, pull relevant files and load the training
+ * This function will parse a checkpoint file, pull relevant data and load the training
* state into the checkpoint_state. This checkpoint state can then be used to create the
* training session by invoking OrtTrainingApi::CreateTrainingSession. By doing so, the training
* session will resume training from the given checkpoint state.
* training state (including model parameters, its gradients, the optimizer states and the properties).
* As a result, it is required that the checkpoint state outlive the lifetime of the training session.
*
- * \paramin checkpoint_path Path to the checkpoint directory
+ * \paramin checkpoint_path Path to the checkpoint file
* \paramout checkpoint_state Checkpoint state that contains the states of the training session.
*
* \snippet{doc} snippets.dox OrtStatus Return Value
ORT_API2_STATUS(LoadCheckpoint, _In_ const ORTCHAR_T* checkpoint_path,
_Outptr_ OrtCheckpointState** checkpoint_state);
- /** \brief Save the given state to a checkpoint directory on disk.
+ /** \brief Save the given state to a checkpoint file on disk.
*
- * This function serializes the provided checkpoint state to a directory on disk.
+ * This function serializes the provided checkpoint state to a file on disk.
* This checkpoint can later be loaded by invoking OrtTrainingApi::LoadCheckpoint to resume
* training from this snapshot of the state.
*
* \paramin checkpoint_state The checkpoint state to save.
- * \paramin checkpoint_path Path to the checkpoint directory.
+ * \paramin checkpoint_path Path to the checkpoint file.
* \paramin include_optimizer_state Flag to indicate whether to save the optimizer state or not.
*
* \snippet{doc} snippets.dox OrtStatus Return Value
* - The training onnx model
* - The evaluation onnx model (optional)
* - The optimizer onnx model
- * - The checkpoint directory
+ * - The checkpoint file
*
* These artifacts can be generated using the `onnxruntime-training` python utility(https://github.com/microsoft/onnxruntime/blob/main/orttraining/orttraining/python/training/onnxblock/README.md).
*
ORT_API2_STATUS(CreateTrainingSession, _In_ const OrtEnv* env, _In_ const OrtSessionOptions* options,
_Inout_ OrtCheckpointState* checkpoint_state, _In_ const ORTCHAR_T* train_model_path,
_In_ const ORTCHAR_T* eval_model_path, _In_ const ORTCHAR_T* optimizer_model_path,
- _Outptr_ OrtTrainingSession** out);
+ _Outptr_result_maybenull_ OrtTrainingSession** out);
+
+ /** \brief Create a training session that can be used to begin or resume training.
+ * This api provides a way to load all the training artifacts from buffers instead of files.
+ *
+ * \paramin env Environment to be used for the training session.
+ * \paramin options Session options that the user can customize for this training session.
+ * \paramin checkpoint_state Training states that the training session uses as a starting point for training.
+ * \paramin train_model_data Buffer containing the model data to be used to perform training
+ * \paramin train_data_length Length of the buffer containing train_model_data
+ * \paramin eval_model_data Buffer containing the model data to be used to perform evaluation
+ * \paramin eval_data_length Length of the buffer containing eval_model_data
+ * \paramin optim_model_data Buffer containing the model data to be used to perform weight update
+ * \paramin optim_data_length Length of the buffer containing optim_model_data
+ * \paramout out Created training session.
+ *
+ */
+ ORT_API2_STATUS(CreateTrainingSessionFromBuffer, _In_ const OrtEnv* env,
+ _In_ const OrtSessionOptions* options, _Inout_ OrtCheckpointState* checkpoint_state,
+ _In_ const void* train_model_data, size_t train_data_length,
+ _In_ const void* eval_model_data, size_t eval_data_length,
+ _In_ const void* optim_model_data, size_t optim_data_length,
+ _Outptr_result_maybenull_ OrtTrainingSession** out);
/// @}
/// \name Accessing The Training Session State
/// @{
- /** \brief Adds the given property to the checkpoint state.
+ /** \brief Adds or updates the given property to/in the checkpoint state.
*
* Runtime properties such as epoch, training step, best score, and others can be added to the checkpoint
- * state by the user if they desire by calling this function with the appropriate property name and
- * value. The given property name must be unique to be able to successfully add the property.
+ * state by the user by calling this function with the corresponding property name and value.
+ * The given property name must be unique to be able to successfully add the property.
*
* \paramin checkpoint_state The checkpoint state which should hold the property.
- * \paramin property_name Unique name of the property being added.
+ * \paramin property_name Name of the property being added or updated.
* \paramin property_type Type of the property associated with the given name.
* \paramin property_value Property value associated with the given name.
*
* exist in the checkpoint state to be able to retrieve it successfully.
*
* \paramin checkpoint_state The checkpoint state that is currently holding the property.
- * \paramin property_name Unique name of the property being retrieved.
+ * \paramin property_name Name of the property being retrieved.
* \paramin allocator Allocator used to allocate the memory for the property_value.
* \paramout property_type Type of the property associated with the given name.
* \paramout property_value Property value associated with the given name.
_Out_ enum OrtPropertyType* property_type, _Outptr_ void** property_value);
/// @}
+
+ /// \name Accessing The Training Session State
+ /// @{
+
+ /** \brief Load a checkpoint state from a buffer into checkpoint_state.
+ *
+ * This function will parse a checkpoint bytes buffer, pull relevant data and load the training
+ * state into the checkpoint_state. This checkpoint state can then be used to create the
+ * training session by invoking OrtTrainingApi::CreateTrainingSession. By doing so, the training
+ * session will resume training from the given checkpoint state.
+ * \note Note that the training session created with a checkpoint state uses this state to store the entire
+ * training state (including model parameters, its gradients, the optimizer states and the properties).
+ * As a result, it is required that the checkpoint state outlive the lifetime of the training session.
+ *
+ * \paramin checkpoint_buffer Path to the checkpoint bytes buffer.
+ * \paramin num_bytes Number of bytes in the checkpoint buffer.
+ * \paramout checkpoint_state Checkpoint state that contains the states of the training session.
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ */
+ ORT_API2_STATUS(LoadCheckpointFromBuffer, _In_ const void* checkpoint_buffer,
+ _In_ const size_t num_bytes, _Outptr_ OrtCheckpointState** checkpoint_state);
+
+ /** \brief Retrieves the type and shape information of the parameter associated with the given parameter name.
+ *
+ * This function retrieves the type and shape of the parameter associated with the given parameter name.
+ * The parameter must exist in the checkpoint state to be able to retrieve its type and shape information successfully.
+ *
+ * \paramin checkpoint_state The checkpoint state.
+ * \paramin parameter_name Name of the parameter being retrieved.
+ * \paramout parameter_type_and_shape The type and shape of the parameter being retrieved.
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ */
+ ORT_API2_STATUS(GetParameterTypeAndShape, _In_ const OrtCheckpointState* checkpoint_state,
+ _In_ const char* parameter_name, _Outptr_ OrtTensorTypeAndShapeInfo** parameter_type_and_shape);
+
+ /** \brief Updates the data associated with the model parameter in the checkpoint state for the given parameter name.
+ *
+ * This function updates a model parameter in the checkpoint state with the given parameter data.
+ * The training session must be already created with the checkpoint state that contains the parameter
+ * being updated. The given parameter is copied over to the registered device for the training session.
+ * The parameter must exist in the checkpoint state to be able to update it successfully.
+ *
+ * \paramin checkpoint_state The checkpoint state.
+ * \paramin parameter_name Name of the parameter being updated.
+ * \paramin parameter The parameter data that should replace the existing parameter data.
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ */
+ ORT_API2_STATUS(UpdateParameter, _Inout_ OrtCheckpointState* checkpoint_state,
+ _In_ const char* parameter_name, _In_ OrtValue* parameter);
+
+ /** \brief Gets the data associated with the model parameter from the checkpoint state for the given parameter name.
+ *
+ * This function retrieves the model parameter data from the checkpoint state for the given parameter name.
+ * The parameter is copied over and returned as an OrtValue. The training session must be already created
+ * with the checkpoint state that contains the parameter being retrieved.
+ * The parameter must exist in the checkpoint state to be able to retrieve it successfully.
+ *
+ * \paramin checkpoint_state The checkpoint state.
+ * \paramin parameter_name Name of the parameter being retrieved.
+ * \paramin allocator Allocator used to allocate the memory for the parameter.
+ * \paramout parameter The parameter data that is retrieved from the checkpoint state.
+ *
+ * \snippet{doc} snippets.dox OrtStatus Return Value
+ *
+ */
+ ORT_API2_STATUS(GetParameter, _In_ const OrtCheckpointState* checkpoint_state,
+ _In_ const char* parameter_name, _Inout_ OrtAllocator* allocator,
+ _Outptr_ OrtValue** parameter);
+
+ /// @}
};
typedef struct OrtTrainingApi OrtTrainingApi;
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_training_cxx_api.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_training_cxx_api.h
Changed
/// \name Accessing The Training Session State
/// @{
- /** \brief Load a checkpoint state from directory on disk into checkpoint_state.
+ /** \brief Load a checkpoint state from a file on disk into checkpoint_state.
*
- * This function will parse a checkpoint directory, pull relevant files and load the training
+ * This function will parse a checkpoint file, pull relevant data and load the training
* state and return an instance of Ort::CheckpointState. This checkpoint state can then be used to create the
* training session by instantiating Ort::TrainingSession. By doing so, the training session will resume
* training from the given checkpoint state.
*
- * \paramin path_to_checkpoint Path to the checkpoint directory
+ * \paramin path_to_checkpoint Path to the checkpoint file
* \return Ort::CheckpointState object which holds the state of the training session parameters.
*
*/
static CheckpointState LoadCheckpoint(const std::basic_string<ORTCHAR_T>& path_to_checkpoint);
- /** \brief Save the given state to a checkpoint directory on disk.
+ /** \brief Load a checkpoint state from a buffer.
*
- * This function serializes the provided checkpoint state to a directory on disk.
+ * This function will parse a checkpoint buffer, pull relevant data and load the training
+ * state and return an instance of Ort::CheckpointState. This checkpoint state can then be used to create the
+ * training session by instantiating Ort::TrainingSession. By doing so, the training session will resume
+ * training from the given checkpoint state.
+ *
+ * \paramin buffer Buffer containing the checkpoint data.
+ * \return Ort::CheckpointState object which holds the state of the training session parameters.
+ *
+ */
+ static CheckpointState LoadCheckpointFromBuffer(const std::vector<uint8_t>& buffer);
+
+ /** \brief Save the given state to a checkpoint file on disk.
+ *
+ * This function serializes the provided checkpoint state to a file on disk.
* This checkpoint can later be loaded by invoking Ort::CheckpointState::LoadCheckpoint to resume
* training from this snapshot of the state.
*
* \paramin checkpoint_state The checkpoint state to save.
- * \paramin path_to_checkpoint Path to the checkpoint directory.
+ * \paramin path_to_checkpoint Path to the checkpoint file.
* \paramin include_optimizer_state Flag to indicate whether to save the optimizer state or not.
*
*/
const std::basic_string<ORTCHAR_T>& path_to_checkpoint,
const bool include_optimizer_state = false);
- /** \brief Adds the given property to the checkpoint state.
+ /** \brief Adds or updates the given property to/in the checkpoint state.
*
* Runtime properties such as epoch, training step, best score, and others can be added to the checkpoint
- * state by the user if they desire by calling this function with the appropriate property name and
- * value. The given property name must be unique to be able to successfully add the property.
+ * state by the user by calling this function with the corresponding property name and value.
+ * The given property name must be unique to be able to successfully add the property.
*
- * \paramin property_name Unique name of the property being added.
+ * \paramin property_name Name of the property being added or updated.
* \paramin property_value Property value associated with the given name.
*
*/
* Gets the property value from an existing entry in the checkpoint state. The property must
* exist in the checkpoint state to be able to retrieve it successfully.
*
- * \paramin property_name Unique name of the property being retrieved.
+ * \paramin property_name Name of the property being retrieved.
* \return Property value associated with the given property name.
*
*/
Property GetProperty(const std::string& property_name);
+ /** \brief Updates the data associated with the model parameter in the checkpoint state for the given parameter name.
+ *
+ * This function updates a model parameter in the checkpoint state with the given parameter data.
+ * The training session must be already created with the checkpoint state that contains the parameter
+ * being updated. The given parameter is copied over to the registered device for the training session.
+ * The parameter must exist in the checkpoint state to be able to update it successfully.
+ *
+ * \paramin parameter_name Name of the parameter being updated.
+ * \paramin parameter The parameter data that should replace the existing parameter data.
+ *
+ */
+ void UpdateParameter(const std::string& parameter_name, const Value& parameter);
+
+ /** \brief Gets the data associated with the model parameter from the checkpoint state for the given parameter name.
+ *
+ * This function retrieves the model parameter data from the checkpoint state for the given parameter name.
+ * The parameter is copied over to the provided OrtValue. The training session must be already created
+ * with the checkpoint state that contains the parameter being retrieved.
+ * The parameter must exist in the checkpoint state to be able to retrieve it successfully.
+ *
+ * \paramin parameter_name Name of the parameter being retrieved.
+ * \return The parameter data that is retrieved from the checkpoint state.
+ *
+ */
+ Value GetParameter(const std::string& parameter_name);
+
/// @}
};
* - The training onnx model
* - The evaluation onnx model (optional)
* - The optimizer onnx model
- * - The checkpoint directory
+ * - The checkpoint file
*
* These artifacts can be generated using the `onnxruntime-training` python utility(https://github.com/microsoft/onnxruntime/blob/main/orttraining/orttraining/python/training/onnxblock/README.md).
*
const std::optional<std::basic_string<ORTCHAR_T>>& eval_model_path = std::nullopt,
const std::optional<std::basic_string<ORTCHAR_T>>& optimizer_model_path = std::nullopt);
+ /** \brief Create a training session that can be used to begin or resume training.
+ * This constructor allows the users to load the models from buffers instead of files.
+ *
+ * \paramin env Env to be used for the training session.
+ * \paramin session_options SessionOptions that the user can customize for this training session.
+ * \paramin checkpoint_state Training states that the training session uses as a starting point for training.
+ * \paramin train_model_data Buffer containing training model data.
+ * \paramin eval_model_data Buffer containing evaluation model data.
+ * \paramin optim_model_data Buffer containing optimizer model (used for performing weight/parameter update).
+ *
+ */
+ TrainingSession(const Env& env, const SessionOptions& session_options, CheckpointState& checkpoint_state,
+ const std::vector<uint8_t>& train_model_data, const std::vector<uint8_t>& eval_model_data = {},
+ const std::vector<uint8_t>& optim_model_data = {});
/// @}
/// \name Implementing The Training Loop
* \paramin input_values The user inputs to the training model.
* \return A std::vector of Ort::Value objects that represents the output of the forward pass of the training model.
*
- * \snippet{doc} snippets.dox OrtStatus Return Value
*
*/
std::vector<Value> TrainStep(const std::vector<Value>& input_values);
onnxruntime-linux-x64-gpu-1.15.1.tgz/include/onnxruntime_training_cxx_inline.h -> onnxruntime-linux-x64-gpu-1.17.1.tgz/include/onnxruntime_training_cxx_inline.h
Changed
ThrowOnError(GetTrainingApi().TrainingSessionGetEvalModelOutputCount(p_, &eval_model_output_count_));
}
+inline TrainingSession::TrainingSession(const Env& env, const SessionOptions& session_options,
+ CheckpointState& checkpoint_state,
+ const std::vector<uint8_t>& train_model_data,
+ const std::vector<uint8_t>& eval_model_data,
+ const std::vector<uint8_t>& optim_model_data) {
+ ThrowOnError(GetTrainingApi().CreateTrainingSessionFromBuffer(
+ env, session_options, checkpoint_state,
+ train_model_data.data(), train_model_data.size(),
+ eval_model_data.data(), eval_model_data.size(),
+ optim_model_data.data(), optim_model_data.size(),
+ &p_));
+
+ ThrowOnError(GetTrainingApi().TrainingSessionGetTrainingModelOutputCount(p_, &training_model_output_count_));
+
+ ThrowOnError(GetTrainingApi().TrainingSessionGetEvalModelOutputCount(p_, &eval_model_output_count_));
+}
+
inline std::vector<Value> TrainingSession::TrainStep(const std::vector<Value>& input_values) {
std::vector<Value> output_values;
output_values.reserve(training_model_output_count_);
RunOptions run_options;
ThrowOnError(GetTrainingApi().EvalStep(
p_, run_options, input_values.size(), ort_input_values,
- training_model_output_count_, ort_output_values));
+ eval_model_output_count_, ort_output_values));
return output_values;
}
return CheckpointState(checkpoint_state);
}
+inline CheckpointState CheckpointState::LoadCheckpointFromBuffer(const std::vector<uint8_t>& buffer) {
+ OrtCheckpointState* checkpoint_state;
+ ThrowOnError(GetTrainingApi().LoadCheckpointFromBuffer(buffer.data(), buffer.size(), &checkpoint_state));
+ return CheckpointState(checkpoint_state);
+}
+
inline void CheckpointState::SaveCheckpoint(const CheckpointState& checkpoint_states,
const std::basic_string<ORTCHAR_T>& path_to_checkpoint,
const bool include_optimizer_state) {
ThrowOnError(GetTrainingApi().AddProperty(p_, property_name.c_str(), OrtPropertyType::OrtFloatProperty, value_p));
} else if (std::holds_alternative<std::string>(property_value)) {
std::string value = std::get<std::string>(property_value);
- auto buffer = std::make_unique<char>(value.length() + 1).release();
- memcpy(buffer, value.c_str(), value.length());
- ThrowOnError(GetTrainingApi().AddProperty(p_, property_name.c_str(), OrtPropertyType::OrtStringProperty, buffer));
+ auto buffer = std::make_unique<char>(value.length() + 1);
+ memcpy(buffer.get(), value.c_str(), value.length());
+ // AddProperty takes a char* and calls PropertyBag::AddProperty which takes a std::string. The data will be
+ // copied at that point so buffer can free the local allocation once the call is made.
+ ThrowOnError(GetTrainingApi().AddProperty(p_, property_name.c_str(), OrtPropertyType::OrtStringProperty,
+ buffer.get()));
} else {
ThrowStatus(Status("Unknown property type received.", OrtErrorCode::ORT_INVALID_ARGUMENT));
}
return property;
}
+inline void CheckpointState::UpdateParameter(const std::string& parameter_name, const Value& parameter) {
+ ThrowOnError(GetTrainingApi().UpdateParameter(p_, parameter_name.c_str(), parameter));
+}
+
+inline Value CheckpointState::GetParameter(const std::string& parameter_name) {
+ AllocatorWithDefaultOptions allocator;
+ OrtValue* parameter;
+ ThrowOnError(GetTrainingApi().GetParameter(p_, parameter_name.c_str(), allocator, ¶meter));
+
+ return Value{parameter};
+}
+
} // namespace Ort
onnxruntime-linux-x64-gpu-1.15.1.tgz/lib/libonnxruntime.so -> onnxruntime-linux-x64-gpu-1.17.1.tgz/lib/libonnxruntime.so
Changed
-(symlink to libonnxruntime.so.1.15.1)
+(symlink to libonnxruntime.so.1.17.1)
No build results available
No rpmlint results available
Request History
antlarr created request about 1 month ago
Fixes build in Tumbleweed
- Update to 1.1.13
- Update onnxruntime to 1.17.1.tgz
- Add patch to fix a cmake error:
* fix-cmake-error.patch
- 1.1.6
- Update to 1.1.13
* Add video_tick function to background filter info
* Update Onnxruntime version and fix Windows compilerconfig
- Update to 1.1.12
* Critical bugfix in the PSNR calculation for image-similarity
skipping in background filter
- Update to 1.1.11
* New! RMBG model from Bria.AI
https://huggingface.co/briaai/RMBG-1.4 - remove background from
any object! (not just human)
* We got rid of the annoying "update available" message in favor
of a more discreet message on the plugin settings.
* Better handling of local file paths on Windows
* more.
- Update to 1.1.10
* This release will fix the Flatpak recipe for Linux after the
dependency bump, as well as removing the start menu option from
the Windows installer.
- Update to 1.1.9
* In this release we bumped versions of OpenCV and ONNXRuntime,
and trying to get rid of the annoying "smart screen" block on
Windows. We're also rolling out releases through AUR, Pacstall
hillwood accepted request 11 days ago