Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bugs related to sum #693

Merged
merged 3 commits into from
Nov 30, 2024
Merged

Fixed bugs related to sum #693

merged 3 commits into from
Nov 30, 2024

Conversation

fa0311
Copy link
Contributor

@fa0311 fa0311 commented Nov 29, 2024

No description provided.

if providers:
for provider in providers or []:
if provider in available_providers:
valid_providers.append(provider)
Copy link
Contributor Author

@fa0311 fa0311 Nov 29, 2024

Choose a reason for hiding this comment

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

Added if providers: like other models.
This was causing unintended fallbacks.

new_session(model_name="sam", providers=["CUDAExecutionProvider","CPUExecutionProvider"])
2024-11-29 13:14:59.2810429 [E:onnxruntime:Default, provider_bridge_ort.cc:1848 onnxruntime::TryGetProviderInfo_TensorRT] D:\a\_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1539 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "c:\Users\yuki\Documents\School\2024\background-erase\.venv\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll"

*************** EP Error ***************
EP Error D:\a\_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:507 onnxruntime::python::RegisterTensorRTPluginsAsCustomOps Please install TensorRT libraries as mentioned in the GPU requirements page, make sure they're in the PATH or LD_LIBRARY_PATH, and that your GPU is supported.
 when using ['CUDAExecutionProvider', 'CPUExecutionProvider', 'TensorrtExecutionProvider', 'CUDAExecutionProvider', 'CPUExecutionProvider']
Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This appears to have changed with this commit: 6f1dd31

Comment on lines +146 to +155
prompt = kwargs.get(
"sam_prompt",
[
{
"type": "point",
"label": 1,
"data": [int(img.width / 2), int(img.height / 2)],
}
],
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added default prompt
This simply selects the center of the image.
The existing one simply causes a validation error, but better than that.

@danielgatis
Copy link
Owner

Thanks a lot! 👏

@danielgatis danielgatis merged commit 5435d2f into danielgatis:main Nov 30, 2024
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.

2 participants