节点 / builtin / ai / localai
Run Local Model
Run any installed on-device model for a chosen task
此内容尚不支持你的语言。
Run any on-device model for the task you choose, including tasks and custom models the dedicated Local AI nodes do not cover.
What it does
Section titled “What it does”Pick a Task, pick a model that does it, and give it one Input. The node runs the model in your browser and returns the result in the same shape the matching dedicated node would, for example { predictions, top, score } for Classify image.
Unlike the dedicated nodes, it has no threshold or top-K settings: you get every result the model returns. There is no cost per run and no API key.
When to use it
Section titled “When to use it”- Split an image into labelled regions (Segment image) or estimate distances (Depth map). No other node does these.
- Get an embedding vector for a piece of text (Embeddings).
- Run a custom model you added on the Local AI page, with Custom model (raw output) when its task is not in the list.
For common tasks the dedicated nodes are easier, for example Classify Image or Transcribe Audio.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Task | Choice | Options: Classify image, Detect objects, Caption image, Segment image, Depth map, Transcribe audio, Moderate text, Answer question, Generate text, Embeddings, Custom model (raw output). 默认值:Classify image |
| Model | Model picker | Any installed model for the chosen task, across engines. |
| Input | Text | Text; an image/audio URL / data URL / $binary; or for Answer question, JSON { "question": "…", "context": "…" }. |
Choose Task first: the Model picker only lists models for that task. What Input needs depends on the task:
- Classify image, Detect objects, Caption image, Segment image, Depth map, Transcribe audio: an image or audio web address, a data URL, raw base64, or a file from an earlier node, for example
{{ $input.dataUrl }}after Screenshot Page. - Answer question: JSON with both fields, for example
{ "question": "What is the total?", "context": "Total due: 42 EUR" }. The answer is copied fromcontext. Text inserted with an expression must not break the JSON: quotes and line breaks in it make the input invalid. - Moderate text, Generate text, Embeddings, Custom model (raw output): text. A value that is not text is sent as JSON.
Outputs
Section titled “Outputs”-
Output
The output depends on Task:
- Classify image, Moderate text:
{ predictions, top, score }. - Detect objects:
{ objects, count, top }. Each object has aboxwithxmin,ymin,xmax,ymaxin pixels. - Caption image, Generate text:
{ text }. - Segment image:
{ segments, labels, top }.segmentslists{ label, score, coverage, mask }, largest region first; eachmaskis a black-and-white PNG of that region you can pass to any node that takes an image. - Depth map:
{ depth, width, height }.depthis a grayscale PNG (with Depth Anything v2 small, brighter usually means closer). It is also attached as the item’s file, so the next image node picks it up with{{ $binary }}. - Transcribe audio:
{ transcript, segments, chunks }, as in Transcribe Audio. - Answer question:
{ answer, score }. - Embeddings:
{ embedding }, a list of numbers. - Custom model (raw output):
{ result }, whatever the model returned, unchanged.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
The Model picker lists your installed models first, then models that download on first use. Install models, or add a custom model, on the Local AI page.
Example workflow
Section titled “Example workflow”List the kinds of regions in the visible page:
- Screenshot Page with Mode
viewport. - Run Local Model with Task Segment image, Model SegFormer B0 (ADE20k) and Input
{{ $input.dataUrl }}. - Show Notification with Title
Regionsand Message{{ $input.labels }}.
Common issues
Section titled “Common issues”- “Choose a model to run.” Model is empty. Pick Task first, then a model.
- “Answer question needs JSON input: …” or “Answer question needs both “question” and “context” …“ Input is not valid JSON, or one of the two fields is missing or empty.
- “No input provided. Pass a URL, a data URL, or a $binary from a previous node.” An image or audio task got an empty Input. Check the field your expression points to.
- The results make no sense. The model may not match the task, for example after you changed Task but kept the old Model. Pick a model again from the filtered list.
- “Model “…” isn’t available. Install it from Local AI.“ The saved model is no longer in your list, for example a removed custom model. Pick another model.
Related nodes
Section titled “Related nodes”- Classify Image and Detect Objects: image tasks with threshold settings.
- Analyze Text: text moderation with threshold settings.
- Answer Question: separate question and context fields.
- Transcribe Audio: speech-to-text with a Record tab.