Skip to content

Run Local Model

The generic Local AI node: pick a task, pick any installed model, feed it an input. Use it for tasks the dedicated nodes don’t cover, for custom-imported models, or when you want one node that adapts. Runs locally in your browser — private, offline, no cost.

Runs the selected on-device model for the task you choose and returns the normalized output for that task (the same shapes the dedicated nodes return).

  • You imported a custom model and want to run it.
  • You want embeddings from a node, not a dependency.
  • You need image segmentation, a depth map, or extractive Q&A with the question and passage in one input.
  • You’d rather configure one flexible node than reach for the specific one.
SettingNotes
TaskOne of: Classify image, Detect objects, Caption image, Segment image, Depth map, Transcribe audio, Moderate text, Answer question, Generate text, Embeddings, Custom model (raw output).
ModelAny installed model for the chosen task, across engines. The picker is filtered to the selected Task.
InputDepends on the task — see below.
  • Image and audio tasks (Classify image, Detect objects, Caption image, Segment image, Depth map, Transcribe audio) — an image/audio URL, data URL, raw base64, or $binary from a previous node.
  • Answer question — JSON with both fields: { "question": "…", "context": "…" }. The answer is quoted from context.
  • Text tasks (Moderate text, Generate text, Embeddings) and Custom model — text. A non-text value from an expression is passed as JSON.

The output shape matches the chosen task:

  • Classify image / Moderate text → { predictions, top, score }
  • Detect objects → { objects, count, top }
  • Caption image / Generate text → { text }
  • Segment image → { segments, labels, top } — segments is [{ label, score, coverage, mask }], largest region first; each mask is a black-and-white PNG binary (image/png) of that region, usable anywhere a $binary image is accepted.
  • Depth map → { depth, width, height, $binary } — depth is a grayscale PNG depth map (with Depth Anything, brighter usually means closer), also exposed as $binary so the next node’s media input picks it up via From input.
  • Transcribe audio → { transcript, segments, chunks }
  • Answer question → { answer, score }
  • Embeddings → { embedding } (a numeric vector)
  • Custom model (raw output) → { result } — whatever the model returned, unchanged. Use it for a custom-imported model whose task isn’t one of the above.
  • Task/model mismatch — pick a model trained for the selected task; the picker only lists models for the chosen task. Change the task first, then the model.
  • “Answer question needs JSON input …” — the Input must be valid JSON with non-empty question and context strings.
  • Empty picker — install a model for that task first, from the picker or the Local AI page.