lightning-joyce / chromeai

Chrome Built-in AI Demo page
https://chromeai.co
MIT License
111 stars 14 forks source link

Component 'Optimization Guide On Device Model ' doesn't show up #6

Open BrunoFelipeAlbuquerque opened 1 month ago

BrunoFelipeAlbuquerque commented 1 month ago

Windows 11 Pro 22631.3880 - Windows Feature Experience Pack 1000.22700.1020.0 Chrome Canary v128.0.6589.0

Enabled WebGPU, prompt-api-for-gemini-nano and optimization-guide-on-device-model in all possible combinations and the Optimization Guide On Device Model isn't showing up even after restarting the browser or the PC.

image image

young-yang03 commented 1 month ago

@lightning-joyce @BrunoFelipeAlbuquerque

Optimization Guide On Device Model is missing for me too. But I solve it.

Try to change chrome language to "English", and refresh the "chrome://components/" or relaunch the browser, the Optimization Guide On Device Model will show

vbilici commented 1 month ago

I changed the language to English but It didn't help. I am using Mac Os Sonoma 14.5 and Chrome dev Version 128.0.6585.0 (Official Build) dev (arm64)

ankurparihar commented 1 month ago

It's just not working for some reasons, and nobody on twitter or anywhere is helpful either

channu28011995 commented 1 month ago

1 Open DevTools and send await window.ai.canCreateTextSession(); in the console. If this returns “readily”, then you are all set.

2 force Chrome to recognize that you want to use this API. To do so, open DevTools and send await window.ai.createTextSession(); in the console. This will likely fail but it’s intended.

Then, relaunch Chrome and continue with the steps below.

3 Open a new tab in Chrome, go to chrome://components 4 Confirm that Gemini Nano is either available or-is being downloaded You'll want to see the Optimization Guide On Device Model present with a version greater or equal to 2024.5.21.1031. If there is no version listed, click on Check for update to force the download.

  1. Once the model has downloaded and has reached a version greaterthan shown above, open DevTools and send await window.ai.canCreateTextSession(); in the console. If this returns “readily”, then you are all set.
vbilici commented 1 month ago

weird but it worked 👍 thanks!

ankurparihar commented 1 month ago

This is one golden buzzer answer @channu28011995.

Thank you so much for this!!!

heinrich-ulbricht commented 1 month ago

Not appearing here, but I'm on Debian. Not sure if there are hardware/driver requirements that are not met :-/ One blog post suggested to wait up to two days, so I'm going to do that.

chenxing3 commented 1 month ago

Not appearing here, but I'm on Debian. Not sure if there are hardware/driver requirements that are not met :-/ One blog post suggested to wait up to two days, so I'm going to do that.

Is the label “Optimization Guide” appearing after 1-2 days?

clover2016 commented 1 month ago

send await window.ai.canCreateTextSession();

image

djs959 commented 1 month ago

"Optimization Guide" is not appearing for me either since I updated to Canary 128.0.6613.0, in the previous version it was there and worked. I've tried the tricks above and also deleted the application directory, clearing and reseting the two flags, etc. I have >100Gb of free disk space. Running 15.0 Beta (24A5289h).

M42ku5 commented 1 month ago

It finally worked for me today in the chrome beta version 128.0.6613.7 (using win 10): Screenshot 2024-07-26 223546 Screenshot 2024-07-26 223623 Screenshot 2024-07-26 223703

clover2016 commented 1 month ago

I finally solve this

the key point is step3

  1. enable flags
  2. Relaunch
  3. Open console and send: await window.ai.createTextSession()
  4. Ignore errors , goto chrome://components
liudonghua123 commented 1 month ago

I use the latest chrome stable v127.0.6533.73 on windows, and enabled the two flags (Enabled chrome://flags/#prompt-api-for-gemini-nano and Enabled BypassPerfRequirement chrome://flags/#optimization-guide-on-device-model), changed language to English or English (United States), but the Optimization Guide On Device Model still not shown on chrome://components/.

Is chrome v128 a mandatory requirement?

m0o0scar commented 1 month ago

1 Open DevTools and send await window.ai.canCreateTextSession(); in the console. If this returns “readily”, then you are all set.

2 force Chrome to recognize that you want to use this API. To do so, open DevTools and send await window.ai.createTextSession(); in the console. This will likely fail but it’s intended.

Then, relaunch Chrome and continue with the steps below.

3 Open a new tab in Chrome, go to chrome://components 4 Confirm that Gemini Nano is either available or-is being downloaded You'll want to see the Optimization Guide On Device Model present with a version greater or equal to 2024.5.21.1031. If there is no version listed, click on Check for update to force the download. 4. Once the model has downloaded and has reached a version greaterthan shown above, open DevTools and send await window.ai.canCreateTextSession(); in the console. If this returns “readily”, then you are all set.

Confirm this works for me (MacBook Pro with Apple Silicon, Sonoma 14.5), thanks 👍

Alan-Zhi commented 1 month ago

1 打开DevTools并在控制台中发送await window.ai.canCreateTextSession();。如果 返回“readily”,则一切就绪。

2 强制Chrome识别您想要使用此API。为此, 请打开DevTools并在控制台中发送await window.ai.createTextSession();。 这可能会失败,但这是意识为之。

然后,重新启动 Chrome 并继续以下步骤。

3 在 Chrome 中打开新标签页,转到 chrome://components 4 确认 Gemini Nano 可用或正在下载 您希望看到设备模型上的优化指南存在,其 版本大于或等于 2024.5.21.1031。 如果没有上市版本,请单击检查更新以强制下载。 4.一旦模型下载并达到上述显示的版本,请打开 DevTools并在控制台中发送await window.ai.canCreateTextSession();。如果 “readily”,则一切都已经返回。

nice ! Component downloading

codezjx commented 4 weeks ago

If you still can't see this option, confirm storage space, make sure that you have at least 22 GB of free storage space. I tried all the above methods but none of them worked. Finally I deleted a lot of files and managed to get the space at least 22G, and the option is showing.

After the model file is downloaded, it will be placed in this directory on MacOS: ~/Library/Application Support/Google/Chrome/OptGuideOnDeviceModel/2024.7.24.2218

ZebarFish commented 4 weeks ago

I use the latest chrome stable v127.0.6533.73 on windows, and enabled the two flags (Enabled chrome://flags/#prompt-api-for-gemini-nano and Enabled BypassPerfRequirement chrome://flags/#optimization-guide-on-device-model), changed language to English or English (United States), but the Optimization Guide On Device Model still not shown on chrome://components/.

Is chrome v128 a mandatory requirement?

I encountered the same problem as you and I updated to v128 and It's ok

aiakubovich commented 3 weeks ago

still does not work for me...

jhaemin commented 3 weeks ago

It seems it doesn't work on Chrome v127. It works on Chrome beta (which is v128).

imaiya commented 3 weeks ago

I finally solve this

the key point is step3

  1. enable flags
  2. Relaunch
  3. Open console and send: await window.ai.createTextSession()
  4. Ignore errors , goto chrome://components

I love you

vinooganesh commented 2 weeks ago

For folks that find this later, the button on the components page can take some time to appear, it took about 30 minutes for it to appear for me. Also, I had to make sure that my chrome was in "English" not "English (United States)" Screenshot 2024-08-16 at 14 19 19

liudonghua123 commented 1 week ago

Change Language to "English" not "English (United States)", and execute await window.ai.createTextSession() in console of devtools works for me.

image

1724297488845

liudonghua123 commented 1 week ago

I also find the downloaded Gemini Nano files are located in %LOCALAPPDATA%\Google\Chrome\User Data\OptGuideOnDeviceModel\2024.7.24.2218.

image

volthier commented 1 week ago

I have try all steps above and none have worked on version 130.0.6675.0 any suggestion or idea to solve this?

image image
salmin89 commented 1 week ago

I had this issue at first and then I tried changing the browser language to English (not US) and nothing. I tried pasting: await window.ai.createTextSession() but no result.

Then I just randomly tried await window.ai.summarizer.create() and this made Optimization Guide On Device Model show up. Not sure if it was random or it just finished downloading in the background.

volthier commented 1 week ago

I had this issue at first and then I tried changing the browser language to English (not US) and nothing. I tried pasting: await window.ai.createTextSession() but no result.

Then I just randomly tried await window.ai.summarizer.create() and this made Optimization Guide On Device Model show up. Not sure if it was random or it just finished downloading in the background.

That works like a charm thank you :)

volthier commented 1 week ago

Now i have the Optimization Guide On Device Model but still not working the await window.ai.createTextSession()

dark-faze commented 5 days ago

Any idea when these apis will be made available for normal chrome ?

BenMQ commented 5 days ago

Note that API has changed. If you are on 129.0.6667.0+ the following API might work better

ai.createTextSession no longer exists. see https://docs.google.com/document/d/1VG8HIyz361zGduWgNG7R_R8Xkv0OOJ8b5C9QKeCjU0c/edit#heading=h.witohboigk0o