Add remote exec capability for foundation models missing it#1968
Open
Add remote exec capability for foundation models missing it#1968
Conversation
Contributor
⚡️ Codeflash found optimizations for this PR📄 45% (0.45x) speedup for
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manual testing results
I tested the workflows blocks with added remote exec functionality on a dev GPU with following results:
working:
gaze - works both with local and remote exec
depth estimation: works both with local and remote exec
SAM2: works both with local and remote exec
florence - works both with local and remote exec (some workflow block config causes broken results, but same for local/remote)
Moondream2 - works both with local and remote exec
not working/couldnt test:
I think its ok to add the missing remote exec functionality and endpoints handling for these already also.
1. HTTP Client Methods Added (
inference_sdk/http/client.py)infer_lmm()- Generic LMM endpoint for Florence2, Moondream2, SmolVLM, Qwen modelsdepth_estimation()- Depth estimation endpointsam2_segment_image()- SAM2 segmentation endpointsam3_3d_infer()- SAM3 3D object generation endpoint2. HTTP API Endpoint Added (
inference/core/interfaces/http/http_api.py)/sam3_3d/infer- New endpoint for SAM3 3D object generation with JSON-serializable response (base64-encoded binary data)3. Workflow Blocks Updated with Remote Execution
All blocks now support
StepExecutionMode.REMOTE:detect_gazes()depth_estimation()sam2_segment_image()infer_lmm()infer_lmm()infer_lmm()infer_lmm()infer_lmm()sam3_3d_infer()4. Unit Tests Added
test_gaze_remote.py- Gaze detection remote execution teststest_depth_estimation.py- Depth estimation teststest_segment_anything2.py- SAM2 teststest_vlm_remote_execution.py- Tests for Florence2, Moondream2, SmolVLM, Qwen2.5-VL, Qwen3-VLtest_segment_anything3_3d.py- SAM3 3D tests5. Documentation Updated
Added "Execution Modes" sections to:
docs/foundation/florence2.mddocs/foundation/gaze.mddocs/foundation/depth_estimation.mddocs/foundation/sam2.mddocs/foundation/moondream2.mddocs/foundation/smolvlm.mddocs/foundation/sam3_3d.md