LMSupply.Captioner
0.110.1
See the version list below for details.
dotnet add package LMSupply.Captioner --version 0.110.1
NuGet\Install-Package LMSupply.Captioner -Version 0.110.1
<PackageReference Include="LMSupply.Captioner" Version="0.110.1" />
<PackageVersion Include="LMSupply.Captioner" Version="0.110.1" />
<PackageReference Include="LMSupply.Captioner" />
paket add LMSupply.Captioner --version 0.110.1
#r "nuget: LMSupply.Captioner, 0.110.1"
#:package LMSupply.Captioner@0.110.1
#addin nuget:?package=LMSupply.Captioner&version=0.110.1
#tool nuget:?package=LMSupply.Captioner&version=0.110.1
LMSupply.Captioner
Local image captioning for .NET with automatic model downloading.
Features
- Zero-config: Models download automatically from HuggingFace
- GPU Acceleration: CUDA, CoreML (macOS)
- Cross-platform: Windows, Linux, macOS
- Simple API: Just 2 lines of code to get started
Quick Start
using LMSupply.Captioner;
// Load the default captioning model
var captioner = await LocalCaptioner.LoadAsync("default");
// Generate a caption
var result = await captioner.CaptionAsync("photo.jpg");
Console.WriteLine(result.Caption);
// Output: "A cat sitting on a windowsill looking outside"
Available Models
| Model ID | Download | Description |
|---|---|---|
default (also fast, auto) |
~1 GB | ViT-GPT2 — fast, one-sentence captions; tends to name a familiar scene rather than the subject |
quality |
~275 MB (int8) · ~545 MB (fp16) · ~1.1 GB (fp32) | Florence-2 base — names the main subjects of everyday photos; brief, detailed or paragraph captions |
quality is published in quantized variants; a load takes the one the hardware tier picks, or the one you name with
QuantizationHint or a qualifier ("quality:fp16"). LocalCaptioner.GetDownloadSizeBytesAsync answers what a load
will download, for a consent screen.
using LMSupply.Captioner;
long bytes = await LocalCaptioner.GetDownloadSizeBytesAsync("quality");
await using var captioner = await LocalCaptioner.LoadAsync("quality",
new CaptionerOptions { Detail = CaptionDetail.Detailed, MaxLength = 100 });
var result = await captioner.CaptionAsync("photo.jpg");
Detail (Brief · Detailed · Paragraph) is read by quality; default captions at one level and refuses any other
value at load. Prompt (caption prefix) is read by default; quality refuses it — its prompt selects the task.
Advanced Usage
using LMSupply; // ExecutionProvider
// Custom options
var options = new CaptionerOptions
{
MaxLength = 50,
Provider = ExecutionProvider.Cuda
};
var captioner = await LocalCaptioner.LoadAsync("default", options);
var result = await captioner.CaptionAsync("image.jpg");
Console.WriteLine($"Caption: {result.Caption}");
Console.WriteLine($"Confidence: {result.Confidence:P1}");
GPU Acceleration
Install the appropriate GPU package for your hardware:
# NVIDIA GPU
dotnet add package Microsoft.ML.OnnxRuntime.Gpu
AMD / Intel GPUs on Windows have no ONNX provider on ONNX Runtime 1.25+ (DirectML was removed in 0.67.0); captioning runs on CPU there.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- LMSupply.Text.Core (>= 0.110.1)
- LMSupply.Vision.Core (>= 0.110.1)
- System.Numerics.Tensors (>= 10.0.12)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LMSupply.Captioner:
| Package | Downloads |
|---|---|
|
FileFlux.Providers.LMSupply
LMSupply local ONNX model provider for FileFlux: document analysis (summarization, metadata extraction), embeddings, OCR, image captioning, and speech transcription — no API key required. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.119.0 | 0 | 10/12/2026 |
| 0.118.0 | 4 | 10/11/2026 |
| 0.117.1 | 44 | 10/11/2026 |
| 0.117.0 | 55 | 10/11/2026 |
| 0.116.0 | 56 | 10/11/2026 |
| 0.115.1 | 129 | 10/8/2026 |
| 0.115.0 | 54 | 10/8/2026 |
| 0.114.0 | 86 | 10/8/2026 |
| 0.113.0 | 102 | 10/8/2026 |
| 0.112.1 | 74 | 10/7/2026 |
| 0.112.0 | 74 | 10/7/2026 |
| 0.111.0 | 126 | 10/7/2026 |
| 0.110.1 | 83 | 10/7/2026 |
| 0.110.0 | 92 | 10/7/2026 |
| 0.109.1 | 84 | 10/7/2026 |
| 0.109.0 | 146 | 10/7/2026 |
| 0.108.0 | 172 | 10/6/2026 |
| 0.107.0 | 106 | 10/6/2026 |
| 0.106.1 | 99 | 10/5/2026 |
| 0.106.0 | 128 | 10/5/2026 |