Skip to content

Commit

Permalink
Update demo model paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ibelem committed Jun 4, 2024
1 parent 620edcc commit 8d6bdf8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The website provides four scenarios based on different ONNX pre-trained deep lea

### 1. Stable Diffusion 1.5

[Stable Diffusion](https://huggingface.co/onnxruntime-web-temp/demo/tree/main/stable-diffusion-1.5) is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input.
[Stable Diffusion](https://huggingface.co/microsoft/stable-diffusion-v1.5-webnn/tree/main) is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input.

This Stable Diffusion 1.5 model has been optimized to work with WebNN. This model is licensed under the [CreativeML Open RAIL-M license](https://github.com/CompVis/stable-diffusion/blob/main/LICENSE). For terms of use, please visit [here](https://huggingface.co/runwayml/stable-diffusion-v1-5#uses). If you comply with the license and terms of use, you have the rights described therin. By using this Model, you accept the terms.

Expand All @@ -21,7 +21,7 @@ This model is meant to be used with the corresponding sample on this repo for ed

### 2. SD-Turbo

[SD-Turbo](https://huggingface.co/onnxruntime-web-temp/demo/tree/main/sd-turbo) is a fast generative text-to-image model that can synthesize photorealistic images from a text prompt in a single network evaluation. In the demo, you can generate an image in 2s on AI PC devices by leveraging WebNN API, a dedicated low-level API for neural network inference hardware acceleration.
[SD-Turbo](https://huggingface.co/microsoft/sd-turbo-webnn/tree/main) is a fast generative text-to-image model that can synthesize photorealistic images from a text prompt in a single network evaluation. In the demo, you can generate an image in 2s on AI PC devices by leveraging WebNN API, a dedicated low-level API for neural network inference hardware acceleration.

This Stable Diffusion Turbo model has been optimized to work with WebNN. This model is licensed under the [STABILITY AI NON-COMMERCIAL RESEARCH COMMUNITY LICENSE AGREEMENT](https://huggingface.co/stabilityai/sd-turbo/blob/main/LICENSE). For terms of use, please visit the [Acceptable Use Policy](https://stability.ai/use-policy). If you comply with the license and terms of use, you have the rights described therin. By using this Model, you accept the terms.

Expand All @@ -30,7 +30,7 @@ This model is meant to be used with the corresponding sample on this repo for ed

### 3. Segment Anything

[Segment Anything](https://huggingface.co/onnxruntime-web-temp/demo/tree/main/segment-anything) is a new AI model from Meta AI that can "cut out" any object. In the demo, you can segment any object from your uploaded images.
[Segment Anything](https://huggingface.co/microsoft/segment-anything-model-webnn/tree/main) is a new AI model from Meta AI that can "cut out" any object. In the demo, you can segment any object from your uploaded images.

This Segment Anything Model has been optimized to work with WebNN. This model is licensed under the [Apache-2.0 License](https://github.com/facebookresearch/segment-anything?tab=Apache-2.0-1-ov-file#readme). For terms of use, please visit the [Code of Conduct](https://github.com/facebookresearch/segment-anything?tab=coc-ov-file#readme). If you comply with the license and terms of use, you have the rights described therin. By using this Model, you accept the terms.

Expand All @@ -39,7 +39,7 @@ This model is meant to be used with the corresponding sample on this repo for ed

### 4. Whisper Base

[Whisper Base](https://huggingface.co/onnxruntime-web-temp/demo/tree/main/whisper-base) is a pre-trained model for automatic speech recognition (ASR) and speech translation. In the demo, you can experience the speech to text feature by using on-device inference powered by WebNN API and DirectML, especially the NPU acceleration.
[Whisper Base](https://huggingface.co/microsoft/whisper-base-webnn/tree/main) is a pre-trained model for automatic speech recognition (ASR) and speech translation. In the demo, you can experience the speech to text feature by using on-device inference powered by WebNN API and DirectML, especially the NPU acceleration.

This Whisper-base model has been optimized to work with WebNN. This model is licensed under the [Apache-2.0 license](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md). For terms of use, please visit the [Intended use](https://huggingface.co/openai/whisper-base#evaluated-use). If you comply with the license and terms of use, you have the rights described therin. By using this Model, you accept the terms.

Expand Down
4 changes: 2 additions & 2 deletions demos/sd-turbo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function getConfig() {
const query = window.location.search.substring(1);
var config = {
model: location.href.includes("github.io")
? "https://huggingface.co/onnxruntime-web-temp/demo/resolve/main/sd-turbo"
? "https://huggingface.co/microsoft/sd-turbo-webnn/resolve/main"
: "models",
mode: "none",
safetychecker: true,
Expand Down Expand Up @@ -1246,7 +1246,7 @@ const ui = async () => {
location.href.toLowerCase().indexOf("huggingface.co") > -1 ||
location.href.toLowerCase().indexOf("vercel.app") > -1
) {
path = "onnxruntime-web-temp/demo/resolve/main/sd-turbo/tokenizer";
path = "microsoft/sd-turbo-webnn/resolve/main/tokenizer";
} else {
path = "../../demos/sd-turbo/models/tokenizer";
}
Expand Down
2 changes: 1 addition & 1 deletion demos/segment-anything/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function getConfig() {
const query = window.location.search.substring(1);
const config = {
host: location.href.includes("github.io")
? "https://huggingface.co/onnxruntime-web-temp/demo/resolve/main/segment-anything"
? "https://huggingface.co/microsoft/segment-anything-model-webnn/resolve/main"
: "models",
mode: "none",
model: "sam_b",
Expand Down
4 changes: 2 additions & 2 deletions demos/stable-diffusion-1.5/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ document.addEventListener("DOMContentLoaded", async () => {
location.href.toLowerCase().indexOf("vercel.app") > -1
) {
path =
"onnxruntime-web-temp/demo/resolve/main/stable-diffusion-1.5/tokenizer";
"microsoft/stable-diffusion-v1.5-webnn/resolve/main/tokenizer";
} else {
path = "../../demos/stable-diffusion-1.5/models/tokenizer/";
}
Expand Down Expand Up @@ -277,7 +277,7 @@ export const modelPath = () => {
location.href.toLowerCase().indexOf("huggingface.co") > -1 ||
location.href.toLowerCase().indexOf("vercel.app") > -1
) {
return "https://huggingface.co/onnxruntime-web-temp/demo/resolve/main/stable-diffusion-1.5/";
return "https://huggingface.co/microsoft/stable-diffusion-v1.5-webnn/resolve/main/";
} else {
return "models/";
}
Expand Down
2 changes: 1 addition & 1 deletion demos/whisper-base/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ const main = async () => {
try {
context = new AudioContext({ sampleRate: kSampleRate });
const whisper_url = location.href.includes("github.io")
? "https://huggingface.co/onnxruntime-web-temp/demo/resolve/main/whisper-base/"
? "https://huggingface.co/microsoft/whisper-base-webnn/resolve/main/"
: "./models/";
whisper = new Whisper(whisper_url, provider, deviceType, dataType, mask_4d);
await whisper.create_whisper_processor();
Expand Down
2 changes: 1 addition & 1 deletion demos/whisper-base/whisper.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (
location.href.toLowerCase().indexOf("huggingface.co") > -1 ||
location.href.toLowerCase().indexOf("vercel.app") > -1
) {
let path = "onnxruntime-web-temp/demo/resolve/main/whisper-base";
let path = "microsoft/whisper-base-webnn/resolve/main";
tokenizerPath = `${path}/tokenizer`;
processerPath = `${path}/processer`;
} else {
Expand Down

0 comments on commit 8d6bdf8

Please sign in to comment.