LMM¶
Deprecated
This block is deprecated and may be removed in a future release.
Class: LMMBlockV1
Source: inference.core.workflows.core_steps.models.foundation.lmm.v1.LMMBlockV1
Ask a question to a Large Multimodal Model (LMM) with an image and text.
You can specify arbitrary text prompts to an LMMBlock.
The LLMBlock supports two LMMs:
- OpenAI's GPT-4 with Vision;
You need to provide your OpenAI API key to use the GPT-4 with Vision model.
If you want to classify an image into one or more categories, we recommend using the dedicated LMMForClassificationBlock.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/lmm@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
prompt |
str |
Holds unconstrained text prompt to LMM mode. | ✅ |
lmm_type |
str |
Type of LMM to be used. | ✅ |
lmm_config |
LMMConfig |
Configuration of LMM. | ❌ |
remote_api_key |
str |
Holds API key required to call LMM model - in current state of development, we require OpenAI key when lmm_type=gpt_4v.. |
✅ |
json_output |
Dict[str, str] |
Holds dictionary that maps name of requested output field into its description. | ❌ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
requires_internet— air-gapped / offline deployments - This block depends on a service that is not reachable from fully offline / air-gapped deployments.
-
hard— runtimehosted_serverless; executionremote - LMM_ENABLED=False on Roboflow Hosted Serverless: the /llm_v1 endpoint is not registered, so run_remotely() returns 404.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to LMM in version v1.
- inputs:
Keypoint Visualization,Twilio SMS/MMS Notification,OPC UA Writer Sink,Qwen 3.6 API,Grid Visualization,Llama 3.2 Vision,PLC Writer,Absolute Static Crop,Roboflow Visual Search Classifier,Image Threshold,Polygon Zone Visualization,CogVLM,MQTT Writer,Contrast Equalization,Google Gemini,OCR Model,GLM-OCR,Background Subtraction,Contrast Enhancement,Reference Path Visualization,Twilio SMS Notification,Instance Segmentation Model,Google Gemma API,VLM As Detector,Florence-2 Model,Dynamic Crop,Halo Visualization,Image Blur,LMM,Ellipse Visualization,OpenAI,Florence-2 Model,LMM For Classification,Event Writer,OpenAI,Keypoint Detection Model,Google Gemma,Slack Notification,Heatmap Visualization,Email Notification,Circle Visualization,Perspective Correction,Camera Focus,Crop Visualization,Polygon Visualization,Multi-Label Classification Model,Stability AI Inpainting,OpenAI-Compatible LLM,Object Detection Model,VLM As Classifier,Image Slicer,Google Gemini,Roboflow Vision Events,Local File Sink,Dot Visualization,Line Counter Visualization,Depth Estimation,Stitch OCR Detections,PP-OCR,Blur Visualization,EasyOCR,Anthropic Claude,CSV Formatter,Color Visualization,Image Convert Grayscale,Stitch OCR Detections,Single-Label Classification Model,Qwen 3.5 API,Trace Visualization,Icon Visualization,Current Time,Model Comparison Visualization,Camera Focus,QR Code Generator,Google Gemini,Qwen-VL,Mask Visualization,MoonshotAI Kimi,Microsoft SQL Server Sink,Text Display,Stability AI Image Generation,Google Vision OCR,Webhook Sink,OpenAI,Pixelate Visualization,Stitch Images,S3 Sink,Classification Label Visualization,MoonshotAI Kimi,Polygon Visualization,Anthropic Claude,Roboflow Dataset Upload,Morphological Transformation,Bounding Box Visualization,Image Contours,Image Slicer,Stability AI Outpainting,Anthropic Claude,Roboflow Custom Metadata,Camera Calibration,Roboflow Asset Library Attributes,Morphological Transformation,Relative Static Crop,Background Color Visualization,Model Monitoring Inference Aggregator,Clip Comparison,Corner Visualization,SIFT,Roboflow Visual Search,OpenRouter,Llama 3.2 Vision,Qwen3.5-VL,Email Notification,Triangle Visualization,OpenAI,Roboflow Dataset Upload,Image Preprocessing,SIFT Comparison,Halo Visualization,Label Visualization - outputs:
Perception Encoder Embedding Model,Qwen 3.6 API,Object Detection Model,Llama 3.2 Vision,PLC Writer,Distance Measurement,Roboflow Visual Search Classifier,Polygon Zone Visualization,BoT-SORT Tracker,Contrast Equalization,Google Gemini,Background Subtraction,Twilio SMS Notification,Detections Filter,Detections Merge,VLM As Detector,Florence-2 Model,Dynamic Crop,Halo Visualization,SAM 3 Interactive,Seg Preview,Ellipse Visualization,Florence-2 Model,Byte Tracker,Line Counter,Cache Set,OpenAI,Data Aggregator,Time in Zone,Google Gemma,Byte Tracker,Buffer,Semantic Segmentation Model,Email Notification,Detections Consensus,Crop Visualization,Polygon Visualization,Keypoint Detection Model,Line Counter,Detections Combine,Object Detection Model,VLM As Classifier,PLC ModbusTCP,Google Gemini,Multi-Label Classification Model,Qwen3.5,Delta Filter,Object Detection Model,Time in Zone,Instance Segmentation Model,Expression,PP-OCR,Clip Comparison,Blur Visualization,EasyOCR,PLC EthernetIP,Segment Anything 2 Model,CSV Formatter,Color Visualization,Dynamic Zone,Image Convert Grayscale,Motion Detection,Stitch OCR Detections,Rate Limiter,Qwen 3.5 API,Trace Visualization,Current Time,Cache Get,PLC Reader,QR Code Generator,Google Gemini,Detections Stitch,Image Stack,Instance Segmentation Model,MoonshotAI Kimi,Microsoft SQL Server Sink,Continue If,Webhook Sink,Cosine Similarity,Pixelate Visualization,Stitch Images,Polygon Visualization,Dimension Collapse,Morphological Transformation,SmolVLM2,Template Matching,Image Slicer,Barcode Detection,Roboflow Asset Library Attributes,Relative Static Crop,Mask Area Measurement,Model Monitoring Inference Aggregator,Clip Comparison,SIFT,Dominant Color,Moondream2,Property Definition,OpenRouter,Qwen3.5-VL,Identify Changes,Overlap Analysis,Email Notification,Triangle Visualization,Pixel Color Count,Roboflow Dataset Upload,SIFT Comparison,Keypoint Visualization,Twilio SMS/MMS Notification,OPC UA Writer Sink,Keypoint Detection Model,SIFT Comparison,Grid Visualization,SAM 3,JSON Parser,Absolute Static Crop,Velocity,Image Threshold,CogVLM,MQTT Writer,Detections List Roll-Up,GLM-OCR,OCR Model,Contrast Enhancement,Reference Path Visualization,Google Gemma API,Instance Segmentation Model,Mask Edge Snap,PTZ Tracking (ONVIF),Detections Classes Replacement,Image Blur,LMM,SAM 3,OpenAI,LMM For Classification,Time in Zone,Semantic Segmentation Model,Path Deviation,Event Writer,Instance Segmentation Model,Single-Label Classification Model,Keypoint Detection Model,Slack Notification,Heatmap Visualization,SORT Tracker,Circle Visualization,Perspective Correction,Camera Focus,Byte Tracker,ByteTrack Tracker,Multi-Label Classification Model,Stability AI Inpainting,OpenAI-Compatible LLM,SAM 3,Image Slicer,Roboflow Vision Events,Detections Transformation,Size Measurement,Local File Sink,Inner Workflow,SAM3 Video Tracker,Dot Visualization,QR Code Detection,Line Counter Visualization,Depth Estimation,Stitch OCR Detections,Anthropic Claude,Per-Class Confidence Filter,Qwen3-VL,Qwen2.5-VL,Single-Label Classification Model,Icon Visualization,Model Comparison Visualization,Camera Focus,Qwen-VL,Mask Visualization,Text Display,Gaze Detection,Stability AI Image Generation,Google Vision OCR,OpenAI,VLM As Detector,Identify Outliers,Detection Offset,S3 Sink,Classification Label Visualization,MoonshotAI Kimi,Switch Case,Overlap Filter,Anthropic Claude,Roboflow Dataset Upload,Detection Event Log,Bounding Box Visualization,VLM As Classifier,Image Contours,Stability AI Outpainting,Anthropic Claude,Roboflow Custom Metadata,Multi-Label Classification Model,SAM2 Video Tracker,Camera Calibration,Morphological Transformation,Detections Stabilizer,Path Deviation,Background Color Visualization,Corner Visualization,GeoTag Detection,Track Class Lock,Roboflow Visual Search,Llama 3.2 Vision,Bounding Rectangle,CLIP Embedding Model,Single-Label Classification Model,OpenAI,OC-SORT Tracker,Image Preprocessing,First Non Empty Or Default,YOLO-World Model,Halo Visualization,Label Visualization
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
LMM in version v1 has.
Bindings
-
input
images(image): The image to infer on..prompt(string): Holds unconstrained text prompt to LMM mode.lmm_type(string): Type of LMM to be used.remote_api_key(Union[secret,string]): Holds API key required to call LMM model - in current state of development, we require OpenAI key whenlmm_type=gpt_4v..
-
output
parent_id(parent_id): Identifier of parent for step output.root_parent_id(parent_id): Identifier of parent for step output.image(image_metadata): Dictionary with image metadata required by supervision.structured_output(dictionary): Dictionary.raw_output(string): String value.*(*): Equivalent of any element.
Example JSON definition of step LMM in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/lmm@v1",
"images": "$inputs.image",
"prompt": "my prompt",
"lmm_type": "gpt_4v",
"lmm_config": {
"gpt_image_detail": "low",
"gpt_model_version": "gpt-4o",
"max_tokens": 200
},
"remote_api_key": "xxx-xxx",
"json_output": {
"count": "number of cats in the picture"
}
}