Describe Your Question
I am trying out the segmentation demo using the latest OHIF viewer release. I load the CTA Head and Neck Study in segmentation mode (second study listed in the study list). Then I add a new segmentation and try to use the “Marker Guided Label Map” tool from the segmentation toolbar. As soon as I click the button there are several errors. I believe it tries to load the Segment Anything Model (SAM) model from hugging face. I believe it tries to load the model in FP16 quantized mode which leads to a string of errors but I think they all stem from using FP16 format somewhere in the model load pipeline.
I have RTX 3090 and RTX 4090 GPUs which support FP16 format so that’s not an issue. I had to enable several flags related to using web gpu in chrome to even get to this point (enable-unsafe-gpu, vulkan etc). I can share GPU report from chrome if needed.
This same issue also happens when I try to run the Cornerstone3D “Segmentation AI Assisted” example found here “samclientside”
What steps can we follow to reproduce the bug?
- Navigate to OHIF viewer website ohif dot org
- Click Try it Now
- Open Second study (CTA Head and Neck) in the list in Segmentation mode
- Click Add Segmentation
- Click “Marker Guided Label Map” tool from the right side segmentation tool box
- See errors in the browser console.
A string of these errors"
``2025-04-20 14:26:54.225700 [W:onnxruntime:, constant_folding.cc:269 ApplyImpl] Could not find a CPU kernel and hence can’t constant fold Div node ‘/image_encoder/blocks.0/attn/Div_1’
Followed by:
```status sam-b-decoder (cached)```
Followed by:
```An uncaught WebGPU validation error was raised: Error while parsing WGSL: :8:68 error: 'f16' type used without 'f16' extension enabled
@group(0) @binding(0) var<storage, read> aData: array<vec4<f16>>;
^^^
- While validating [ShaderModuleDescriptor ""Div""]
- While calling [Device].CreateShaderModule([ShaderModuleDescriptor ""Div""]).
Finally a string of these for every MUL, DIV etc operations:
Error while parsing WGSL: :8:68 error: 'f16' type used without 'f16' extension enabled
@group(0) @binding(0) var<storage, read> aData: array<vec4<f16>>;
^^^
- While validating [ShaderModuleDescriptor ""Div""]
- While calling [Device].CreateShaderModule([ShaderModuleDescriptor ""Div""]).
Compilation log for [Invalid ShaderModule "Div"]:
1 error(s) generated while compiling the shader:
:8:68 error: 'f16' type used without 'f16' extension enabled
@group(0) @binding(0) var<storage, read> aData: array<vec4<f16>>;