Skip to content

Conversation

wang563681252
Copy link
Contributor

Issue: feature #327

Now you can select nodownlaod model.
image

Show this image.
image

You can open code panel.
image

Export:(Only one option)
image

Zhaopeng Wang (from Dev Box) added 2 commits August 19, 2025 20:00
Copy link
Member

@nmetulev nmetulev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, but otherwise works great:

  • When navigating between model groups, make sure the non-downloaded models list unselectes model when other group selects a model. To repro, open the model picker, select a non-downloaded model, navigate to other group (like Windows AI APIs) and select a model there, and then navigate back to ONNX models - the non-downloaded model remains selected but it shouldn't.

    Image
  • The message in the sample container when a non-downloaded model should be more descriptive with button to download the model and a button to view the code. Right now, it's not clear how to download the model or that I can still view the code. Consider having the code view open automatically when a non-downloaded model is selected.

  • Exporting the project with non downloaded model should maybe include a note that the sample will not work because the model is not downloaded.

if (realCachedModel == null)
{
return null;
cachedModel = new(selectedModelDetails.Id, "Need Download", selectedModelDetails.Url, selectedModelDetails.Size, selectedModelDetails.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can improve how this looks in the code - Need Download feels awkard. Consider something like path-to-model-files-once-downloaded to make it clear it's a path value that goes there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which of the following do you mean to change?

  • cachedModel = new(selectedModelDetails.Id, "path-to-model-files-once-downloaded",
  • cachedModel = new(selectedModelDetails.Id, "C:\Users\xxx.cache\aigallery\microsoft--Phi-4-mini-instruct-onnx\main\cpu_and_mobile\cpu-int4-rtn-block-32-acc-level-4",
  • cachedModel = new(selectedModelDetails.Id, "", (this code can use "App.ModelCache.IsModelCached(selectedModel.Url)" to check model status)

@wang563681252
Copy link
Contributor Author

wang563681252 commented Aug 20, 2025

Minor comments, but otherwise works great:

  • When navigating between model groups, make sure the non-downloaded models list unselectes model when other group selects a model. To repro, open the model picker, select a non-downloaded model, navigate to other group (like Windows AI APIs) and select a model there, and then navigate back to ONNX models - the non-downloaded model remains selected but it shouldn't.
    Image
  • The message in the sample container when a non-downloaded model should be more descriptive with button to download the model and a button to view the code. Right now, it's not clear how to download the model or that I can still view the code. Consider having the code view open automatically when a non-downloaded model is selected.
  • Exporting the project with non downloaded model should maybe include a note that the sample will not work because the model is not downloaded.
  • fixed the first problem.
  • add some tips in Sample page when select nodownload model. add consider having the code view open automatically when a non-downloaded model is selected.
image - add tips in after click export button window.

topic:

If want add download button near this button, I think need some design.
image
Because model have different status, like warrning and download.
image

@niels9001
Copy link
Contributor

@wang563681252 what would the additional download button do? Wouldn't it be confusing to have multiple places to download models?

Also, you could consider grey-ing out the modelpicker button when no model is downloaded / available?

@wang563681252
Copy link
Contributor Author

wang563681252 commented Aug 25, 2025

@wang563681252 what would the additional download button do? Wouldn't it be confusing to have multiple places to download models?

Also, you could consider grey-ing out the modelpicker button when no model is downloaded / available?

Hi @niels9001,

@nmetulev say: "The message in the sample container when a non-downloaded model should be more descriptive with button to download the model and a button to view the code. Right now, it's not clear how to download the model or that I can still view the code. Consider having the code view open automatically when a non-downloaded model is selected."

I think the meaning of this passage is for me to add a download button next to the selected model, but I don't think it's a good idea. I am discussing it with Nikola.

wang563681252

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants