Skip to content

Conversation

@adrastogi
Copy link
Contributor

Why is this change being made?

The Segment Anything (sam) model automation was failing with two timeout errors. The first was locator('#latency') timing out at 30s because the element doesn't exist in the sample. The actual ID is #decoder_latency. The second was locator('canvas').first() timing out at 60s because model loading (~187MB) regularly exceeds that window.

What changed?

Fixed the latency selector from #latency to #decoder_latency to match the actual element ID in the Segment Anything sample, and changed the canvas selector from generic canvas to the specific #img_canvas. The canvas visibility timeout was increased from 60s to 300s to allow time for the SAM encoder (171MB) and decoder (15.7MB) to download and compile.

Additionally, an encoder-readiness check was added that polls the canvas cursor style, waiting for it to change from "wait" before clicking. This ensures handleImage() has finished running the encoder on the default image.

How was the change tested?

Ran the SAM model case end-to-end on an NVIDIA RTX 5060 Ti with DML EP using node src/main.js --suite model --model-case sam --chrome-channel canary. The test passed in 24.5s. Canvas loaded, encoder processed the default image, the click triggered segmentation, and decoder latency was captured successfully. I am hitting some other problems with testing on TRT RTX EP, but I think those are unrelated to the automation.

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.

1 participant